CVE-2018-16468 Loofah Cross-site Scripting vulnerability

Medium 5.4 Published Updated

Attackers can inject malicious JavaScript into sanitized output via crafted SVG elements, leading to XSS in applications using the Loofah 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-2018-16468?

CVE-2018-16468 is a medium-severity cross-site scripting vulnerability in Debian Debian Linux, published on 30 Oct 2018. 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.2.2, unsanitized JavaScript may occur in sanitized output when a crafted SVG element is republished.

Weakness: CWE-79

Which versions are affected by CVE-2018-16468?

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

PackageAffectedFixed in
loofah RubyGemsAll versions2.2.3
loofah RubyGemsAll versions2.2.3
Linux distribution packages (1)
rubygem-loofah SUSE:Linux Enterprise High Availability Extension 15All versions2.2.2-4.3.1

Products include Debian Debian Linux, Loofah Project Loofah.

How do I fix CVE-2018-16468?

Upgrade loofah to 2.2.3 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-2018-16468 being exploited?

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

All Debian Debian Linux vulnerabilities

Sources

Also known as DEBIAN-CVE-2018-16468, DSA-4364-1, GHSA-g4xq-jx4w-4cjv, SUSE-SU-2018:3928-1, UBUNTU-CVE-2018-16468.

Is CVE-2018-16468 in your software?

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

Check your SBOMs for free