CVE-2023-36823Sanitize vulnerable to Cross-site Scripting via insufficient neutralization of `style`…
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.
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
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.
| Release | Package | Status | Fixed version | Advisory |
|---|---|---|---|---|
| Ubuntu 22.04 | ruby-sanitize | Fixed | 6.0.0-1ubuntu0.1 | UBUNTU-CVE-2023-36823 |
| Ubuntu 20.04 | ruby-sanitize | Fixed | 4.6.6-2.1~0.20.04.2 | UBUNTU-CVE-2023-36823 |
| Ubuntu 18.04 | ruby-sanitize | Fix pending | ||
| Ubuntu 16.04 | ruby-sanitize | Fix pending | ||
| Debian 14 | ruby-sanitize | Fixed | 6.0.2-1 | DEBIAN-CVE-2023-36823 |
| Debian 13 | ruby-sanitize | Fixed | 6.0.2-1 | DEBIAN-CVE-2023-36823 |
| Debian 12 | ruby-sanitize | Fixed | 6.0.0-1.1+deb12u1 | DEBIAN-CVE-2023-36823 |
| RubyGems library | sanitize | Fixed | 6.0.2 | GHSA-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.
- rgrove sanitize: affected: >= 3.0.0, < 6.0.2
References
- https://github.com/rgrove/sanitize/security/advisories/GHSA-f5ww-cq3m-q3g7
- https://github.com/rgrove/sanitize/commit/76ed46e6dc70820f38efe27de8dabd54dddb5220
- https://github.com/rgrove/sanitize/releases/tag/v6.0.2
- https://lists.debian.org/debian-lts-announce/2023/11/msg00008.html
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.