{"api_version":"1","generated_at":"2026-04-09T07:42:22+00:00","cve":"CVE-2023-36823","urls":{"html":"https://cve.report/CVE-2023-36823","api":"https://cve.report/api/cve/CVE-2023-36823.json","docs":"https://cve.report/api","cve_org":"https://www.cve.org/CVERecord?id=CVE-2023-36823","nvd":"https://nvd.nist.gov/vuln/detail/CVE-2023-36823"},"summary":{"title":"CVE-2023-36823","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.","state":"PUBLIC","assigner":"security-advisories@github.com","published_at":"2023-07-06 16:15:00","updated_at":"2023-11-14 16:15:00"},"problem_types":["CWE-79"],"metrics":[],"references":[{"url":"https://lists.debian.org/debian-lts-announce/2023/11/msg00008.html","name":"https://lists.debian.org/debian-lts-announce/2023/11/msg00008.html","refsource":"","tags":[],"title":"[SECURITY] [DLA 3652-1] ruby-sanitize security update","mime":"text/html","httpstatus":"200","archivestatus":"404"},{"url":"https://github.com/rgrove/sanitize/releases/tag/v6.0.2","name":"https://github.com/rgrove/sanitize/releases/tag/v6.0.2","refsource":"MISC","tags":[],"title":"Release v6.0.2 · rgrove/sanitize · GitHub","mime":"text/html","httpstatus":"200","archivestatus":"404"},{"url":"https://github.com/rgrove/sanitize/security/advisories/GHSA-f5ww-cq3m-q3g7","name":"https://github.com/rgrove/sanitize/security/advisories/GHSA-f5ww-cq3m-q3g7","refsource":"MISC","tags":[],"title":"Insufficient neutralization of `style` element content may allow XSS in Sanitize · Advisory · rgrove/sanitize · GitHub","mime":"text/html","httpstatus":"200","archivestatus":"404"},{"url":"https://github.com/rgrove/sanitize/commit/76ed46e6dc70820f38efe27de8dabd54dddb5220","name":"https://github.com/rgrove/sanitize/commit/76ed46e6dc70820f38efe27de8dabd54dddb5220","refsource":"MISC","tags":[],"title":"Merge pull request from GHSA-f5ww-cq3m-q3g7 · rgrove/sanitize@76ed46e · GitHub","mime":"text/html","httpstatus":"200","archivestatus":"404"},{"url":"https://www.cve.org/CVERecord?id=CVE-2023-36823","name":"CVE Program record","refsource":"CVE.ORG","tags":["canonical"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2023-36823","name":"NVD vulnerability detail","refsource":"NVD","tags":["canonical","analysis"]}],"affected":[],"timeline":[],"solutions":[],"workarounds":[],"exploits":[],"credits":[],"nvd_cpes":[{"cve_year":"2023","cve_id":"36823","vulnerable":"1","versionEndIncluding":"","cpe1":"cpe","cpe2":"2.3","cpe3":"a","cpe4":"sanitize_project","cpe5":"sanitize","cpe6":"*","cpe7":"*","cpe8":"*","cpe9":"*","cpe10":"*","cpe11":"ruby","cpe12":"*","cpe13":"*"}],"vendor_comments":[],"enrichments":{"kev":null,"epss":null,"legacy_qids":[{"cve":"CVE-2023-36823","qid":"6000324","title":"Debian Security Update for ruby-sanitize (DLA 3652-1)"},{"cve":"CVE-2023-36823","qid":"6000470","title":"Debian Security Update for ruby-sanitize (DSA 5616-1)"}]},"source_records":{"cve_program":{"data_version":"4.0","data_type":"CVE","data_format":"MITRE","CVE_data_meta":{"ID":"CVE-2023-36823","ASSIGNER":"security-advisories@github.com","STATE":"PUBLIC"},"description":{"description_data":[{"lang":"eng","value":"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."}]},"problemtype":{"problemtype_data":[{"description":[{"lang":"eng","value":"CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')","cweId":"CWE-79"}]}]},"affects":{"vendor":{"vendor_data":[{"vendor_name":"rgrove","product":{"product_data":[{"product_name":"sanitize","version":{"version_data":[{"version_affected":"=","version_value":">= 3.0.0, < 6.0.2"}]}}]}}]}},"references":{"reference_data":[{"url":"https://github.com/rgrove/sanitize/security/advisories/GHSA-f5ww-cq3m-q3g7","refsource":"MISC","name":"https://github.com/rgrove/sanitize/security/advisories/GHSA-f5ww-cq3m-q3g7"},{"url":"https://github.com/rgrove/sanitize/commit/76ed46e6dc70820f38efe27de8dabd54dddb5220","refsource":"MISC","name":"https://github.com/rgrove/sanitize/commit/76ed46e6dc70820f38efe27de8dabd54dddb5220"},{"url":"https://github.com/rgrove/sanitize/releases/tag/v6.0.2","refsource":"MISC","name":"https://github.com/rgrove/sanitize/releases/tag/v6.0.2"}]},"source":{"advisory":"GHSA-f5ww-cq3m-q3g7","discovery":"UNKNOWN"},"impact":{"cvss":[{"attackComplexity":"LOW","attackVector":"NETWORK","availabilityImpact":"LOW","baseScore":7.1,"baseSeverity":"HIGH","confidentialityImpact":"LOW","integrityImpact":"LOW","privilegesRequired":"NONE","scope":"CHANGED","userInteraction":"REQUIRED","vectorString":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:L","version":"3.1"}]}},"nvd":{"publishedDate":"2023-07-06 16:15:00","lastModifiedDate":"2023-11-14 16:15:00","problem_types":["CWE-79"],"metrics":{"baseMetricV3":{"cvssV3":{"version":"3.1","vectorString":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","attackVector":"NETWORK","attackComplexity":"LOW","privilegesRequired":"NONE","userInteraction":"REQUIRED","scope":"CHANGED","confidentialityImpact":"LOW","integrityImpact":"LOW","availabilityImpact":"NONE","baseScore":6.1,"baseSeverity":"MEDIUM"},"exploitabilityScore":2.8,"impactScore":2.7}},"configurations":{"CVE_data_version":"4.0","nodes":[{"operator":"OR","children":[],"cpe_match":[{"vulnerable":true,"cpe23Uri":"cpe:2.3:a:sanitize_project:sanitize:*:*:*:*:*:ruby:*:*","versionStartIncluding":"3.0.0","versionEndExcluding":"6.0.2","cpe_name":[]}]}]}},"legacy_mitre":{"record":null,"notes":[]}}}