CVE-2018-8048 Cross-site Scripting in loofah

Medium 6.1 Published Updated

Attackers can inject malicious scripts into sanitized HTML output via non-whitelisted attributes, potentially leading to cross-site scripting attacks.

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-2018-8048?

CVE-2018-8048 is a medium-severity cross-site scripting vulnerability in Debian Debian Linux, published on 27 Mar 2018. 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

In the Loofah gem through 2.2.0 for Ruby, non-whitelisted HTML attributes may occur in sanitized output by republishing a crafted HTML fragment.

Weakness: CWE-79

Which versions are affected by CVE-2018-8048?

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

PackageAffectedFixed in
loofah RubyGemsAll versions2.2.1
loofah RubyGemsAll versions2.2.1
nokogiri RubyGemsAll versions1.8.3
nokogiri RubyGemsAll versions1.8.3
Linux distribution packages (4)
rubygem-loofah SUSE:Enterprise Storage 4All versions2.0.2-3.8.1
rubygem-loofah SUSE:OpenStack Cloud 7All versions2.0.2-3.8.1
rubygem-loofah SUSE:OpenStack Cloud Crowbar 8All versions2.0.2-3.8.1
rubygem-loofah SUSE:OpenStack Cloud Crowbar 9All versions2.0.2-3.8.1

Products include Debian Debian Linux, Loofah Project Loofah.

How do I fix CVE-2018-8048?

Upgrade loofah to 2.2.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-2018-8048 being exploited?

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

All Debian Debian Linux vulnerabilities

Sources

Also known as DEBIAN-CVE-2018-8048, DSA-4171-1, GHSA-x7rv-cr6v-4vm4, SUSE-SU-2019:2209-1.

Is CVE-2018-8048 in your software?

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

Check your SBOMs for free