CVE-2018-8048 json
Cross-site Scripting in loofah
published 2018-03-21 8 y ago modified 2026-06-17 4 mo ago also GHSA-x7rv-cr6v-4vm4 , EUVD-2018-0188
- cvss
- 6.1
- version 3.0, NVD
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 1.9%
- EPSS 1.9% chance of exploitation in 30 days, percentile 80%
- public exploits
- 0
- none known
Summary
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.
Patch / fix
- rubygems loofah 2.2.1
- rubygems nokogiri 1.8.3
- loofah_project loofah 2.2.1
- ruby-loofah Debian 14, Debian 13, Debian 12 2.2.1-1
debian advisories DEBIAN-CVE-2018-8048
- wmi cloudforms managementengine 5.10 1.3.14-7.el7cf
- cfme cloudforms managementengine 5.10 5.10.0.33-1.el7cf
- ruby cloudforms managementengine 5.10 2.4.5-90.el7cf
- smem cloudforms managementengine 5.10 1.4-1.el7cf
- nginx cloudforms managementengine 5.10 1:1.10.2-1.el7at
- erlang cloudforms managementengine 5.10 19.3.6.7-1.el7at
- prince cloudforms managementengine 5.10 9.0r2-10.el7cf
- wxGTK3 cloudforms managementengine 5.10 3.0.3-5.el7at
red hat advisories RHSA-2019:0212
- rubygem-loofah OpenStack Cloud Crowbar 9, OpenStack Cloud Crowbar 8 2.0.2-3.11.1
- rubygem-loofah OpenStack Cloud Crowbar 9, OpenStack Cloud Crowbar 8, OpenStack Cloud 7 +1 more 2.0.2-3.8.1
- rubygem-loofah OpenStack Cloud Crowbar 8, OpenStack Cloud 7, Enterprise Storage 4 2.0.2-3.5.1
suse advisories SUSE-SU-2022:4075-1SUSE-SU-2019:2209-1SUSE-SU-2019:0394-1
- rubygem-loofah openSUSE Tumbleweed 2.23.1-1.5
- rubygem-nokogiri openSUSE Tumbleweed 1.18.9-1.4
- rubygem-loofah openSUSE Tumbleweed 2.23.1-1.3
- rubygem-nokogiri openSUSE Tumbleweed 1.18.2-1.1
- rubygem-loofah openSUSE Tumbleweed 2.22.0-1.5
- rubygem-nokogiri openSUSE Tumbleweed 1.15.5-1.5
- rubygem-loofah openSUSE Tumbleweed 2.14.0-1.1
- rubygem-nokogiri openSUSE Tumbleweed 1.13.3-1.1
opensuse advisories openSUSE-SU-2026:10353-1openSUSE-SU-2026:10356-1openSUSE-SU-2025:15120-1openSUSE-SU-2025:14697-1openSUSE-SU-2024:14171-1openSUSE-SU-2024:14174-1
- github.com/flavorjones/loofah@f739cf8 commit
- github.com/sparklemotion/nokogiri#1746 pull request
Vendor advisories
What the vendors themselves say about their products: affected, fixed or not affected, and what to do.
red hat product security vex CVE-2018-8048 updated cvss 6.1
rubygem-loofah: XSS vulnerability due to unescaped comments within attributes by libxml2
-
Red Hat CloudForms Management Engine 5.10 smem 1.4-1.el7cf, wmi 1.3.14-7.el7cf, ruby 2.4.5-90.el7cf, nginx 1.10.2-1.el7at, wxGTK3 3.0.3-5.el7at, prince 9.0r2-10.el7cf, +179 morefixed: vendor fix RHSA-2019:0212
-
Red Hat Software Collections rh-ror42-rubygem-loofah, rh-ror50-rubygem-loofahnot affected: vulnerable code not present
Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf
Exploit prediction
1.93% chance of exploitation in the next 30 days, higher than 80% of all scored CVEs (FIRST EPSS, 2026-11-08).
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| NVD | 3.0 | 6.1 | CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N |
| NVD | 2.0 | 4.3 | AV:N/AC:M/Au:N/C:N/I:P/A:N |
| GitHub | 3.0 | 6.1 | CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| rubygems | loofah | <2.2.1 |
2.2.1 |
| rubygems | nokogiri | <1.8.3 |
1.8.3 |
Classification
- Weakness
-
- CWE-79 Improper Neutralization of Input During Web Page Generation
References
-
github.com
/sparklemotion/nokogiri/pull/1746
web
-
github.com
/flavorjones/loofah/commit/f739cf8eac5851f328b8044281d6653f74eff116
web
-
debian.org
/security/2018/dsa-4171
vendor-advisory, web, third-party-advisory
-
github.com
/flavorjones/loofah/issues/144
web, third-party-advisory
-
openwall.com
/lists/oss-security/2018/03/19/5
mailing-list, web, third-party-advisory
- security.netapp.com /advisory/ntap-20191122-0003/
-
nvd.nist.gov
/vuln/detail/CVE-2018-8048
advisory
-
github.com
/advisories/GHSA-x7rv-cr6v-4vm4
advisory
-
github.com
/flavorjones/loofah
web
-
github.com
/rubysec/ruby-advisory-db/blob/master/gems/loofah/CVE-2018-8048.yml
web
-
github.com
/rubysec/ruby-advisory-db/blob/master/gems/nokogiri/CVE-2018-8048.yml
web
-
security.netapp.com
/advisory/ntap-20191122-0003
web
Sources
- CVE List CVE-2018-8048
- GitHub Advisory GHSA-x7rv-cr6v-4vm4
- NVD CVE-2018-8048
Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.