CVE-2019-15587 Loofah Allows Cross-site Scripting

Medium 5.4 Published Updated

Attackers can inject malicious JavaScript into sanitized output via crafted SVG elements in the Loofah Ruby gem.

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

What is CVE-2019-15587?

CVE-2019-15587 is a medium-severity cross-site scripting vulnerability in Canonical Ubuntu Linux, published on 22 Oct 2019. Any signed-in user can exploit it over the network, and only if a user opens a file or follows a link.

Official description

In the Loofah gem for Ruby through v2.3.0 unsanitized JavaScript may occur in sanitized output when a crafted SVG element is republished.

Weakness: CWE-79

Which versions are affected by CVE-2019-15587?

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

PackageAffectedFixed in
loofah RubyGemsAll versions2.3.1
loofah RubyGemsAll versions2.3.1
Linux distribution packages (7)
rubygem-loofah SUSE:Linux Enterprise High Availability Extension 15All versions2.2.2-150000.4.6.1
rubygem-loofah SUSE:Linux Enterprise High Availability Extension 15 SP1All versions2.2.2-150000.4.6.1
rubygem-loofah SUSE:Linux Enterprise High Availability Extension 15 SP2All versions2.2.2-150000.4.6.1
rubygem-loofah SUSE:Linux Enterprise High Availability Extension 15 SP3All versions2.2.2-150000.4.6.1
rubygem-loofah SUSE:Linux Enterprise High Availability Extension 15 SP4All versions2.2.2-150000.4.6.1
rubygem-loofah openSUSE:Leap 15.3All versions2.2.2-150000.4.6.1
rubygem-loofah openSUSE:Leap 15.4All versions2.2.2-150000.4.6.1

Products include Canonical Ubuntu Linux, Debian Debian Linux, Fedoraproject Fedora, Loofah Project Loofah.

How do I fix CVE-2019-15587?

Upgrade loofah to 2.3.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-15587 being exploited?

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

All Canonical Ubuntu Linux vulnerabilities

Sources

Also known as DEBIAN-CVE-2019-15587, DSA-4554-1, GHSA-c3gv-9cxf-6f57, SUSE-SU-2022:3868-1, UBUNTU-CVE-2019-15587, USN-4498-1.

Is CVE-2019-15587 in your software?

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

Check your SBOMs for free