{"id":"CVE-2026-68747","aliases":["CVE-2026-68747","EEF-CVE-2026-68747","GHSA-87v2-pfhj-r5x7"],"related":[],"kind":"vulnerability","state":"published","title":"CSS sanitizer allowlist bypass in html_sanitize_ex via non-declaration input","summary":"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 <style> 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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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 <style> 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.","source":"cvelist"},{"lang":"en","text":"## 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 `<style>` 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 `<style>` 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 `<style>` elements, and the sanitized output must be rendered to other users. Applications calling `HtmlSanitizeEx.Scrubber.CSS.scrub/1` directly are also affected.","format":"markdown","source":"eef"},{"lang":"es","text":"vulnerabilidad de Neutralización Incorrecta de Elementos Especiales en la Salida Utilizada por un Componente Descendente (’Inyección’) en el depurador CSS de rrrene html_sanitize_ex permite a un atacante remoto no autenticado inyectar reglas-arroba CSS, incluyendo una importación de una hoja de estilo remota, en una página servida a otros usuarios. HtmlSanitizeEx.Scrubber.CSS.scrub/1 aplica su lista blanca de propiedades y valores a través de un Regex.replace sobre subcadenas que coinciden con un patrón de declaración propiedad: valor, por lo que la entrada que no coincide con ese patrón nunca es inspeccionada y se copia a la salida sin cambios. @import url(//atacante.example/style.css); sobrevive, mientras que la misma URL dentro de una declaración background: url(...) es eliminada.\n\nLos límites de los elementos se resuelven antes de que se ejecute el depurador, por lo que el contenido inyectado no escapa del elemento [style] y ningún script se ejecuta.\n\nEste problema afecta a html_sanitize_ex: desde 0.3.1 antes de 1.5.4.","source":"nvd"}],"published":"2026-08-06T14:50:03.143Z","modified":"2026-11-25T06:31:00.216Z","severity":{"scorer":"EEF","scheme":"CVSS:4.0","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","score":2.3,"rating":"LOW"},"severities":[{"scorer":"EEF","scheme":"CVSS:4.0","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","score":2.3,"rating":"LOW"},{"scorer":"Erlang Ecosystem Foundation","scheme":"CVSS:4.0","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"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","score":6.1,"rating":"MEDIUM"}],"cwes":["CWE-74"],"affected":[{"ranges":[{"type":"semver","introduced":"0.3.1","fixed":"1.4.5","status":"affected"},{"type":"semver","introduced":"1.5.0-rc.0","fixed":"1.5.4","status":"affected"}],"vendor":"rrrene","product":"html_sanitize_ex","package":"html_sanitize_ex","cpe":"cpe:2.3:a:rrrene:html_sanitize_ex:*:*:*:*:*:*:*:*","repo":"https://github.com/rrrene/html_sanitize_ex","source":"cvelist"},{"ranges":[{"type":"git","introduced":"21f90012eb21aa36f4e3701b7547e12faf0f3c8b","fixed":"*","status":"affected"}],"vendor":"rrrene","product":"html_sanitize_ex","package":"rrrene/html_sanitize_ex","cpe":"cpe:2.3:a:rrrene:html_sanitize_ex:*:*:*:*:*:*:*:*","repo":"https://github.com/rrrene/html_sanitize_ex","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0.3.1","status":"affected","fixed":"1.4.5"},{"type":"semver","introduced":"1.5.0-rc.0","status":"affected","fixed":"1.5.4"}],"ecosystem":"Hex","package":"html_sanitize_ex","purl":"pkg:hex/html_sanitize_ex","source":"eef"},{"ranges":[{"type":"git","introduced":"21f90012eb21aa36f4e3701b7547e12faf0f3c8b","status":"affected","fixed":"0b9f9ad63a7529d4f2c3c1134c371adc3e654308"},{"type":"git","status":"affected","fixed":"c311a499db0b0baef06493fb3cfeb730c0f18f28"}],"repo":"https://github.com/rrrene/html_sanitize_ex","source":"eef"},{"ranges":[{"status":"affected","introduced":"0.3.1","fixed":"1.5.4"}],"vendor":"rrrene","product":"htmlsanitizeex","cpe":"cpe:2.3:a:rrrene:htmlsanitizeex:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://github.com/rrrene/html_sanitize_ex/security/advisories/GHSA-87v2-pfhj-r5x7","tags":["advisory","broken-link","related","vendor-advisory"],"sources":["cvelist","eef","nvd"]},{"url":"https://cna.erlef.org/cves/CVE-2026-68747.html","tags":["patch","related","third-party-advisory","web"],"sources":["cvelist","eef","nvd"]},{"url":"https://osv.dev/vulnerability/EEF-CVE-2026-68747","tags":["patch","related","third-party-advisory"],"sources":["cvelist","nvd"]},{"url":"https://github.com/rrrene/html_sanitize_ex/commit/21f90012eb21aa36f4e3701b7547e12faf0f3c8b","tags":["related","web"],"sources":["cvelist","eef","nvd"]},{"url":"https://github.com/rrrene/html_sanitize_ex/commit/0b9f9ad63a7529d4f2c3c1134c371adc3e654308","tags":["fix","patch"],"sources":["cvelist","eef","nvd"]},{"url":"https://github.com/rrrene/html_sanitize_ex/commit/c311a499db0b0baef06493fb3cfeb730c0f18f28","tags":["fix","patch"],"sources":["cvelist","eef","nvd"]},{"url":"https://hex.pm/packages/html_sanitize_ex","tags":["package"],"sources":["eef"]}],"credits":["Peter Ullrich","Jonatan Männchen / EEF","René Föhring"],"assigner":"EEF","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2026-08-06T15:43:31.189Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-68747","url":"https://www.cve.org/CVERecord?id=CVE-2026-68747","licence":"CVE Terms of Use","modified":"2026-11-19T08:46:02.635Z"},{"source":"eef","name":"Erlang Ecosystem Foundation","id":"EEF-CVE-2026-68747","url":"https://osv.dev/vulnerability/EEF-CVE-2026-68747","licence":"CC-BY-4.0","modified":"2026-11-25T06:31:00.216Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-68747","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-68747","licence":"Public domain","modified":"2026-11-19T09:17:52.930Z"}],"updatedAt":"2026-11-25T22:59:31.275Z","epss":{"score":0.00259,"percentile":0.18801,"date":"2026-12-01T12:00:22.000Z"}}