CVE-2020-4054
No exploitation reported by the sources we read.
- Published2020-06-16
- Fixed in5.2.1
- WeaknessCWE-79
Am I affected?
Debian, Ubuntu or Red Hat sometimes backport a fix without changing the upstream version number: such a version reads « to verify », never « affected ».With a domain, we read the version its public headers and pages expose. A distribution build can carry the fix under an older number.
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.
Timeline
dates in UTC- 2020-06-1622:15CVE publishedNVD
Observed activity
isMalicious corpus · updated 2026-10-23 18:48 UTCBlock these indicators
- Firewall list (EDL, text): https://api.ismalicious.com/edl/cve/CVE-2020-4054?format=txt
- CSV export: https://api.ismalicious.com/edl/cve/CVE-2020-4054?format=csv
- TAXII collection of exploited CVEs
- The EDL and CSV take an API key on the Pro plan.
Versions per branch
NVD| Branch | Affected | Fixed in | Source |
|---|---|---|---|
| 5.2 | ≥ 3.0.0, < 5.2.1 | 5.2.1 | NVD |
as publishedRanges as NVD and OSV publish them; a distribution’s build can be fixed under an older number.
Fix
- Update Sanitize project sanitize to 5.2.1
Advisories and patches
- github.comPatch
- github.comRelease Notes
Detection
- Nuclei template
- none so far ProjectDiscovery
- Exploit-DB
- no entry Exploit-DB
- Proof-of-concept repositories
- none listed PoC-in-GitHub
Sources
- CNACVSS 3.17.3read 2026-10-23
- NVDCVSS 3.17.3read 2026-10-23
- NVDCVSS 2.06.8read 2026-10-23
- CNAweakness (CWE)CWE-79read 2026-10-23
- FIRST EPSSEPSS score1.9 %2026-10-22
Technical details
- CVSS v3 Vector
- CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L
- Published
- 2020-06-16
- Last Modified
- 2026-06-17
- NVD status
- Modified
Frequently asked questions
What is CVE-2020-4054?
Is CVE-2020-4054 actively exploited?
What is the CVSS score for CVE-2020-4054?
Hear about the next vulnerability in your software
Surveillance reads the versions in your stack — a domain, a lockfile or a list — checks each CVE against the ranges its sources publish, and alerts you when one you run is exploited or enters CISA KEV. A version it cannot read stays « version not verified ».
No credit card required · No monthly cap on website lookups · 250 API requests/month
Go further
- Following what attackers exploit right now? The CISA KEV additions of the month, with their patch deadlines.
- Running this software? Vulnerability monitoring alerts you to new vulnerabilities in your products.
Related vulnerabilities
Same product first, then the same vendor advisory and the same publication week.