Skip to content

chore(deps): bump voku/anti-xss from 4.1.46 to 4.1.50 - #155

Merged
cakmoel merged 1 commit into
mainfrom
dependabot/composer/main/voku/anti-xss-4.1.50
Nov 25, 2026
Merged

cakmoel merged 1 commit into
mainfrom
dependabot/composer/main/voku/anti-xss-4.1.50

Conversation

@dependabot

@dependabot dependabot Bot commented on behalf of github Nov 23, 2026

Copy link
Copy Markdown
Contributor

Bumps voku/anti-xss from 4.1.46 to 4.1.50.

Release notes

Sourced from voku/anti-xss's releases.

4.1.50

Security fixes

  • Event handler attributes (GHSA-…): every attribute named on + ASCII letters with a value is removed, not only the names on the internal list. Before, e.g. WebKit's ongesturestart / onwebkitmouseforcedown and every unknown or future event survived xss_clean() (264–281 of 514 known event names, all unknown names). The attributes are found with the HTML tokenizer rules, so text and values like title="onreading mode", data-onclick, on:click are kept.
  • Fail closed if PCRE fails (GHSA-… or hardening, see the advisory): if a regex fails (e.g. pcre.backtrack_limit), xss_clean() no longer returns the unchecked input; failed steps use non-regex fallbacks and the input is reported as XSS.

Behavior changes

  • Unknown on… attributes with a value are removed (e.g. <x onxxx=1>). Names that are no event handlers in any browser (on:click, on_load, on-click, onfoo1) and attributes without a value are kept.
  • Event names directly after a - are no longer removed from text and attribute names (data-onclick="…" stayed data-="…" before, aria-onfocus-hint became aria--hint).
  • If PCRE fails, the output is lossy on purpose (markup encoded, : / + / control chars removed).

Documentation

  • New README sections: supported output contexts (HTML body context only; not attribute values without escaping, URLs without scheme validation, JavaScript or CSS), the event handler rule and the PCRE behavior.

Tests / CI

  • Browser tests in Chromium, Firefox and WebKit (sanitized fixtures must not execute, raw controls must).
  • tests/fixtures/browser-event-handlers.txt (514 names from specs and engine sources, pinned, generated by build/event-handlers/extract.py), PCRE failure tests (separate processes, JIT on/off), differential corpus regenerated (18 of 2000 results changed, reviewed).

Verification (commit 985a8c1)

  • PHPUnit 368 tests, PHPStan level 8, Infection on the changed lines (gate 70%), CI PHP 7.1–8.5 incl. lowest dependencies, Chromium / Firefox / WebKit — see the PR checks.

4.1.49

No release notes provided.

4.1.48

The 4.1.48 fix covers a memory-exhaustion problem in the released 4.1.47

4.1.47

https://github.com/voku/anti-xss/security/advisories/GHSA-v42h-26cv-jpgq

Changelog

Sourced from voku/anti-xss's changelog.

4.1.50 (2026-11-19)

  • security: "xss_clean()" fails closed, if PCRE fails (e.g. "pcre.backtrack_limit" exhausted, also with "pcre.jit" disabled): before, e.g. "pcre.jit=0" + "pcre.backtrack_limit=1" returned 'alert(1)' unchanged with "isXssFound() === false", because a failed "preg_replace()" erased the string before the backup (also inside "portable-utf8", e.g. "UTF8::rawurldecode()" / "UTF8::remove_invisible_characters()"), and other steps kept the unfiltered string ("$tmp ?? $str"); every PCRE call on the cleaning path was checked: a failed guard now runs its step, a failed removal uses a non-regex fallback ("_failClosedRemoveAttributesByName()" or the one terminal fallback "_failClosedNeutralize()": decode character references, remove ":", "+" and control chars, HTML-encode everything incl. every remaining "&", so that the result has no tag and no URL scheme, also in a quoted attribute), the "portable-utf8" calls are checked via "preg_last_error()", and "%uXXXX" is decoded without PCRE (a failure in "portable-utf8" there was hidden by a later successful PCRE call)
  • tests: add "PcreFailureTest" (every "pcre.jit" 0 / 1 + "pcre.backtrack_limit" 1 - 1000 setting in a separate PHP process, also for the code coverage; the existing test only used a tight limit with the JIT enabled, which hides most failures) and direct tests of the fail-closed fallbacks
  • security: remove every event handler attribute ("on" + ASCII letters as attribute name, e.g. "ongesturestart", "onwebkitmouseforcedown" or a future event), not only the names on "_never_allowed_on_events_afterwards"; the attributes are found with the rules of the HTML tokenizer (from every possible start tag), so text and attribute values like 'title="onreading mode"', 'data-onclick' or "on:click" are kept (WebKit gesture / force-touch events were not on the list and stayed executable in Safari)
  • security: with the old list, 264 - 281 (depending on the payload) of 514 event names known to the specs and browser engines survived "xss_clean()"; now none does (checked in PHP and in Chromium, also for random unknown names)
  • fix: an event name directly after a "-" is not removed from text and attribute names anymore (e.g. 'data-onclick="..."' was changed to 'data-="..."', 'aria-onfocus-hint' to 'aria--hint')
  • breaking (security): unknown "on..." attributes with a value are removed now, e.g. '' (they were kept as unknown names before); "removeNeverAllowedOnEventsAfterwards()" still allows the removed names
  • tests: add "EventHandlerAttributeTest" (contract, syntax variations, seeded random event names, parser contexts, public API, runtime budget / fail-closed fallback), benign content cases and a Chromium browser test ("tests/browser/event-handler-attributes.php", also in CI)
  • tests: add "tests/fixtures/browser-event-handlers.txt" (514 names, generated from pinned upstream revisions by "build/event-handlers/extract.py") as a test resource; the runtime list is unchanged; names that start with "on" but are not "on" + ASCII letters are listed there as "excluded" (currently none), so that a new one shows up in the check
  • tests: regenerate the differential corpus (18 of 2000 results changed, all reviewed)

4.1.49 (2026-11-18)

  • fix regression from 4.1.47: harmless HTML from Microsoft Word / Excel (e.g. "<o:Title>", "<x:Selected/>", "<x:Header>", "<x:FormulaHidden/>") was encoded and reported as XSS; a tag with an XML namespace prefix is now only treated as an evil tag, if its local name is exactly the (lowercase) evil tag name (e.g. "<x:script>")
  • fix regression from 4.1.47: ANSI color codes (e.g. "ESC [ 32 m") were removed and reported as XSS; only the ISO-2022-JP escape sequences ("ESC (" and "ESC $") are treated as XSS now
  • tests: add a regression test for harmless real-world content (unchanged + not reported as XSS, like in 4.1.46)
  • tests: the browser tests initialize their "payload executed" flags before any payload is rendered
  • tests: add a deterministic differential corpus (2,000 seeded inputs, compared with the results of 4.1.48 / 4.1.47)
  • ci: raise the Infection gate for changed lines from 65% to 70% MSI (measured: 73.7% for 4.1.47, 97% for 4.1.48)

4.1.48 (2026-11-18)

  • security: fix a memory-amplification (denial of service) regression from 4.1.47: the event-handler removal needed ~150x and the html-tag scan ~35x the memory of the input (e.g. 1.5 MB of " onclick" needed > 200 MB); both now need ~4x (like 4.1.46)
  • add memory-budget regression tests (in a separate PHP process with a fixed "memory_limit")
  • add a Chromium browser test for the XSS-filter bypasses fixed in 4.1.47 (GHSA-v42h-26cv-jpgq), incl. a raw negative control

4.1.47 (2026-11-17)

  • security: fix an XSS-filter bypass via a numeric character reference without ";" (e.g. "&#x3a" / "&#58") followed by a char that is removed before decoding (e.g. "%0b", "%0c", U+FEFF)
  • security: fix an XSS-filter bypass on XHTML pages via namespace-prefixed tags (e.g. "<x:script>")
  • security: fix an XSS-filter bypass via other spellings of encoded script-tags (e.g. "<script >", "<script/x>", "&#60;script>")
  • security: fix an XSS-filter bypass on ISO-2022-JP pages via ESC-sequences (e.g. "ESC ( B") inside of keywords
  • security: fix an XSS-filter bypass via "javascript" + an encoded ":" (e.g. "javascript:") in text next to html-tags
  • security: fix an XSS-filter bypass where an evil tag directly after a look-alike tag (e.g. "") was not encoded
  • security: fix several denial-of-service issues (quadratic / exponential runtime on crafted input): compacting of exploded words, event-handler removal, the base64-image check, the html-tag decoding, nested attribute cleaning and the removal of nested url-encoded control chars
  • fix: "addEvilHtmlTags()" with a short name (e.g. "s") does not shadow built-in evil tags (e.g. "style") anymore
  • fix: content after an "" / "" / "" / "" tag without attributes is not deleted anymore
  • fix: many event names in front of one ">" do not throw a "non-converging sanitization loop"-exception anymore
  • fix: an inline option (e.g. "(?-i)") in a regex from "addNeverAllowedRegex()" does not change the built-in regexes anymore
  • fix: "removeNeverAllowedRegex(['regex' => 'replacement'])" removes only this regex (and not every regex with the same replacement)
  • fix: remove the "shadowrootmode" attribute (declarative shadow DOM)
  • fix: detect "data:" URLs split by tabs / newlines (e.g. "da\tta:", "image/s\nvg")
  • "%0C" (url-encoded form feed) is now replaced by a space instead of being removed
  • add regression tests for all findings (GHSA-v42h-26cv-jpgq), thanks to Anthropic's OSS Scanner
  • ci: lower the Infection gate for changed lines (MSI 100% -> 65%, max. 40 timeouts)
Commits
  • 50c82fd Merge pull request #228 from voku/ccr-526ddd97-lstzxd
  • 3776ab6 Merge pull request #227 from voku/renovate/node-26.x
  • 89e64d5 Tests: harden the dangers() oracle and the peak-memory check (CodeRabbit)
  • 9c5e278 chore(deps): update dependency node to v26
  • 319982e Merge pull request #225 from voku/ccr-526ddd97-lstzxd
  • 9dc1e12 Merge pull request #224 from voku/renovate/php-8.x
  • 985a8c1 prepare 4.1.50
  • 4a9ec9c Merge pull request #226 from voku/analysis-6wogk6
  • a6fce4c Apply fixes from StyleCI
  • 58cc88d docs: document the supported output contexts
  • Additional commits viewable in compare view

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Bumps [voku/anti-xss](https://github.com/voku/anti-xss) from 4.1.46 to 4.1.50.
- [Release notes](https://github.com/voku/anti-xss/releases)
- [Changelog](https://github.com/voku/anti-xss/blob/master/CHANGELOG.md)
- [Commits](voku/anti-xss@4.1.46...4.1.50)

---
updated-dependencies:
- dependency-name: voku/anti-xss
  dependency-version: 4.1.50
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot Bot added dependencies Pull requests that update a dependency file php Pull requests that update php code labels Nov 23, 2026
@cakmoel
cakmoel merged commit 36dccb6 into main Nov 25, 2026
4 checks passed
@cakmoel
cakmoel deleted the dependabot/composer/main/voku/anti-xss-4.1.50 branch November 25, 2026 09:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file php Pull requests that update php code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant