CVE-2023-22461
What it is
The `sanitize-svg` package, a small SVG sanitizer to prevent cross-site scripting attacks, uses a deny-list-pattern to sanitize SVGs to prevent XSS. In doing so, literal `<script>`-tags and on-event handlers were detected in versions prior to 0.4.0. As a result, downstream software that relies on `sanitize-svg` and expects resulting SVGs to be safe, may be vulnerable to cross-site scripting. This vulnerability was addressed in v0.4.0. There are no known workarounds
At a glance
- Exploitability
- Can be exploited over the network with a low-privilege account, but needs a user to act. High risk of data exposure.
- Exploit odds
- 0.6% chance of exploitation in the next 30 days (EPSS).
- Fix
- A patch, advisory or fixed version is referenced. Upgrade or apply it.
Timeline
- PublishedDisclosed publicly on CVE.org and NVD
- Last updatedMost recent change to the record
Why it ranks here
- Exploited in the wild: no, CISA does not list it.
- Exploit odds: 0.6% in the next 30 days (EPSS).
- Severity: 7.6 HIGH (CVSS).
- Fix: a patch or advisory is linked.
Details
- Published
- Last modified
- Exploit probability
- 0.6% · EPSS, next 30 days
- Weakness
- CWE-79 · Cross-site scripting
- Record status
- Modified
Affected
- sanitize-svg Project sanitize-svg < 0.4.0
Attack profile CVSS 3.1 · 7.6
- Attack vector
- Network
- Complexity
- Low
- Privileges needed
- Low
- User interaction
- Required
- Scope
- Changed
- Confidentiality
- High
- Integrity
- Low
- Availability
- None
Raw vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:L/A:N
Is it in your code?
Hand this to your coding agent. It searches your project for the affected products and checks versions. Nothing leaves your machine.
Read https://cve-list.com/agent/cve/CVE-2023-22461.md and follow it. Check whether this project is affected by CVE-2023-22461. Read only. Don't change anything and don't upload my code. Tell me yes, no or not sure, with the file as proof.
Fix and advisories
- https://github.com/mattkrick/sanitize-svg/commit/b107e453ede7b58adcccae74a3e474c012eec85d
- https://github.com/mattkrick/sanitize-svg/security/advisories/GHSA-h857-2g56-468g
- https://github.com/mattkrick/sanitize-svg/commit/b107e453ede7b58adcccae74a3e474c012eec85d
- https://github.com/mattkrick/sanitize-svg/security/advisories/GHSA-h857-2g56-468g
References
- https://github.com/mattkrick/sanitize-svg/commit/b107e453ede7b58adcccae74a3e474c012eec85d
- https://github.com/mattkrick/sanitize-svg/security/advisories/GHSA-h857-2g56-468g
- https://github.com/mattkrick/sanitize-svg/commit/b107e453ede7b58adcccae74a3e474c012eec85d
- https://github.com/mattkrick/sanitize-svg/security/advisories/GHSA-h857-2g56-468g