CVE-2023-23627

Sanitize vulnerable to Cross-site Scripting via Improper neutralization of `noscript` element

MEDIUM
6.1
CVSS Score
Published: January 27, 2023 at 11:44 PM UTC
Updated: June 17, 2026 at 05:37 AM UTC
2 products affected across 2 vendorsSanitizeSanitize

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.5%
SSVC
No known exploit

Description

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.

Affected

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

5.0.0 ≤ v < 6.0.1
Affected range stops below 6.0.1, so it looks safe — our inference, not a vendor statement
v < 6.0.1
Affected range stops below 6.0.1, 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:

References (1)

x_refsource_CONFIRMMitigationRelease NotesThird Party Advisory
https://github.com/rgrove/sanitize/security/advisories/GHSA-fw3g-2h3j-qmm7

SSVC — Action Prioritization

SSVCNo known exploitNot automatablePartial impact

SSVC signals action urgency (what to patch first), separate from CVSS which measures severity.

CVSS

6.1MEDIUMGitHub_M
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