CVE-2022-23515 Improper neutralization of data URIs may allow XSS in Loofah

Medium 6.1 Published Updated

An attacker can execute arbitrary JavaScript in a victim's browser by exploiting improper handling of SVG data URIs in the Loofah 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-2022-23515?

CVE-2022-23515 is a medium-severity cross-site scripting vulnerability in Debian Debian Linux, published on 14 Dec 2022. 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

Loofah is a general library for manipulating and transforming HTML/XML documents and fragments, built on top of Nokogiri. Loofah >= 2.1.0, < 2.19.1 is vulnerable to cross-site scripting via the image/svg+xml media type in data URIs. This issue is patched in version 2.19.1.

Weakness: CWE-79

Which versions are affected by CVE-2022-23515?

2 open source packages ship an affected version, including loofah. It affects 2 products.

PackageAffectedFixed in
loofah RubyGemsFrom 2.1.02.19.1
loofah RubyGemsFrom 2.1.02.19.1

Products include Debian Debian Linux, Loofah Project Loofah.

How do I fix CVE-2022-23515?

Upgrade loofah to 2.19.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-2022-23515 being exploited?

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

All Debian Debian Linux vulnerabilities

Sources

Also known as DEBIAN-CVE-2022-23515, GHSA-228g-948r-83gx, UBUNTU-CVE-2022-23515.

Is CVE-2022-23515 in your software?

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

Check your SBOMs for free