CVE-2023-36823
published 2023-07-06CVE-2023-36823: 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…
PriorityP427medium6.1CVSS 3.1
AVNACLPRNUIRSCCLILAN
EPSS
0.71%
50.0th percentile
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
5 ranges
| Vendor | Product | Version range | Fixed in |
|---|---|---|---|
| debian | debian_linux | — | — |
| debian | ruby-sanitize | < ruby-sanitize 6.0.0-1.1+deb12u1 (bookworm) | ruby-sanitize 6.0.0-1.1+deb12u1 (bookworm) |
| rgrove | sanitize | — | — |
| sanitize_project | sanitize | >= 3.0.0 < 6.0.2 | 6.0.2 |
| sanitize_project | sanitize | >= 3.0.0 < 6.0.2 | 6.0.2 |
CVSS provenance
nvdv3.16.1MEDIUMCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
osv6.1MEDIUM
vendor_debian7.1HIGH
vendor_ubuntu6.1MEDIUM
Stop checking back — get the weekly exploitation signal.
Every Monday: what got weaponized or added to CISA KEV in the last seven days — each CVE cross-linked to its PoC, Nuclei template, and detection rule. Free, one email a week, unsubscribe in one click.
OSV
ruby-sanitize vulnerabilities
osv·2024-04-24·CVSS 6.1
CVE-2023-23627 [MEDIUM] ruby-sanitize vulnerabilities
ruby-sanitize vulnerabilities
It was discovered that Sanitize incorrectly handled noscript elements
under certain circumstances. An attacker could possibly use this issue to
execute a cross-site scripting (XSS) attack. This issue only affected
Ubuntu 22.04 LTS. (CVE-2023-23627)
It was discovered that Sanitize incorrectly handled style elements under
certain circumstances. An attacker could possibly use this issue to
execute a cross-site scripting (XSS) attack. (CVE-2023-36823)
GHSA
Sanitize vulnerable to Cross-site Scripting via insufficient neutralization of `style` element content
ghsa·2023-07-06
CVE-2023-36823 [HIGH] CWE-79 Sanitize vulnerable to Cross-site Scripting via insufficient neutralization of `style` element content
Sanitize vulnerable to Cross-site Scripting via insufficient neutralization of `style` element content
### Impact
Using carefully crafted input, an attacker may be able to sneak arbitrary HTML and CSS through Sanitize `>= 3.0.0, = 6.0.2` performs additional escaping of CSS in `style` element content, which fixes this issue.
### Workarounds
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.
### Credit
This issue was found by @cure53 during an audit of a project that uses Sanitize and was reported by one of that project's maintainers. Thank you!
OSV
Sanitize vulnerable to Cross-site Scripting via insufficient neutralization of `style` element content
osv·2023-07-06
CVE-2023-36823 [HIGH] Sanitize vulnerable to Cross-site Scripting via insufficient neutralization of `style` element content
Sanitize vulnerable to Cross-site Scripting via insufficient neutralization of `style` element content
### Impact
Using carefully crafted input, an attacker may be able to sneak arbitrary HTML and CSS through Sanitize `>= 3.0.0, = 6.0.2` performs additional escaping of CSS in `style` element content, which fixes this issue.
### Workarounds
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.
### Credit
This issue was found by @cure53 during an audit of a project that uses Sanitize and was reported by one of that project's maintainers. Thank you!
OSV
CVE-2023-36823: Sanitize is an allowlist-based HTML and CSS sanitizer
osv·2023-07-06·CVSS 6.1
CVE-2023-36823 [MEDIUM] CVE-2023-36823: Sanitize is an allowlist-based HTML and CSS sanitizer
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
Ubuntu
Sanitize vulnerabilities
vendor_ubuntu·2024-04-24·CVSS 6.1
CVE-2023-23627 [MEDIUM] Sanitize vulnerabilities
Title: Sanitize vulnerabilities
Summary: Several security issues were fixed in Sanitize.
It was discovered that Sanitize incorrectly handled noscript elements
under certain circumstances. An attacker could possibly use this issue to
execute a cross-site scripting (XSS) attack. This issue only affected
Ubuntu 22.04 LTS. (CVE-2023-23627)
It was discovered that Sanitize incorrectly handled style elements under
certain circumstances. An attacker could possibly use this issue to
execute a cross-site scripting (XSS) attack. (CVE-2023-36823)
Instructions: In general, a standard system update will make all the necessary changes.
Debian
CVE-2023-36823: ruby-sanitize - Sanitize is an allowlist-based HTML and CSS sanitizer. Using carefully crafted i...
vendor_debian·2023·CVSS 7.1
CVE-2023-36823 [HIGH] CVE-2023-36823: ruby-sanitize - Sanitize is an allowlist-based HTML and CSS sanitizer. Using carefully crafted i...
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
No detection rules found.
No public exploits indexed.
No writeups or analysis indexed.
https://github.com/rgrove/sanitize/commit/76ed46e6dc70820f38efe27de8dabd54dddb5220https://github.com/rgrove/sanitize/releases/tag/v6.0.2https://github.com/rgrove/sanitize/security/advisories/GHSA-f5ww-cq3m-q3g7https://lists.debian.org/debian-lts-announce/2023/11/msg00008.htmlhttps://github.com/rgrove/sanitize/commit/76ed46e6dc70820f38efe27de8dabd54dddb5220https://github.com/rgrove/sanitize/releases/tag/v6.0.2https://github.com/rgrove/sanitize/security/advisories/GHSA-f5ww-cq3m-q3g7https://lists.debian.org/debian-lts-announce/2023/11/msg00008.html
2023-07-06
Published