CVEfocus › CVE database › CVE-2023-23627

CVE-2023-23627Sanitize vulnerable to Cross-site Scripting via Improper neutralization of `noscript`…

CVSS 6.1 MediumEPSS 0.6% (higher than 41% of CVEs)Published 2023-01-27Updated 2025-03-10Assigner: GitHub_M

Sanitize is an allowlist-based HTML and CSS sanitizer. Versions 5.0.0 and later, prior to 6.0.1, are vulnerable to Cross-site Scripting. When Sanitize is configured with a custom allowlist that allows `noscript` elements, attackers are able to include arbitrary HTML, resulting in XSS (cross-site scripting) or other undesired behavior when that HTML is rendered in a browser. The default configurations do not allow `noscript` elements and are not vulnerable. This issue only affects users who are using a custom config that adds `noscript` to the element allowlist. This issue has been patched in version 6.0.1. Users who are unable to upgrade can prevent this issue by using one of Sanitize's default configs or by ensuring that their custom config does not include `noscript` in the element allowlist.

CWE-79

What to do

Fixed builds are available from Debian, RubyGems, Ubuntu: see the table below for the fixed version per release.

Ubuntu has not shipped a fix for every release yet.

Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.

curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \
  -H "Content-Type: text/plain" --data-binary @inventory.txt

Vendor status at a glance

6Fixed
2Fix pending

Status by vendor and release

From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.

ReleasePackageStatusFixed versionAdvisory
Ubuntu 22.04ruby-sanitizeFixed6.0.0-1ubuntu0.1UBUNTU-CVE-2023-23627
Ubuntu 20.04ruby-sanitizeFixed4.6.6-2.1~0.20.04.2UBUNTU-CVE-2023-23627
Ubuntu 18.04ruby-sanitizeFix pending
Ubuntu 16.04ruby-sanitizeFix pending
Debian 14ruby-sanitizeFixed6.0.0-1.1DEBIAN-CVE-2023-23627
Debian 13ruby-sanitizeFixed6.0.0-1.1DEBIAN-CVE-2023-23627
Debian 12ruby-sanitizeFixed6.0.0-1.1DEBIAN-CVE-2023-23627
RubyGems librarysanitizeFixed6.0.1GHSA-fw3g-2h3j-qmm7

What the vendor says

As published in the CVE record by GitHub_M, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.

References

About this page

Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.