CVE-2023-36823Sanitize Project Sanitize
Medium 6.1 No auth needed
Follow: this CVE · Sanitize Project · Sanitize Project Sanitize We alert you by email or Slack (account required).
- Priority
- 52
- CVSS 3.1
- 6.1
- EPSS
- 0.7% probability of exploitation in 30 days · percentile 50
- Auth required
- No
- Published
- Jul 6, 2023
- Updated
- Jun 17, 2026
- Category
- Application · Cross-platform
- Weakness (CWE)
- CWE-79
- Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
What happens
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
- Apply the vendor's security update for Sanitize.
- It can be exploited without authentication: if you cannot patch now, restrict Internet access to the affected service.
Affected packages
| Ecosystem | Package | Affected versions | Fixed in | How to upgrade |
|---|---|---|---|---|
| RubyGems | sanitize |
≥ 3.0.0 < 6.0.2 |
6.0.2 |
gem "sanitize", ">= 6.0.2" |
Per OSV / GitHub Advisories (GHSA-f5ww-cq3m-q3g7). Check the version in your lockfile before upgrading.
Affected products (CPE)
| Vendor | Product | Versions |
|---|---|---|
| sanitize_project | sanitize | ≥ 3.0.0 < 6.0.2 |
| debian | debian_linux | 10.0 |
Official sources
References
Links published by the sources. Open them with care.
- github.com Patch
- github.com Release Notes
- github.com Vendor Advisory
- lists.debian.org Mailing List