CVE-2020-4054

Summary

CVECVE-2020-4054
StatePUBLIC
Assigner[email protected]
Source PriorityCVE Program / NVD first with legacy fallback
Published2020-06-16 22:15:00 UTC
Updated2020-09-28 20:15:00 UTC
DescriptionIn 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.

Risk And Classification

Problem Types: CWE-79

NVD Known Affected Configurations (CPE 2.3)

TypeVendorProductVersionUpdateEditionLanguage
Application Sanitize Project Sanitize All All All All
Application Sanitize Project Sanitize All All All All

References

ReferenceSourceLinkTags
HTML sanitization bypass in Sanitize · Advisory · rgrove/sanitize · GitHub CONFIRM github.com Third Party Advisory
Fix sanitization bypass in HTML foreign content · rgrove/sanitize@a11498d · GitHub MISC github.com Patch, Third Party Advisory
Release v5.2.1 · rgrove/sanitize · GitHub MISC github.com Release Notes, Third Party Advisory
Debian -- Security Information -- DSA-4730-1 ruby-sanitize DEBIAN www.debian.org
USN-4543-1: Sanitize vulnerability | Ubuntu security notices | Ubuntu UBUNTU usn.ubuntu.com
CVE Program record CVE.ORG www.cve.org canonical
NVD vulnerability detail NVD nvd.nist.gov canonical, analysis
© CVE.report 2026 |

Use of this information constitutes acceptance for use in an AS IS condition. There are NO warranties, implied or otherwise, with regard to this information or its use. Any use of this information is at the user's risk. It is the responsibility of user to evaluate the accuracy, completeness or usefulness of any information, opinion, advice or other content. EACH USER WILL BE SOLELY RESPONSIBLE FOR ANY consequences of his or her direct or indirect use of this web site. ALL WARRANTIES OF ANY KIND ARE EXPRESSLY DISCLAIMED. This site will NOT BE LIABLE FOR ANY DIRECT, INDIRECT or any other kind of loss.

CVE, CWE, and OVAL are registred trademarks of The MITRE Corporation and the authoritative source of CVE content is MITRE's CVE web site. This site includes MITRE data granted under the following license.

Free CVE JSON API cve.report/api

CVE.report and Source URL Uptime Status status.cve.report