Skip to main content
No exploitation reportedFix available

CVE-2020-4054

No exploitation reported by the sources we read.

  • Published2020-06-16
  • Fixed in5.2.1
  • WeaknessCWE-79

Am I 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
  1. 2020-06-1622:15CVE publishedNVD

Observed activity

isMalicious corpus · updated 2026-10-23 18:48 UTC
Indicators tagged with this CVE, per day0 indicators over 7 days
Block 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
Sanitize project sanitize
BranchAffectedFixed in
5.2≥ 3.0.0, < 5.2.15.2.1

as publishedRanges as NVD and OSV publish them; a distribution’s build can be fixed under an older number.

Fix

  1. Update Sanitize project sanitize to 5.2.1

Advisories and patches

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?

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.

Is CVE-2020-4054 actively exploited?

Active exploitation of CVE-2020-4054 has not been confirmed. Its EPSS score was 1.9% on 2026-10-22, the estimated probability of exploitation in the next 30 days.

What is the CVSS score for CVE-2020-4054?

CVE-2020-4054 has a CVSS v3 base score of 7.3 (HIGH severity), with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L.

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