CVEfocus › CVE database › CVE-2023-36823

CVE-2023-36823Sanitize vulnerable to Cross-site Scripting via insufficient neutralization of `style`…

CVSS 7.1 HighEPSS 0.7% (higher than 50% of CVEs)Published 2023-07-06Updated 2025-02-13Assigner: GitHub_M

Sanitize is an allowlist-based HTML and CSS sanitizer. Using carefully crafted input, an attacker may be able to sneak arbitrary HTML and CSS through Sanitize starting with version 3.0.0 and prior to version 6.0.2 when Sanitize is configured to use the built-in "relaxed" config or when using a custom config that allows `style` elements and one or more CSS at-rules. This could result in cross-site scripting or other undesired behavior when the malicious HTML and CSS are rendered in a browser. Sanitize 6.0.2 performs additional escaping of CSS in `style` element content, which fixes this issue. Users who are unable to upgrade can prevent this issue by using a Sanitize config that doesn't allow `style` elements, using a Sanitize config that doesn't allow CSS at-rules, or by manually escaping the character sequence `</` as `<\/` in `style` element content.

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-36823
Ubuntu 20.04ruby-sanitizeFixed4.6.6-2.1~0.20.04.2UBUNTU-CVE-2023-36823
Ubuntu 18.04ruby-sanitizeFix pending
Ubuntu 16.04ruby-sanitizeFix pending
Debian 14ruby-sanitizeFixed6.0.2-1DEBIAN-CVE-2023-36823
Debian 13ruby-sanitizeFixed6.0.2-1DEBIAN-CVE-2023-36823
Debian 12ruby-sanitizeFixed6.0.0-1.1+deb12u1DEBIAN-CVE-2023-36823
RubyGems librarysanitizeFixed6.0.2GHSA-f5ww-cq3m-q3g7

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.