CVE-2023-36823

Sanitize vulnerable to Cross-site Scripting via insufficient neutralization of `style` element content

MEDIUM
6.1
CVSS Score
Published: July 6, 2023 at 03:06 PM UTC
Updated: June 17, 2026 at 06:07 AM UTC
3 products affected across 3 vendorsDebian LinuxSanitizeSanitize

Using sanitize by rgrove?

Get instant alerts when new vulnerabilities affect sanitize - before attackers find them.

Real-time alertsTrack your software stackFree plan available
Severity
MEDIUM6.1
Exploit prediction
EPSS 0.7%

Description

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.

Affected

Our own answer: ranges merged, affected separated from platform-only, with confidence and review flags.

3.0.0 ≤ v < 6.0.2
Affected range stops below 6.0.2, so it looks safe — our inference, not a vendor statement
v < 6.0.2
Affected range stops below 6.0.2, so it looks safe — our inference, not a vendor statement

Remediation

No guide yet

No remediation guidance has been written for this CVE yet. What the record does show:

CVSS

Attack Vector
NETWORK
Complexity
LOW
Privileges
NONE
User Interaction
REQUIRED
Scope
CHANGED
Confidentiality
LOW
Integrity
LOW
Availability
NONE
Vector?

Quick Info

StatusMODIFIED
CWE
CWE-79

Get alerted

Stop reading CVE feeds looking for your own stack

Track the products you run and VulnTracker tells you when a new CVE affects them — with what is known about fixing it, and nothing about the rest.

Free plan, no card