Skip to content

Cross-site Scripting in enshrined/svg-sanitize

Moderate severity GitHub Reviewed Published Feb 13, 2022 in darylldoyle/svg-sanitizer • Updated Feb 5, 2024

Package

composer enshrined/svg-sanitize (Composer)

Affected versions

< 0.15.0

Patched versions

0.15.0

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:

References

@darylldoyle darylldoyle published to darylldoyle/svg-sanitizer Feb 13, 2022
Published by the National Vulnerability Database Feb 14, 2022
Published to the GitHub Advisory Database Feb 14, 2022
Reviewed Feb 14, 2022
Last updated Feb 5, 2024

Severity

Moderate
6.2
/ 10

CVSS base metrics

Attack vector
Local
Attack complexity
Low
Privileges required
None
User interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
None
Availability
High
CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

Weaknesses

CVE ID

CVE-2022-23638

GHSA ID

GHSA-fqx8-v33p-4qcc

Credits

Checking history
See something to contribute? Suggest improvements for this vulnerability.