CVE-2019-10772 Sanitizer bypass in svg-sanitizer

Medium 6.1 Published Updated

Attackers can bypass sanitization via xlink:href attributes to inject malicious scripts, affecting applications using this PHP 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-2019-10772?

CVE-2019-10772 is a medium-severity cross-site scripting vulnerability in enshrined/svg-sanitize, published on 11 Dec 2019. 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

It is possible to bypass enshrined/svg-sanitize before 0.13.1 using the "xlink:href" attribute due to mishandling of the xlink namespace by the sanitizer.

Weakness: CWE-79

Which versions are affected by CVE-2019-10772?

2 open source packages ship an affected version, including enshrined/svg-sanitize. It affects 1 product.

PackageAffectedFixed in
enshrined/svg-sanitize PackagistAll versions0.13.1
enshrined/svg-sanitize PackagistAll versions0.13.1

Products include Svg-Sanitizer Project Svg-Sanitizer.

How do I fix CVE-2019-10772?

Upgrade enshrined/svg-sanitize to 0.13.1 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-2019-10772 being exploited?

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

Sources

Also known as GHSA-8rc5-hx3v-2jg7, SNYK-PHP-ENSHRINEDSVGSANITIZE-536969.

Is CVE-2019-10772 in your software?

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

Check your SBOMs for free