KeygraphLabs · CVE MCP

CVE-2018-8048 · mitre

CVE-2018-8048

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.

Published 2018-03-27, last changed 2026-06-17. Weakness: CWE-79.

CVSS
6.1
medium, from NVD
EPSS
1.93%
percentile 80.7%, chance of exploitation in 30 days
Exploitation
None known
no KEV listing or public exploit in our indexes

How to fix

Upgrade to a fixed version: loofah 2.2.1 (RubyGems); nokogiri 1.8.3 (RubyGems). For the version that clears every advisory for your installed version, ask an agent for get_remediation.

Where the flaw is in the code

Fixed in flavorjones/loofah by 7541374548, f739cf8eac. Functions changed by the fix: scrub_attributes, scrub_css, force_correct_attribute_escaping!. Regression tests: test/integration/test_ad_hoc.rb. Confidence: verified (a record names this commit as the fix, and it changed these functions).

Timeline

2018-03-21Package advisory GHSA-x7rv-cr6v-4vm4
2018-03-27Published
2026-06-17Record last changed
2026-11-30EPSS when our history starts: 1.93%
2026-12-02Code-level analysis added

Affected packages

AdvisoryPackageFixed in
GHSA-x7rv-cr6v-4vm4loofah (RubyGems)2.2.1
GHSA-x7rv-cr6v-4vm4nokogiri (RubyGems)1.8.3

Also known as: GHSA-x7rv-cr6v-4vm4

Related

CVEPublishedCVSSSummary
CVE-2026-1262092026-11-125.3Loofah allowed_uri? treats javascript&#x3a alert(1) as safe
CVE-2026-1262082026-11-124.7Loofah: SVG ` ` and ` ` bypass local-reference restriction
CVE-2026-1262072026-11-124.7Loofah: CSS url() sanitization bypass via escaped parentheses
CVE-2026-1262062026-11-125.3Loofah allowed_uri? treats data:text/html as safe text/plain
CVE-2026-1262052026-11-125.3Loofah: Regular expression denial of service in the SVG local-reference check
CVE-2026-1262032026-11-126.1Loofah: Mutation XSS in the HTML5 scrubbers through unescaped attribute values
CVE-2026-734922026-08-122.3Loofah `allowed_uri?` does not detect `javascript:` URIs split by numeric character references without semicolons
CVE-2026-734912026-08-122.3Loofah `allowed_uri?` does not detect `javascript:` URIs split by named whitespace character references

Add it to your agent

One command for Claude Code; setup for Claude Desktop, Cursor and others. No signup or key.

claude mcp add --transport http keygraph-cve https://cve-mcp.keygraph.io/mcp

Then ask for triage_cve CVE-2018-8048, or call /api/v1/vulnerabilities/CVE-2018-8048. To prove whether it is exploitable in your running app, run Shannon, Keygraph's open-source AI pentester.

NVD · CVE.org