{"schemaVersion":4,"id":"CVE-2023-36823","aliases":["UBUNTU-CVE-2023-36823","DEBIAN-CVE-2023-36823","DLA-3652-1","DSA-5616-1","GHSA-f5ww-cq3m-q3g7"],"status":"published","duplicateOf":null,"title":"Sanitize vulnerable to Cross-site Scripting via insufficient neutralization of `style` element content","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.","dates":{"published":"2023-07-06T15:06:00.509Z","modified":"2025-02-13T16:56:27.159Z","reserved":null,"kevAdded":[],"kevDue":[]},"cvss":{"headline":{"score":7.1,"severity":"high","version":"3.1","versionLabel":"v3.1","source":"CVE.org","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:L","computed":false,"selection":"backend-summary"},"metrics":[{"version":"3.1","versionLabel":"v3.1","source":"CVE.org","score":7.1,"severity":"high","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:L","exploitability":null,"impact":null,"computed":false},{"version":"3.1","versionLabel":"v3.1","source":"OSV · Ubuntu","score":7.1,"severity":"high","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:L","exploitability":7.2,"impact":6.2,"computed":true},{"version":"3.1","versionLabel":"v3.1","source":"OSV · Debian","score":6.1,"severity":"medium","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","exploitability":7.2,"impact":4.5,"computed":true},{"version":"3.1","versionLabel":"v3.1","source":"OSV · Rubygems","score":7.1,"severity":"high","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:L","exploitability":7.2,"impact":6.2,"computed":true},{"version":"3.1","versionLabel":"v3.1","source":"NVD","score":6.1,"severity":"medium","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","exploitability":null,"impact":null,"computed":false}]},"epss":{"probability":0.00712,"percentile":0.54939,"severity":"low","asOf":"2026-12-04T00:00:00.000Z","change":{"pp":0,"baselineDate":"2026-11-04T00:00:00.000Z","baselineScore":0.00712},"history":[{"date":"2026-09-14T00:00:00.000Z","score":0.00712,"percentile":null},{"date":"2026-09-15T00:00:00.000Z","score":0.00712,"percentile":null},{"date":"2026-09-16T00:00:00.000Z","score":0.00712,"percentile":null},{"date":"2026-09-17T00:00:00.000Z","score":0.00712,"percentile":null},{"date":"2026-09-18T00:00:00.000Z","score":0.00712,"percentile":null},{"date":"2026-09-19T00:00:00.000Z","score":0.00712,"percentile":null},{"date":"2026-09-20T00:00:00.000Z","score":0.00712,"percentile":null},{"date":"2026-09-21T00:00:00.000Z","score":0.00712,"percentile":null},{"date":"2026-09-22T00:00:00.000Z","score":0.00712,"percentile":null},{"date":"2026-09-23T00:00:00.000Z","score":0.00712,"percentile":null},{"date":"2026-09-24T00:00:00.000Z","score":0.00712,"percentile":null},{"date":"2026-09-25T00:00:00.000Z","score":0.00712,"percentile":null},{"date":"2026-09-26T00:00:00.000Z","score":0.00712,"percentile":null},{"date":"2026-09-27T00:00:00.000Z","score":0.00712,"percentile":null},{"date":"2026-09-28T00:00:00.000Z","score":0.00712,"percentile":null},{"date":"2026-09-29T00:00:00.000Z","score":0.00712,"percentile":null},{"date":"2026-09-30T00:00:00.000Z","score":0.00712,"percentile":null},{"date":"2026-10-01T00:00:00.000Z","score":0.00712,"percentile":null},{"date":"2026-10-02T00:00:00.000Z","score":0.00712,"percentile":null},{"date":"2026-10-03T00:00:00.000Z","score":0.00712,"percentile":null},{"date":"2026-10-04T00:00:00.000Z","score":0.00712,"percentile":null},{"date":"2026-10-05T00:00:00.000Z","score":0.00712,"percentile":null},{"date":"2026-10-06T00:00:00.000Z","score":0.00712,"percentile":null},{"date":"2026-10-07T00:00:00.000Z","score":0.00712,"percentile":null},{"date":"2026-10-08T00:00:00.000Z","score":0.00712,"percentile":null},{"date":"2026-10-09T00:00:00.000Z","score":0.00712,"percentile":null},{"date":"2026-10-10T00:00:00.000Z","score":0.00712,"percentile":null},{"date":"2026-10-11T00:00:00.000Z","score":0.00712,"percentile":null},{"date":"2026-10-12T00:00:00.000Z","score":0.00712,"percentile":null},{"date":"2026-10-13T00:00:00.000Z","score":0.00712,"percentile":null},{"date":"2026-10-14T00:00:00.000Z","score":0.00712,"percentile":null},{"date":"2026-10-15T00:00:00.000Z","score":0.00712,"percentile":null},{"date":"2026-10-16T00:00:00.000Z","score":0.00712,"percentile":null},{"date":"2026-10-17T00:00:00.000Z","score":0.00712,"percentile":null},{"date":"2026-10-18T00:00:00.000Z","score":0.00712,"percentile":null},{"date":"2026-10-19T00:00:00.000Z","score":0.00712,"percentile":null},{"date":"2026-10-20T00:00:00.000Z","score":0.00712,"percentile":null},{"date":"2026-10-21T00:00:00.000Z","score":0.00712,"percentile":null},{"date":"2026-10-22T00:00:00.000Z","score":0.00712,"percentile":null},{"date":"2026-10-23T00:00:00.000Z","score":0.00712,"percentile":null},{"date":"2026-10-24T00:00:00.000Z","score":0.00712,"percentile":null},{"date":"2026-10-25T00:00:00.000Z","score":0.00712,"percentile":null},{"date":"2026-10-26T00:00:00.000Z","score":0.00712,"percentile":null},{"date":"2026-10-27T00:00:00.000Z","score":0.00712,"percentile":null},{"date":"2026-10-28T00:00:00.000Z","score":0.00712,"percentile":null},{"date":"2026-10-29T00:00:00.000Z","score":0.00712,"percentile":null},{"date":"2026-10-30T00:00:00.000Z","score":0.00712,"percentile":null},{"date":"2026-10-31T00:00:00.000Z","score":0.00712,"percentile":null},{"date":"2026-11-01T00:00:00.000Z","score":0.00712,"percentile":null},{"date":"2026-11-02T00:00:00.000Z","score":0.00712,"percentile":null},{"date":"2026-11-03T00:00:00.000Z","score":0.00712,"percentile":null},{"date":"2026-11-04T00:00:00.000Z","score":0.00712,"percentile":null},{"date":"2026-11-05T00:00:00.000Z","score":0.00712,"percentile":null},{"date":"2026-11-06T00:00:00.000Z","score":0.00712,"percentile":null},{"date":"2026-11-07T00:00:00.000Z","score":0.00712,"percentile":null},{"date":"2026-11-08T00:00:00.000Z","score":0.00712,"percentile":null},{"date":"2026-11-09T00:00:00.000Z","score":0.00712,"percentile":null},{"date":"2026-11-10T00:00:00.000Z","score":0.00712,"percentile":null},{"date":"2026-11-11T00:00:00.000Z","score":0.00712,"percentile":null},{"date":"2026-11-12T00:00:00.000Z","score":0.00712,"percentile":null},{"date":"2026-11-13T00:00:00.000Z","score":0.00712,"percentile":null},{"date":"2026-11-14T00:00:00.000Z","score":0.00712,"percentile":null},{"date":"2026-11-15T00:00:00.000Z","score":0.00712,"percentile":null},{"date":"2026-11-16T00:00:00.000Z","score":0.00712,"percentile":null},{"date":"2026-11-17T00:00:00.000Z","score":0.00712,"percentile":null},{"date":"2026-11-18T00:00:00.000Z","score":0.00712,"percentile":null},{"date":"2026-11-19T00:00:00.000Z","score":0.00712,"percentile":null},{"date":"2026-11-20T00:00:00.000Z","score":0.00712,"percentile":null},{"date":"2026-11-21T00:00:00.000Z","score":0.00712,"percentile":null},{"date":"2026-11-22T00:00:00.000Z","score":0.00712,"percentile":null},{"date":"2026-11-23T00:00:00.000Z","score":0.00712,"percentile":null},{"date":"2026-11-24T00:00:00.000Z","score":0.00712,"percentile":null},{"date":"2026-11-25T00:00:00.000Z","score":0.00733,"percentile":null},{"date":"2026-11-26T00:00:00.000Z","score":0.00733,"percentile":null},{"date":"2026-11-27T00:00:00.000Z","score":0.00733,"percentile":null},{"date":"2026-11-28T00:00:00.000Z","score":0.00733,"percentile":null},{"date":"2026-11-29T00:00:00.000Z","score":0.00733,"percentile":null},{"date":"2026-11-30T00:00:00.000Z","score":0.00733,"percentile":null},{"date":"2026-12-01T00:00:00.000Z","score":0.00712,"percentile":null},{"date":"2026-12-02T00:00:00.000Z","score":0.00712,"percentile":null},{"date":"2026-12-03T00:00:00.000Z","score":0.00712,"percentile":null},{"date":"2026-12-04T00:00:00.000Z","score":0.00712,"percentile":0.54939}],"last30":[{"date":"2026-11-04T00:00:00.000Z","score":0.00712,"percentile":null},{"date":"2026-11-05T00:00:00.000Z","score":0.00712,"percentile":null},{"date":"2026-11-06T00:00:00.000Z","score":0.00712,"percentile":null},{"date":"2026-11-07T00:00:00.000Z","score":0.00712,"percentile":null},{"date":"2026-11-08T00:00:00.000Z","score":0.00712,"percentile":null},{"date":"2026-11-09T00:00:00.000Z","score":0.00712,"percentile":null},{"date":"2026-11-10T00:00:00.000Z","score":0.00712,"percentile":null},{"date":"2026-11-11T00:00:00.000Z","score":0.00712,"percentile":null},{"date":"2026-11-12T00:00:00.000Z","score":0.00712,"percentile":null},{"date":"2026-11-13T00:00:00.000Z","score":0.00712,"percentile":null},{"date":"2026-11-14T00:00:00.000Z","score":0.00712,"percentile":null},{"date":"2026-11-15T00:00:00.000Z","score":0.00712,"percentile":null},{"date":"2026-11-16T00:00:00.000Z","score":0.00712,"percentile":null},{"date":"2026-11-17T00:00:00.000Z","score":0.00712,"percentile":null},{"date":"2026-11-18T00:00:00.000Z","score":0.00712,"percentile":null},{"date":"2026-11-19T00:00:00.000Z","score":0.00712,"percentile":null},{"date":"2026-11-20T00:00:00.000Z","score":0.00712,"percentile":null},{"date":"2026-11-21T00:00:00.000Z","score":0.00712,"percentile":null},{"date":"2026-11-22T00:00:00.000Z","score":0.00712,"percentile":null},{"date":"2026-11-23T00:00:00.000Z","score":0.00712,"percentile":null},{"date":"2026-11-24T00:00:00.000Z","score":0.00712,"percentile":null},{"date":"2026-11-25T00:00:00.000Z","score":0.00733,"percentile":null},{"date":"2026-11-26T00:00:00.000Z","score":0.00733,"percentile":null},{"date":"2026-11-27T00:00:00.000Z","score":0.00733,"percentile":null},{"date":"2026-11-28T00:00:00.000Z","score":0.00733,"percentile":null},{"date":"2026-11-29T00:00:00.000Z","score":0.00733,"percentile":null},{"date":"2026-11-30T00:00:00.000Z","score":0.00733,"percentile":null},{"date":"2026-12-01T00:00:00.000Z","score":0.00712,"percentile":null},{"date":"2026-12-02T00:00:00.000Z","score":0.00712,"percentile":null},{"date":"2026-12-03T00:00:00.000Z","score":0.00712,"percentile":null},{"date":"2026-12-04T00:00:00.000Z","score":0.00712,"percentile":0.54939}]},"kev":{"state":"not-listed","entries":[],"listedCount":0,"totalCatalogs":3,"catalogs":[{"source":"cisa","label":"CISA","listed":false,"entry":null},{"source":"enisa","label":"ENISA","listed":false,"entry":null},{"source":"circl","label":"CIRCL","listed":false,"entry":null}]},"ransomware":{"state":"none-recorded","sources":[]},"exploits":[],"exploitCount":0,"weaknesses":[{"id":"CWE-79","name":"Improper Neutralization of Input During Web Page Generation","description":"The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.","type":"weakness","status":"Stable","abstraction":"Base","likelihoodOfExploit":"High","url":"https://cwe.mitre.org/data/definitions/79.html"}],"affected":[{"vendor":"debian","product":"ruby-sanitize","name":"ruby-sanitize","label":"ruby-sanitize","ecosystem":"Debian","cpePart":null,"purl":"pkg:deb/debian/ruby-sanitize","purlType":"deb","versions":[{"text":"< 6.0.2-1","noFixRecorded":false,"fixedIn":null,"bounds":{"kind":"range","start":null,"startInclusive":true,"end":"6.0.2-1","endInclusive":false}},{"text":"< 4.6.6-2.1~deb10u2","noFixRecorded":false,"fixedIn":null,"bounds":{"kind":"range","start":null,"startInclusive":true,"end":"4.6.6-2.1~deb10u2","endInclusive":false}},{"text":"< 5.2.1-2+deb11u1","noFixRecorded":false,"fixedIn":null,"bounds":{"kind":"range","start":null,"startInclusive":true,"end":"5.2.1-2+deb11u1","endInclusive":false}},{"text":"< 6.0.0-1.1+deb12u1","noFixRecorded":false,"fixedIn":null,"bounds":{"kind":"range","start":null,"startInclusive":true,"end":"6.0.0-1.1+deb12u1","endInclusive":false}}],"versionsText":"< 6.0.2-1 | < 4.6.6-2.1~deb10u2 | < 5.2.1-2+deb11u1 | < 6.0.0-1.1+deb12u1","eol":null,"hubHref":null},{"vendor":"ubuntu","product":"ruby-sanitize","name":"ruby-sanitize","label":"ruby-sanitize","ecosystem":"Ubuntu","cpePart":null,"purl":"pkg:deb/ubuntu/ruby-sanitize","purlType":"deb","versions":[{"text":"< 4.6.6-2.1~0.20.04.2","noFixRecorded":false,"fixedIn":null,"bounds":{"kind":"range","start":null,"startInclusive":true,"end":"4.6.6-2.1~0.20.04.2","endInclusive":false}},{"text":"< 6.0.0-1ubuntu0.1","noFixRecorded":false,"fixedIn":null,"bounds":{"kind":"range","start":null,"startInclusive":true,"end":"6.0.0-1ubuntu0.1","endInclusive":false}}],"versionsText":"< 4.6.6-2.1~0.20.04.2 | < 6.0.0-1ubuntu0.1","eol":null,"hubHref":null},{"vendor":"debian","product":"debian_linux","name":"debian linux","label":"debian_linux","ecosystem":null,"cpePart":"o","purl":null,"purlType":null,"versions":[{"text":"10.0","noFixRecorded":false,"fixedIn":null,"bounds":{"kind":"exact","version":"10.0"}}],"versionsText":"10.0","eol":{"isEol":true,"eolDate":"2024-06-30T00:00:00.000Z","matchMethod":"cpe","cycle":{"name":"10","label":"10 (Buster)","eolFrom":"2024-06-30T00:00:00.000Z","isLts":false,"isMaintained":true,"latestVersion":"10.13"},"product":{"name":"debian","label":"Debian","category":"os"}},"hubHref":"/vendor/debian/debian_linux"},{"vendor":"RubyGems","product":"sanitize","name":"sanitize","label":"sanitize","ecosystem":"RubyGems","cpePart":null,"purl":"pkg:gem/sanitize","purlType":"gem","versions":[{"text":"≥ 3.0.0, < 6.0.2","noFixRecorded":false,"fixedIn":null,"bounds":{"kind":"range","start":"3.0.0","startInclusive":true,"end":"6.0.2","endInclusive":false}}],"versionsText":"≥ 3.0.0, < 6.0.2","eol":null,"hubHref":null},{"vendor":"rgrove","product":"sanitize","name":"sanitize","label":"sanitize","ecosystem":null,"cpePart":"a","purl":null,"purlType":null,"versions":[{"text":"≥ 3.0.0, < 6.0.2","noFixRecorded":false,"fixedIn":null,"bounds":{"kind":"range","start":"3.0.0","startInclusive":true,"end":"6.0.2","endInclusive":false}}],"versionsText":"≥ 3.0.0, < 6.0.2","eol":null,"hubHref":"/vendor/rgrove/sanitize"},{"vendor":"sanitize_project","product":"sanitize","name":"sanitize","label":"sanitize","ecosystem":null,"cpePart":"a","purl":null,"purlType":null,"versions":[{"text":"≥ 3.0.0, < 6.0.2","noFixRecorded":false,"fixedIn":null,"bounds":{"kind":"range","start":"3.0.0","startInclusive":true,"end":"6.0.2","endInclusive":false}}],"versionsText":"≥ 3.0.0, < 6.0.2","eol":null,"hubHref":"/vendor/sanitize_project/sanitize"}],"affectedCount":6,"eol":{"hasEol":true,"count":1},"references":[{"url":"https://github.com/rgrove/sanitize/security/advisories/GHSA-f5ww-cq3m-q3g7","label":"github.com/rgrove/sanitize/security/advisories/GHSA-f5ww-cq3m-q3g7","hostname":"github.com","tags":["X Refsource CONFIRM","REPORT","WEB","Vendor Advisory"]},{"url":"https://github.com/rgrove/sanitize/commit/76ed46e6dc70820f38efe27de8dabd54dddb5220","label":"github.com/rgrove/sanitize/commit/76ed46e6dc70820f38efe27de8dabd54dddb5220","hostname":"github.com","tags":["X Refsource MISC","REPORT","WEB","Patch"]},{"url":"https://github.com/rgrove/sanitize/releases/tag/v6.0.2","label":"github.com/rgrove/sanitize/releases/tag/v6.0.2","hostname":"github.com","tags":["X Refsource MISC","REPORT","WEB","Release Notes"]},{"url":"https://lists.debian.org/debian-lts-announce/2023/11/msg00008.html","label":"lists.debian.org/debian-lts-announce/2023/11/msg00008.html","hostname":"lists.debian.org","tags":["WEB","Mailing List"]},{"url":"https://ubuntu.com/security/CVE-2023-36823","label":"ubuntu.com/security/CVE-2023-36823","hostname":"ubuntu.com","tags":["REPORT"]},{"url":"https://www.cve.org/CVERecord?id=CVE-2023-36823","label":"www.cve.org/CVERecord?id=CVE-2023-36823","hostname":"www.cve.org","tags":["REPORT"]},{"url":"https://ubuntu.com/security/notices/USN-6748-1","label":"ubuntu.com/security/notices/USN-6748-1","hostname":"ubuntu.com","tags":["Advisory"]},{"url":"https://security-tracker.debian.org/tracker/CVE-2023-36823","label":"security-tracker.debian.org/tracker/CVE-2023-36823","hostname":"security-tracker.debian.org","tags":["Advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2023-36823","label":"nvd.nist.gov/vuln/detail/CVE-2023-36823","hostname":"nvd.nist.gov","tags":["Advisory"]},{"url":"https://github.com/rgrove/sanitize","label":"github.com/rgrove/sanitize","hostname":"github.com","tags":["PACKAGE"]},{"url":"https://github.com/rubysec/ruby-advisory-db/blob/master/gems/sanitize/CVE-2023-36823.yml","label":"github.com/rubysec/ruby-advisory-db/blob/master/gems/sanitize/CVE-2023-36823.yml","hostname":"github.com","tags":["WEB"]}],"lineage":{"upstream":[],"downstream":["USN-6748-1"],"duplicates":[],"related":["USN-6748-1"]},"timeline":[{"kind":"published","date":"2023-07-06T15:06:00.509Z","label":"Published","detail":"Vulnerability first disclosed.","source":null},{"kind":"modified","date":"2025-02-13T16:56:27.159Z","label":"Last modified","detail":"Vulnerability information updated.","source":null}],"priority":{"label":"routine","tag":null,"reason":"Not severe (CVSS 7.1, network access); no exploitation reported by the 5 checked sources","nextStep":"Fix in the normal cadence","rank":[0,0,0,0,1,71],"checkedSources":["cisa","enisa","circl","shadowserver","cisa-adp"],"evidence":[{"type":"epss","source":"FIRST","date":"2026-12-04T00:00:00.000Z","status":"valid","statusDate":null,"statusSource":null,"disputes":[],"value":0.00712,"stale":false,"promoted":null},{"type":"cvss","source":"cve.org","date":"2025-02-13T16:56:27.159Z","status":"valid","statusDate":null,"statusSource":null,"disputes":[],"score":7.1,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:L","version":"3.1","headline":true},{"type":"cvss","source":"osv_ubuntu","date":"2025-02-13T16:56:27.159Z","status":"valid","statusDate":null,"statusSource":null,"disputes":[],"score":7.1,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:L","version":"3.1"},{"type":"cvss","source":"osv_debian","date":"2025-02-13T16:56:27.159Z","status":"valid","statusDate":null,"statusSource":null,"disputes":[],"score":6.1,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","version":"3.1"},{"type":"cvss","source":"osv_rubygems","date":"2025-02-13T16:56:27.159Z","status":"valid","statusDate":null,"statusSource":null,"disputes":[],"score":7.1,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:L","version":"3.1"},{"type":"cvss","source":"nvd","date":"2025-02-13T16:56:27.159Z","status":"valid","statusDate":null,"statusSource":null,"disputes":[],"score":6.1,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","version":"3.1"}],"epss":{"value":0.00712,"date":"2026-12-04T00:00:00.000Z","stale":false,"promoted":null},"sources":[{"id":"cisa","lastSuccessfulSync":"2026-12-05T07:02:00.704Z","state":"fresh"},{"id":"enisa","lastSuccessfulSync":"2026-12-05T07:02:01.187Z","state":"fresh"},{"id":"circl","lastSuccessfulSync":"2026-12-05T07:02:01.389Z","state":"fresh"},{"id":"shadowserver","lastSuccessfulSync":null,"state":"unavailable"},{"id":"cisa-adp","lastSuccessfulSync":"2026-12-05T07:01:05.155Z","state":"fresh"},{"id":"epss","lastSuccessfulSync":"2026-12-05T07:01:59.185Z","state":"fresh"},{"id":"osv","lastSuccessfulSync":"2026-12-05T07:01:58.234Z","state":"fresh"}],"feedEvent":null},"meta":{"dataAsOf":"2026-12-05T07:24:12.296Z","stale":false,"partial":false}}