sanitize-html XSS via incomplete filtering of SVG animation attributes
- Exploited
- No known exploitation
- Fix
- Fixed in 2.18.2
- Who is exposed
- Not reported
Summary
The sanitize-html package from apostrophecms has a cross-site scripting flaw that lets attackers bypass its allowed-schemes filter using SVG animation attributes whose names contain multiple colons. Remotely, without logging in, an attacker can submit crafted markup that runs script in a victim's browser when the victim clicks the animated link.
Written by a model
Original description
sanitize-html 2.17.7 before 2.18.2 contains a cross-site scripting vulnerability that allows attackers to bypass allowedSchemes by supplying SVG animation attributeName values with multiple colons. Attackers can submit markup like attributeName xlink:href:x with javascript: URLs in values, from, or to attributes, executing script when victims click the animated link.
What to do
Upgrade to a fixed version: 2.18.2.
Check your systems with an agent
Paste this into a coding or ops agent. It checks your systems read-only and reports a table per asset.
Check whether my systems are affected by CVE-2026-145156 (sanitize-html 2.17.7 before 2.18.2 XSS via SMIL attributeName Extra-Colon Bypass), using the cve.now data below.
Rules: work read-only. Do not run exploit code, proof-of-concept scripts or scanners that send attack payloads, and do not change any configuration, package, image or deployment. Report findings only.
What cve.now has for CVE-2026-145156 (entry last updated 2026-12-04):
Affected:
- npm package sanitize-html: from 2.17.7, fixed in 2.18.2
Fixed versions: 2.18.2.
Setup: unknown whether the bug needs a non-default feature or setting. Check the advisory.
CISA KEV: CVE-2026-145156 is not listed as of cve.now's last read.
This KEV status is for CVE-2026-145156 only. If you also check another CVE, look up its own KEV status; never assume it from this one.
How to check:
- Packages (npm): find every lockfile in each project and run the stack.check operation of the cve.now MCP server (execute) on each one. Compare the resolved versions, not the ranges a manifest declares, with the affected versions above. Include transitive dependencies.
Verify against the linked advisories before concluding, and cite the date you read each one:
- https://github.com/apostrophecms/apostrophe/security/advisories/GHSA-8g6g-w2rq-xcmc
- https://github.com/apostrophecms/apostrophe/commit/bd727d101de798d574196173f3cbc4f9aaedb3f7
- https://github.com/apostrophecms/apostrophe/blob/sanitize-html%402.18.2/packages/sanitize-html/CHANGELOG.md
- https://github.com/apostrophecms/apostrophe/blob/sanitize-html%402.18.1/packages/sanitize-html/index.js#L1018-L1043
- https://www.vulncheck.com/advisories/sanitize-html-2.17.7-before-2.18.2-xss-via-smil-attributename-extra-colon-bypass
Do not conclude an asset is unaffected unless you checked it and the evidence covers both its version and the conditions above. If you could not check something, mark it unknown and say what is missing.
Report a table with one row per asset and these columns: Asset | Version or build | Status (affected, fixed, not applicable, unknown) | Compensating controls | Exposure (internet-facing, internal, none) | Evidence | Next action.
Entry: https://cve.now/CVE-2026-145156
For follow-up questions, use the cve.now MCP server at https://mcp.cve.now/mcp (no authentication), for example execute with name cve.get and arguments {"id": "CVE-2026-145156"}.Affected versions
cve.now Index
- Exploitation?/40Unknown. No CISA SSVC exploitation rating yet
- Exposure7/25Reachable over the network without a login · Unknown: No advisory context yet
- Reach20/20sanitize-html: 18.2M downloads a week
- Severity2.3/10CVSS 2.3
- No patch0/5No signal
What would change the score
- Would score about 84 if added to CISA KEV
- Would score about 79 if CISA's SSVC rates exploitation active
- Would score about 44 if advisories confirm default setups are exposed
Impact
Timeline
- CVE published
- First seen by cve.now
Evidence 7
| Kind | Source |
|---|---|
| Vendor advisory 1Establishes: Affected and fixed versions. | |
| Advisory | GitHub · apostrophecms/apostrophe · Advisory GHSA-8g6g-w2rq-xcmc |
| CVE record 2Establishes: The identifier and description. | |
| Record | CVE List · CVE-2026-145156 |
| Record | NVD · CVE-2026-145156 |
| Other links 4 | |
| Patch | GitHub · apostrophecms/apostrophe · Commit bd727d10 |
| Repository | GitHub · apostrophecms/apostrophe · packages/sanitize-html/CHANGELOG.md |
| Repository | GitHub · apostrophecms/apostrophe · packages/sanitize-html/index.js · L1018-L1043 |
| Link | vulncheck.com · advisories/sanitize-html-2.17.7-before-2.18.2-xss-via-smil-attributename-extra-colon-bypass |
Questions about CVE-2026-145156
Is CVE-2026-145156 being exploited?
It is not in CISA's Known Exploited Vulnerabilities catalog, and CISA's SSVC assessment does not mark exploitation as active. That does not mean it has not been attacked: vendors and researchers can report attacks before CISA lists them. No public exploit code is tracked.
Source: cve.now feed data
Which versions are affected by CVE-2026-145156?
sanitize-html (npm): from 2.17.7 before 2.18.2.
Source: cve.now feed data
How do I fix CVE-2026-145156?
Upgrade to a fixed version: 2.18.2.
Source: cve.now feed data
Related
- CVE-2026-44990Apostrophe has default XSS via `xmp` raw-text passthrough in `sanitize-html`
- CVE-2026-63670ApostropheCMS: Mutation-XSS / allowedTags bypass via literal `</textarea/>` solidus close
- CVE-2026-40186ApostropheCMS: sanitize-html allowedTags Bypass via Entity-Decoded Text in nonTextTags Elements
- CVE-2019-25225`sanitize-html` prior to version 2.0.0-beta is vulnerable to Cross-site Scripting (XSS).
- CVE-2016-1000237sanitize-html before 1.4.3 has XSS.
- CVE-2017-16016Sanitize-html is a library for scrubbing html input of malicious values.
No corrections so far. Something wrong on this page? Report an error.