cve.bz

CVE-2018-8048 Cross-site Scripting

6.1 mediumEPSS 1.9%Fix available

Medium (6.1). EPSS 1.9% estimated probability of exploitation activity in the next 30 days. Fixed in loofah 2.2.1.

On this page
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.

Severity

CVSS 3.0

6.1 medium
CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
EPSS
1.9% (unchanged from 1.9% a week ago; 1.9% 30 days ago) estimated probability of exploitation activity in the next 30 days; 80th percentile. Scored 2026-11-22. A forecast for this CVE across the internet, not for your own systems.
CWE
CWE-79 Improper Neutralization of Input During Web Page Generation (Cross-site Scripting)
OWASP Top 10
A05:2025 Injection
Published
Modified
NVD analysis
Analyzed, since modified
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2018-8048 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2018-8048?via=ask-ai-copy and https://cve.bz/cve/CVE-2018-8048?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2018-8048 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Affected

Versions

From the NVD's CPE matches.

ProductAffected
debian:debian_linux9.0
loofah_project:loofahbefore 2.2.1

Packages (OSV)

AdvisoryEcosystemPackageAffectedFixed in
GHSA-x7rv-cr6v-4vm4RubyGemsloofah<2.2.12.2.1
GHSA-x7rv-cr6v-4vm4RubyGemsnokogiri<1.8.31.8.3

Linux distributions

DistributionReleasePackageFixed inAdvisory
Debian9ruby-loofah2.0.3-2+deb9u1DSA-4171-1
Debian12, 13, 14ruby-loofah2.2.1-1DEBIAN-CVE-2018-8048
Red Hatcloudforms_managementengine:5.10::el7ansible-runner0:1.1.2-2.el7arRHSA-2019:0212
Red Hatcloudforms_managementengine:5.10::el7ansible-tower, ansible-tower-ui, ansible-tower-setup and 3 more0:3.3.3-1.el7atRHSA-2019:0212
Red Hatcloudforms_managementengine:5.10::el7bubblewrap, bubblewrap-debuginfo0:0.1.7-1.el7RHSA-2019:0212
Red Hatcloudforms_managementengine:5.10::el7cfme, cfme-gemset, cfme-appliance and 6 more0:5.10.0.33-1.el7cfRHSA-2019:0212
Red Hatcloudforms_managementengine:5.10::el7dbus-api-service0:1.0.1-5.el7cfRHSA-2019:0212
Red Hatcloudforms_managementengine:5.10::el7dumb-init, dumb-init-debuginfo0:1.2.0-1.el7cfRHSA-2019:0212
Red Hatcloudforms_managementengine:5.10::el7erlang, erlang-et, erlang-gs and 49 more0:19.3.6.7-1.el7atRHSA-2019:0212
Red Hatcloudforms_managementengine:5.10::el7google-config, google-compute-engine0:2.0.0-2.el7cfRHSA-2019:0212
Red Hatcloudforms_managementengine:5.10::el7httpd-configmap-generator0:0.2.2-2.el7cfRHSA-2019:0212
Red Hatcloudforms_managementengine:5.10::el7nginx, nginx-mod-mail, nginx-debuginfo and 7 more1:1.10.2-1.el7atRHSA-2019:0212
Red Hatcloudforms_managementengine:5.10::el7ovirt-ansible-infra, ovirt-ansible-image-template, ovirt-ansible-cluster-upgrade0:1.1.8-1.el7evRHSA-2019:0212
Red Hatcloudforms_managementengine:5.10::el7ovirt-ansible-manageiq0:1.1.12-1.el7evRHSA-2019:0212
69 more for Red Hat in the JSON and on Red Hat's page.
SUSEEnterprise Storage 4, OpenStack Cloud 7, OpenStack Cloud Crowbar 8rubygem-loofah2.0.2-3.5.1SUSE-SU-2019:0394-1
SUSEEnterprise Storage 4, OpenStack Cloud 7, OpenStack Cloud Crowbar 8 and 1 morerubygem-loofah2.0.2-3.8.1SUSE-SU-2019:2209-1
SUSEOpenStack Cloud Crowbar 8, OpenStack Cloud Crowbar 9rubygem-loofah2.0.2-3.11.1SUSE-SU-2022:4075-1
openSUSETumbleweedruby3.2-rubygem-loofah2.19.1-1.2openSUSE-SU-2024:13162-1
openSUSETumbleweedruby3.2-rubygem-nokogiri1.13.9-1.7openSUSE-SU-2024:13165-1
openSUSETumbleweedrubygem-loofah2.14.0-1.1openSUSE-SU-2024:11900-1
openSUSETumbleweedrubygem-loofah2.22.0-1.5openSUSE-SU-2024:14171-1
openSUSETumbleweedrubygem-loofah2.23.1-1.3openSUSE-SU-2025:15120-1
openSUSETumbleweedrubygem-loofah2.23.1-1.5openSUSE-SU-2026:10353-1
openSUSETumbleweedrubygem-nokogiri1.13.3-1.1openSUSE-SU-2024:11912-1
openSUSETumbleweedrubygem-nokogiri1.15.5-1.5openSUSE-SU-2024:14174-1
openSUSETumbleweedrubygem-nokogiri1.18.2-1.1openSUSE-SU-2025:14697-1
openSUSETumbleweedrubygem-nokogiri1.18.9-1.4openSUSE-SU-2026:10356-1

From the distributions' data via OSV.dev: the Debian Security Tracker; Red Hat Security Data © Red Hat, Inc., CC BY 4.0; SUSE security data, CC BY 4.0. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Debian · Red Hat · SUSE · openSUSE.

Red Hat

Red Hat rates this Moderate.

Red Hat's statement

This issue affects the versions of rubygem-loofah as shipped with Red Hat CloudForms 4. Red Hat Product Security has rated this issue as having a security impact of Moderate. This vulnerability won't be fixed on CloudForms 4, because it uses libxml 2.9.1 and since the vulnerability requires a libxml >= 2.9.2 in order to be exploitable. For additional information, refer to the Issue Severity Classification: https://access.redhat.com/security/updates/classification/

ProductPackageStateAdvisory
CloudForms Management Engine 5.10ansible-runner-0:1.1.2-2.el7arFixed 2019-02-07RHSA-2019:0212
CloudForms Management Engine 5.10ansible-tower-0:3.3.3-1.el7atFixed 2019-02-07RHSA-2019:0212
CloudForms Management Engine 5.10bubblewrap-0:0.1.7-1.el7Fixed 2019-02-07RHSA-2019:0212
CloudForms Management Engine 5.10cfme-0:5.10.0.33-1.el7cfFixed 2019-02-07RHSA-2019:0212
CloudForms Management Engine 5.10cfme-amazon-smartstate-0:5.10.0.33-1.el7cfFixed 2019-02-07RHSA-2019:0212
CloudForms Management Engine 5.10cfme-appliance-0:5.10.0.33-1.el7cfFixed 2019-02-07RHSA-2019:0212
CloudForms Management Engine 5.10cfme-gemset-0:5.10.0.33-1.el7cfFixed 2019-02-07RHSA-2019:0212
CloudForms Management Engine 5.10dbus-api-service-0:1.0.1-5.el7cfFixed 2019-02-07RHSA-2019:0212
CloudForms Management Engine 5.10dumb-init-0:1.2.0-1.el7cfFixed 2019-02-07RHSA-2019:0212
CloudForms Management Engine 5.10erlang-0:19.3.6.7-1.el7atFixed 2019-02-07RHSA-2019:0212
CloudForms Management Engine 5.10google-compute-engine-0:2.0.0-2.el7cfFixed 2019-02-07RHSA-2019:0212
CloudForms Management Engine 5.10google-config-0:2.0.0-2.el7cfFixed 2019-02-07RHSA-2019:0212
CloudForms Management Engine 5.10httpd-configmap-generator-0:0.2.2-2.el7cfFixed 2019-02-07RHSA-2019:0212
CloudForms Management Engine 5.10nginx-1:1.10.2-1.el7atFixed 2019-02-07RHSA-2019:0212
CloudForms Management Engine 5.10ovirt-ansible-cluster-upgrade-0:1.1.8-1.el7evFixed 2019-02-07RHSA-2019:0212
CloudForms Management Engine 5.10ovirt-ansible-disaster-recovery-0:1.1.2-1.el7evFixed 2019-02-07RHSA-2019:0212
CloudForms Management Engine 5.10ovirt-ansible-engine-setup-0:1.1.5-1.el7evFixed 2019-02-07RHSA-2019:0212
CloudForms Management Engine 5.10ovirt-ansible-image-template-0:1.1.8-1.el7evFixed 2019-02-07RHSA-2019:0212
Red Hat Software Collectionsrh-ror42-rubygem-loofahNot affected
Red Hat Software Collectionsrh-ror50-rubygem-loofahNot affected
58 more in the JSON and on Red Hat's page.

Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2018-8048.

Attack patterns (CAPEC)

  • CAPEC-63 Cross-Site Scripting (XSS) Likelihood: High · Severity: Very High
  • CAPEC-85 AJAX Footprinting Likelihood: High · Severity: Low
  • CAPEC-209 XSS Using MIME Type Mismatch Severity: Medium
  • CAPEC-588 DOM-Based XSS Likelihood: High · Severity: Very High
  • CAPEC-591 Reflected XSS Likelihood: High · Severity: Very High
  • CAPEC-592 Stored XSS Likelihood: High · Severity: Very High

The attack patterns MITRE's CAPEC relates to this record's weaknesses, as MITRE names them. Credits.

References

Check your stackJSON