PackageTrack
Sign in Get early access

voku/anti-xss

anti xss-library

4.1.44 19M downloads/mo #1211 most downloaded on Packagist voku/anti-xss

What this package is like to depend on

Last release 1 months ago

10 Jul 2026

Ships unpredictably

gaps range from 9 days to 2.8 years

Some releases are documented

notes for 52 of 107 stable releases

Nothing withdrawn

no release was ever pulled

11 years old

107 releases · first in 2015

2 releases in the last 12 months

see the full history below

Release timeline

107 releases · Mar 2015 to Jul 2026
2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026
Release Pre-release

Releases

latest 60 of 107
  1. 4.1.44 10 Jul 2026
    Release notes

    [*]: update the changelog

    Open source →
    Release notes
    • add more modern DOM event handlers to the blacklist (e.g. "onAppInstalled", "onBeforeInstallPrompt", "onFormData", "onGamepadConnected/Disconnected", "onMessageError", "onScrollEnd", "onSecurityPolicyViolation", "onSlotChange", "onVRDisplay*", ...)
    • harden detection of hyphen-/colon-suffixed event-handler lookalikes (e.g. "onmessageerror-foo") so the whole attribute is removed instead of leaving a broken attribute with leftover payload text
    • fix regression: the lookalike-hardening above could also strip the value of unrelated, legitimate compound attributes that merely contain an event name after a hyphen (e.g. "data-onchange-debounce="300""); only real handler-lookalikes are removed now
    • harden CSS "expression(...)" detection, incl. escaped and uppercase variants, and fix a regex backtracking risk
    • add a hard cap on internal sanitization retry-loops (throws "RuntimeException" instead of looping forever if a loop can't converge)
    • preserve custom / removed "_never_allowed_regex" entries across "setReplacement()" calls
    • fix: several tag/attribute-stripping steps silently wiped the whole string to "" when "preg_replace()"/"preg_replace_callback()" hit "pcre.backtrack_limit" (or its fallback also failed); they now fail closed via a bounded, non-regex removal of the specific dangerous tag/attribute instead of discarding unrelated content or falling back to the still-dangerous raw input
    • add regression test for issue #201 (template + slot "onslotchange" XSS)
    • add mutation testing (Infection) to CI with a diff MSI gate
    Open source →
  2. 4.1.43 22 Apr 2026
    Release notes

    [+]: optimize performance

    Open source →
    Release notes
    • 10-50% better performance
    • add "addNaughtyJavascriptPatterns()"
    • add "setKeepPreAndCodeTagContent()" to preserve content inside "pre" and "code" tags
    • fix regression when sanitizing text inside "pre" / "code" tags
    • fix false-positives for valid "href" / "src" URLs and plain text such as "system (...)", "behavior:", "< abc" and "< 35kg"
    • improve detection of obfuscated style / attribute payloads and JSON-escaped HTML attributes
    • keep valid base64 payloads ending with "==" and avoid blank output if "preg_replace()" returns "null"
    • update "portable-utf8" to "~6.1.0"
    • improve CI / test compatibility (incl. PHP 8.5 + PHPUnit 12)
    Open source →
  3. 4.1.42 03 Jul 2023
    Release notes
    • add more js events e.g. "onbeforetoggle"
    Open source →
  4. 4.1.41 12 Feb 2023
    Release notes

    [*]: update the changelog

    Open source →
    Release notes
    • remove debug call (thx @gharlan [Gregor Harlan]
    Open source →
  5. 4.1.40 11 Feb 2023
    Release notes

    [+]: fix false positive on self-close tags (issue #111)

    Open source →
    Release notes
    • fix xss bypass (issue 115 | thx @thanosgn [Thanos Giannopoulos])
    • add more blacklisted js calls (thx @peter-mw [Peter Ivanov])
    • fix false positive on self-close tags (issue 111 | thx @genetus [Maxim Antonov])
    Open source →
  6. 4.1.39 08 Mar 2022
    Release notes

    [*]: update the changelog

    Open source →
    Release notes
    • "To people of Russia": There is a war in Ukraine right now. The forces of the Russian Federation are attacking civilians.
    Open source →
  7. 4.1.38 07 Mar 2022
    Release notes

    [*]: update the changelog v2

    Open source →
    Release notes
    • optimize "_sanitize_naughty_javascript" (issue 99 | thx @Fahl-Design)
    • optimize "_do_never_allowed_afterwards", at least for strings in tags
    Open source →
  8. 4.1.37 15 Feb 2022
    Release notes

    [*]: update the changelog

    Open source →
    Release notes
    • move more static data into the object
      • allow to modify the "_never_allowed_call_strings"-data"
      • allow to modify the "_never_allowed_js_callback_regex"-data"
    Open source →
  9. 4.1.36 27 Jan 2022
    Release notes

    [*]: update the changelog

    Open source →
    Release notes
    • update "portable-utf8"
    Open source →
  10. 4.1.35 08 Dec 2021
    Release notes

    [*]: update the changelog

    Open source →
    Release notes
    • update "portable-utf8"
    Open source →
  11. 4.1.34 29 Nov 2021
    Release notes
    • allow e.g. "< 1 year" (issue 83)
    • fix false-positive issue (issue 85 | thx @gharlan)
    Open source →
  12. 4.1.33 03 Oct 2021
    Release notes
    • fix errors in large strings
    • fix "_xss_found" if xss string was found in array value
    Open source →
  13. 4.1.32 29 Mar 2021
    Release notes
    • micro-optimize performance
    • optimize phpdocs + use phpstan-syntax
    Open source →
  14. 4.1.31 02 Dec 2020
    Release notes
    • optimize performance (thx @staabm)
    • update vendor lib (Portable UTF-8)
    Open source →
  15. 4.1.30 12 Nov 2020
    Release notes
    • update vendor lib (Portable UTF-8)
    Open source →
  16. 4.1.29 08 Nov 2020
    Release notes
    • allow e.g. "<35%" (issue #62)
    • allow to skip some html tags from auto closing (issue #63)
    • run tests with PHP 8.0 rc3
    Open source →
  17. 4.1.28 27 Aug 2020
    Release notes
    • fix allow base64 encoded images in <img>-tags (issue #61)
    • fix performance issue of regex with "preg_match_all"
    Open source →
  18. 4.1.27 23 Aug 2020
    Release notes
    • allow e.g. "< $2.20" (issue #60)
    • optimize protection against HTML "script" tag stripping evasion
    • auto-generate the api documentation into the README
    Open source →
  19. 4.1.26 08 Aug 2020
    Release notes
    • allow base64 encoded images in <img>-tags (issue #59)
    Open source →
  20. 4.1.25 12 Jun 2020
    Release notes
    • fix false-positive (issue #58)
    Open source →
  21. 4.1.24 08 Mar 2020
    Release notes
    • allow to change the "_never_allowed_str_afterwards" (issue #56)
    • fix false-positive (issue #55)
    Open source →
  22. 4.1.23 05 Mar 2020
    Release notes
    • use some more bad strings from "https://github.com/s0md3v/AwesomeXSS"
    • optimize some regex (use strpos before the regex)
    Open source →
  23. 4.1.22 06 Feb 2020
    Release notes
    • fix false-positive (issue #54)
    • optimize internal caching of strings
    Open source →
  24. 4.1.21 30 Dec 2019
    Release notes
    • fix false-positive (issue #53)
    • fix for "server-sent events"
    • optimize regex for encoded script-tags (%3C && %3E)
    Open source →
  25. 4.1.20 07 Dec 2019
    Release notes
    • fix additional false positives in string (issue #52)
    • remove support for "Netscape 4 JS entities"
    Open source →
  26. 4.1.19 11 Nov 2019
    Release notes
    • keep more non XSS content from html input
    Open source →
  27. 4.1.18 10 Nov 2019
    Release notes
    • fix open tags problem e.g. "<img/"
    Open source →
  28. 4.1.17 08 Nov 2019
    Release notes
    • add "addNeverAllowedRegex()"
    • add "removeNeverAllowedRegex()"
    Open source →
  29. 4.1.16 03 Nov 2019
    Release notes
    • fix replacing of "-->" (issue #50)
    • update vendor lib (Portable UTF-8)
    Open source →
  30. 4.1.15 25 Sep 2019
    Release notes
    • optimize regex
    • update vendor lib (Portable UTF-8)
    Open source →
  31. 4.1.14 27 Jun 2019
    Release notes
    • add "removeNeverAllowedOnEventsAfterwards()" && "addNeverAllowedOnEventsAfterwards()"
    • update "_never_allowed_on_events_afterwards" -> add "onTouchend" + "onTouchLeave" + "onTouchMove" (thx @DmytroChymyrys)
    • optimize phpdoc for array => string[]
    Open source →
  32. 4.1.13 07 Jun 2019
    Release notes
    Open source →
  33. 4.1.12 31 May 2019
    Release notes
    Open source →
  34. 4.1.11 25 Apr 2019
    Release notes
    Open source →
  35. 4.1.10 23 Apr 2019
    Release notes
    • fix replacing of false-positive xss words e.g. "ANAMNESI E VAL!DEFINITE BREVI ORTO" (issue #43)
    Open source →
  36. 4.1.9 19 Apr 2019
    Release notes
    • optimize the spacing regex
    Open source →
  37. 4.1.8 19 Apr 2019
    Release notes
    • fix replacing of false-positive xss words e.g. "MONDRAGÓN" (issue #43)
    Open source →
  38. 4.1.7 19 Apr 2019
    Release notes
    • fix replacing of false-positive xss words e.g. "DE VAL HERNANDEZ" (issue #43)
    Open source →
  39. 4.1.6 13 Apr 2019
    Release notes
    • fix replacing of false-positive xss words e.g. "Mondragon" (issue #43)
    Open source →
  40. 4.1.5 13 Feb 2019
    Release notes
    • fix issue with "()" in some html attributes (issue #41)
    Open source →
  41. 4.1.4 22 Jan 2019
    Release notes
    • use new version of "Portable UTF8"
    Open source →
  42. 4.1.3 27 Oct 2018
    Release notes
    • fix for url-decoded stored-xss
    • fix return type (?string -> string)
    Open source →
  43. 4.1.2 04 Sep 2018
    Release notes
    • use new version of "Portable UTF8"
    • add some more event listener
    • use PHPStan
    Open source →
  44. 4.1.1 26 Apr 2018
    Release notes
    • "UTF7 repack corrected" | thx @alechner #34
    Open source →
  45. 4.1.0 17 Apr 2018
    Release notes
    • keep the input value (+ encoding), if no xss was detected #32
    Open source →
  46. 4.0.3 12 Apr 2018
    Release notes
    • fix "href is getting stripped" #30
    Open source →
  47. 4.0.2 14 Feb 2018
    Release notes
    • fix "URL escaping bug" #29
    Open source →
  48. 4.0.1 07 Jan 2018
    Release notes
    • fix usage of "Portable UTF8"
    Open source →
  49. 4.0.0 23 Dec 2017
    Release notes
    • update "Portable UTF8" from v4 -> v5

      -> this is a breaking change without API-changes - but the requirement from "Portable UTF8" has been changed (it no longer requires all polyfills from Symfony)

    Open source →
  50. 3.1.0 21 Nov 2017
    Release notes
    • add "_evil_html_tags" -> so you can remove / add html-tags
    Open source →
  51. 3.0.1 19 Nov 2017
    Release notes
    • "php": ">=7.0"
      • use "strict_types"
    • simplify a regex
    Open source →
  52. 3.0.0 19 Nov 2017
    Release notes
    • "php": ">=7.0"
      • drop support for PHP < 7.0
    Open source →
  53. 2.3.1 26 Apr 2018

    Nothing published for this version

  54. 2.3.0 17 Apr 2018

    Nothing published for this version

  55. 2.2.2 12 Apr 2018

    Nothing published for this version

  56. 2.2.1 14 Feb 2018

    Nothing published for this version

  57. 2.2.0 22 Nov 2017

    Nothing published for this version

  58. 2.1.7 08 May 2017

    Nothing published for this version

  59. 2.1.6 08 May 2017

    Nothing published for this version

  60. 2.1.5 07 May 2017

    Nothing published for this version

Every package, every release, already written down.

The archive is open and free. Watching your own project is what we are building next.

Browse the archive