CVE-2018-8048 Cross-site Scripting in loofah
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.
| Package | Affected | Fixed in |
|---|---|---|
loofah RubyGems | All versions | 2.2.1 |
loofah RubyGems | All versions | 2.2.1 |
nokogiri RubyGems | All versions | 1.8.3 |
nokogiri RubyGems | All versions | 1.8.3 |
Linux distribution packages (4)
rubygem-loofah SUSE:Enterprise Storage 4 | All versions | 2.0.2-3.8.1 |
rubygem-loofah SUSE:OpenStack Cloud 7 | All versions | 2.0.2-3.8.1 |
rubygem-loofah SUSE:OpenStack Cloud Crowbar 8 | All versions | 2.0.2-3.8.1 |
rubygem-loofah SUSE:OpenStack Cloud Crowbar 9 | All versions | 2.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.
Other vulnerabilities in Debian Debian Linux
Sources
Also known as DEBIAN-CVE-2018-8048, DSA-4171-1, GHSA-x7rv-cr6v-4vm4, SUSE-SU-2019:2209-1.