KeygraphLabs · CVE MCP

CVE-2018-3740 · hackerone

CVE-2018-3740

A specially crafted HTML fragment can cause Sanitize gem for Ruby to allow non-whitelisted attributes to be used on a whitelisted HTML element.

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

CVSS
7.5
high, from NVD
EPSS
1.47%
percentile 74.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: sanitize 4.6.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 rgrove/sanitize by 01629a162e, 93feeb38e2. Functions changed by the fix: call. Regression tests: test/test_clean_element.rb, test/test_malicious_html.rb. Confidence: verified (a record names this commit as the fix, and it changed these functions).

Timeline

2018-03-21Package advisory GHSA-7f42-p84j-f58p
2018-03-30Published
2026-06-17Record last changed
2026-11-30EPSS when our history starts: 1.47%
2026-12-03Code-level analysis added

Affected packages

AdvisoryPackageFixed in
GHSA-7f42-p84j-f58psanitize (RubyGems)4.6.3

Also known as: GHSA-7f42-p84j-f58p

Related

CVEPublishedCVSSSummary
CVE-2023-368232023-07-066.1Sanitize vulnerable to Cross-site Scripting via insufficient neutralization of `style` element content
CVE-2023-236272023-01-286.1Sanitize vulnerable to Cross-site Scripting via Improper neutralization of `noscript` element
CVE-2020-40542020-06-167.3Cross-site Scripting in Sanitize
CVE-2026-1332112026-11-264.7same weakness (CWE-79, CWE-20) from the same CNA (hackerone)
CVE-2026-1332082026-11-266.1same weakness (CWE-79, CWE-20) from the same CNA (hackerone)
CVE-2026-1085652026-11-114.7same weakness (CWE-79, CWE-20) from the same CNA (hackerone)
CVE-2026-1085642026-11-114.7same weakness (CWE-79, CWE-20) from the same CNA (hackerone)
CVE-2026-1085622026-11-115.4same weakness (CWE-79, CWE-20) from the same CNA (hackerone)

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-3740, or call /api/v1/vulnerabilities/CVE-2018-3740. To prove whether it is exploitable in your running app, run Shannon, Keygraph's open-source AI pentester.

NVD · CVE.org