PT-2023-18514 · Unknown · Svg-Sanitizer

Lauritzh

·

Published

2023-01-04

·

Updated

2023-01-10

·

CVE-2023-22461

CVSS v3.1

7.6

High

VectorAV:N/AC:L/PR:L/UI:R/S:C/C:H/I:L/A:N
Name of the Vulnerable Software and Affected Versions sanitize-svg versions prior to 0.4.0
Description The sanitize-svg package uses a deny-list-pattern to sanitize SVGs and prevent cross-site scripting attacks. However, literal <script>-tags and on-event handlers were detected in versions prior to 0.4.0, which may make downstream software that relies on sanitize-svg vulnerable to cross-site scripting. This issue can be exploited through various means, including the use of Anchor Tag and Foreign Object Tag in XML files, allowing for JavaScript embedding. At least one downstream project has been affected by this vulnerability.
Recommendations For versions prior to 0.4.0, update to version 0.4.0 to address the vulnerability. As a temporary workaround, consider disabling the use of sanitize-svg until the update is applied. Restrict access to SVG files sanitized by sanitize-svg to minimize the risk of exploitation. Avoid using the sanitize-svg package in sensitive applications until the issue is resolved.

Exploit

Fix

XSS

Found an issue in the description? Have something to add? Feel free to write us 👾

Weakness Enumeration

Related Identifiers

CVE-2023-22461
GHSA-H857-2G56-468G

Affected Products

Svg-Sanitizer