Advisory Database
  • Advisories
  • Dependency Scanning
  1. gem
  2. ›
  3. sanitize
  4. ›
  5. CVE-2020-4054

CVE-2020-4054: Cross-site Scripting

June 16, 2020 (updated September 28, 2020)

In Sanitize (RubyGem sanitize) 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.

References

  • nvd.nist.gov/vuln/detail/CVE-2020-4054

Code Behaviors & Features

Detect and mitigate CVE-2020-4054 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Dependency Scanning using SBOM also detects vulnerabilities from proprietary advisories that this site does not include. Learn more about Dependency Scanning using SBOM →

Affected versions

All versions starting from 3.0.0 before 5.2.1

Fixed versions

  • 5.2.1

Solution

Upgrade to version 5.2.1 or above.

Impact 7.3 HIGH

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L

Learn more about CVSS

Weakness

  • CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')

Source file

gem/sanitize/CVE-2020-4054.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Sun, 08 Nov 2026 00:16:01 +0000.