Cross-site Scripting in enshrined/svg-sanitizeGHSA-fqx8-v33p-4qcc
MEDIUMFix: darylldoyle/svg-sanitizer@17e12baGHSA-fqx8-v33p-4qcc is a medium-severity (CVSS 6.2) Cross-site Scripting (XSS) vulnerability in enshrined/svg-sanitize. A fix is available for enshrined/svg-sanitize — see the affected versions and patch details below.
Exploitation Status
No confirmed exploitation observed yet
- CISA’s own triage has not observed active exploitation or public proof-of-concept code for this CVE as of its last assessment.
Exploitation and automatability from CISA’s SSVC triage for GHSA-fqx8-v33p-4qcc.
EPSS Exploitation Probability
Probability of exploitation in the next 30 days, from FIRST.org EPSS.
How urgent is this, really
Where this sits among everything scored
Real-World Exposure
enshrined/svg-sanitizeReal-time download stats are indexed for npm and PyPI packages. This vulnerability affects Packagist packages — download data is not available via public APIs for these ecosystems.
Description
Impact
SVG sanitizer library before version 0.15.0 did not remove HTML elements wrapped in a CDATA section. As a result, SVG content embedded in HTML (fetched as text/html) was susceptible to cross-site scripting. Plain SVG files (fetched as image/svg+xml) were not affected.
Patches
This issue is fixed in 0.15.0 and higher.
Workarounds
There is currently no workaround available without upgrading.
For more information
If you have any questions or comments about this advisory:
- Open an issue in Github
- Email us at [email protected]
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 🐘Packagist | enshrined/svg-sanitize | all versions | 0.15.0composer require enshrined/svg-sanitize:^0.15.0 |
Affected Products
svg-sanitizersvg-sanitizer_projectDetection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for enshrined/svg-sanitize, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update enshrined/svg-sanitize to 0.15.0 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-fqx8-v33p-4qcc is resolved across your whole dependency graph.
Workarounds
Escape or sanitise the affected output on the server side rather than relying on client-side filtering, and add a Content-Security-Policy that blocks inline script execution so injected markup cannot run even if it reaches the page.
Frequently Asked Questions
Is GHSA-fqx8-v33p-4qcc in your dependencies?
Find it across Packagist, including transitive dependencies.