{"cve":"CVE-2020-4054","nvd":{"published":"2020-06-16T22:15:10.693","modified":"2026-06-17T03:19:30.063","status":"Modified","description":"In Sanitize (RubyGem sanitize) greater than or equal to 3.0.0 and less than 5.2.1, there is a cross-site scripting vulnerability. When HTML is sanitized using Sanitize's \"relaxed\" config, or a custom config that allows certain elements, some content in a math or svg element may not be sanitized correctly even if math and svg are not in the allowlist. You are likely to be vulnerable to this issue if you use Sanitize's relaxed config or a custom config that allows one or more of the following HTML elements: iframe, math, noembed, noframes, noscript, plaintext, script, style, svg, xmp. Using carefully crafted input, an attacker may be able to sneak arbitrary HTML through Sanitize, potentially resulting in XSS (cross-site scripting) or other undesired behavior when that HTML is rendered in a browser. This has been fixed in 5.2.1.","cvss_v4":null,"cvss_v3":{"version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L","score":7.3},"cwes":["CWE-79"],"references":["https://github.com/rgrove/sanitize/commit/a11498de9e283cd457b35ee252983662f7452aa9","https://github.com/rgrove/sanitize/releases/tag/v5.2.1","https://github.com/rgrove/sanitize/security/advisories/GHSA-p4x4-rw2p-8j8m","https://usn.ubuntu.com/4543-1/","https://www.debian.org/security/2020/dsa-4730"],"products":["sanitize_project:sanitize"],"source":"nvd","synced_at":"2026-10-19T21:05:42.039641217+00:00"},"epss":{"cve":"CVE-2020-4054","score":0.0187,"percentile":0.79352,"date":"2026-10-31"},"kev":null,"osv":[{"id":"GHSA-p4x4-rw2p-8j8m","url":"https://osv.dev/vulnerability/GHSA-p4x4-rw2p-8j8m","summary":"Cross-site Scripting in Sanitize ","modified":"2026-07-08T06:29:13.144817987Z","packages":[{"ecosystem":"RubyGems","name":"sanitize","purl":"pkg:gem/sanitize","ranges":[">=3.0.0 <5.2.1"],"fixed":["5.2.1"]}]}],"attribution":["This product uses the NVD API but is not endorsed or certified by the NVD.","EPSS scores: FIRST Exploit Prediction Scoring System, https://www.first.org/epss","Known exploited vulnerabilities: CISA Known Exploited Vulnerabilities Catalog, https://www.cisa.gov/known-exploited-vulnerabilities-catalog","Package advisories: OSV (https://osv.dev), from the GitHub Advisory Database, PyPA, Go, RustSec and other ecosystem databases, under CC-BY 4.0 or CC0","CVE records: the CVE Program's CVE List (https://www.cve.org), under its terms of use (https://www.cve.org/Legal/TermsOfUse). CVE is a registered trademark of The MITRE Corporation; this product is not affiliated with the CVE Program."]}