CVE-2023-49146 Cross-site Scripting in DOMSanitizer

Medium 6.1 Published Updated

An attacker can execute arbitrary scripts via crafted SVG documents due to improper sanitization in the DOMSanitizer library.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
A user has to click or open something
Fix
Available

What is CVE-2023-49146?

CVE-2023-49146 is a medium-severity cross-site scripting vulnerability in n/a, published on 22 Nov 2023. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.

Official description

DOMSanitizer (aka dom-sanitizer) before 1.0.7 allows XSS via an SVG document because of mishandling of comments and greedy regular expressions.

Weakness: CWE-79

Which versions are affected by CVE-2023-49146?

2 open source packages ship an affected version, including rhukster/dom-sanitizer. It affects 1 product.

PackageAffectedFixed in
rhukster/dom-sanitizer PackagistAll versions1.0.7
rhukster/dom-sanitizer PackagistAll versions1.0.7

Products include Getgrav Dom-Sanitizer.

How do I fix CVE-2023-49146?

Upgrade rhukster/dom-sanitizer to 1.0.7 or later.

Escape output for the context it lands in and set a strict Content Security Policy. Upgrading the affected component is the real fix. More about Cross-site scripting.

Is CVE-2023-49146 being exploited?

There is no known exploitation of CVE-2023-49146 in the wild and no public exploit code.

Sources

Also known as GHSA-2ghm-r75j-pjx2.

Is CVE-2023-49146 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free