{"id":"CVE-2026-68749","aliases":["CVE-2026-68749","EEF-CVE-2026-68749","GHSA-4cx2-987x-rr2x"],"related":[],"kind":"vulnerability","state":"published","title":"Quadratic regex backtracking in the html_sanitize_ex CSS scrubber allows CPU-exhaustion denial of service","summary":"Inefficient Regular Expression Complexity vulnerability in the CSS scrubber in rrrene html_sanitize_ex allows an unauthenticated remote attacker to exhaust server CPU via a long CSS declaration in sanitized HTML. The declaration regex in HtmlSanitizeEx.Scrubber.CSS.scrub/1 matches the property name with an unbounded greedy [-\\w]+ followed by a mandatory :, so a long run of word characters not followed by a colon makes the engine give back one character at a time and retry the colon at every start offset. The work is quadratic in the length of the run, and no length cap is applied to the CSS handed to the scrubber. An 80 KB <style> body costs roughly 2.4 seconds of scheduler time, so a few concurrent requests saturate the BEAM scheduler pool and make the application unresponsive.\n\nThe impact is CPU exhaustion only. Nothing is read, modified or disclosed.\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.3.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"Inefficient Regular Expression Complexity vulnerability in the CSS scrubber in rrrene html_sanitize_ex allows an unauthenticated remote attacker to exhaust server CPU via a long CSS declaration in sanitized HTML. The declaration regex in HtmlSanitizeEx.Scrubber.CSS.scrub/1 matches the property name with an unbounded greedy [-\\w]+ followed by a mandatory :, so a long run of word characters not followed by a colon makes the engine give back one character at a time and retry the colon at every start offset. The work is quadratic in the length of the run, and no length cap is applied to the CSS handed to the scrubber. An 80 KB <style> body costs roughly 2.4 seconds of scheduler time, so a few concurrent requests saturate the BEAM scheduler pool and make the application unresponsive.\n\nThe impact is CPU exhaustion only. Nothing is read, modified or disclosed.\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.3.","source":"cvelist"},{"lang":"en","text":"## Summary\n\nInefficient Regular Expression Complexity vulnerability in the CSS scrubber in rrrene html_sanitize_ex allows an unauthenticated remote attacker to exhaust server CPU via a long CSS declaration in sanitized HTML. The declaration regex in `HtmlSanitizeEx.Scrubber.CSS.scrub/1` matches the property name with an unbounded greedy `[-\\w]+` followed by a mandatory `:`, so a long run of word characters not followed by a colon makes the engine give back one character at a time and retry the colon at every start offset. The work is quadratic in the length of the run, and no length cap is applied to the CSS handed to the scrubber. An 80 KB `<style>` body costs roughly 2.4 seconds of scheduler time, so a few concurrent requests saturate the BEAM scheduler pool and make the application unresponsive.\n\nThe impact is CPU exhaustion only. Nothing is read, modified or disclosed.\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.3.\n\n## Workarounds\n\nSanitize with `basic_html/1`, `markdown_html/1` or `strip_tags/1`, none of which reach the CSS scrubber, or define a custom scrubber that allows neither `<style>` elements nor `style` attributes.\n\nCapping the size of user-supplied HTML before it reaches the sanitizer bounds the cost, though the quadratic growth means the cap has to be small to be effective.\n\n## Configurations\n\nOnly `HtmlSanitizeEx.html5/1`, and custom scrubbers declared with `use HtmlSanitizeEx, extend: :html5`, route input into the CSS scrubber, by way of `<style>` element bodies and `style` attributes. Applications calling `HtmlSanitizeEx.Scrubber.CSS.scrub/1` directly are also affected.","format":"markdown","source":"eef"},{"lang":"es","text":"Una vulnerabilidad de complejidad de expresión regular ineficiente en el depurador CSS en rrrene html_sanitize_ex permite a un atacante remoto no autenticado agotar la CPU del servidor a través de una declaración CSS larga en HTML saneado. La expresión regular de declaración en HtmlSanitizeEx.Scrubber.CSS.scrub/1 coincide con el nombre de la propiedad con un [-\\w]+ codicioso ilimitado seguido de un : obligatorio, por lo que una secuencia larga de caracteres de palabra no seguida por dos puntos hace que el motor retroceda un carácter a la vez y reintente los dos puntos en cada desplazamiento de inicio. El trabajo es cuadrático en la longitud de la secuencia, y no se aplica ningún límite de longitud al CSS entregado al depurador. Un cuerpo [style] de 80 KB cuesta aproximadamente 2.4 segundos de tiempo de planificador, por lo que unas pocas solicitudes concurrentes saturan el pool de planificadores BEAM y hacen que la aplicación no responda.\n\nEl impacto es solo agotamiento de CPU. Nada es leído, modificado o divulgado.\n\nEste problema afecta a html_sanitize_ex: desde 0.3.1 antes de 1.5.3.","source":"nvd"}],"published":"2026-08-06T14:50:12.593Z","modified":"2026-11-25T06:31:00.632Z","severity":{"scorer":"EEF","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N","score":8.2,"rating":"HIGH"},"severities":[{"scorer":"EEF","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N","score":8.2,"rating":"HIGH"},{"scorer":"Erlang Ecosystem Foundation","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","score":7.5,"rating":"HIGH"}],"cwes":["CWE-1333"],"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.3","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.3"}],"ecosystem":"Hex","package":"html_sanitize_ex","purl":"pkg:hex/html_sanitize_ex","source":"eef"},{"ranges":[{"type":"git","introduced":"21f90012eb21aa36f4e3701b7547e12faf0f3c8b","status":"affected","fixed":"4f4bd9eb254881462c0461fbab74b29188c2c133"},{"type":"git","status":"affected","fixed":"b673df33ddf982c8bd0a8bd6348aa247080b3b14"}],"repo":"https://github.com/rrrene/html_sanitize_ex","source":"eef"},{"ranges":[{"status":"affected","introduced":"0.3.1","fixed":"1.5.3"}],"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-4cx2-987x-rr2x","tags":["advisory","broken-link","related","vendor-advisory"],"sources":["cvelist","eef","nvd"]},{"url":"https://cna.erlef.org/cves/CVE-2026-68749.html","tags":["patch","related","third-party-advisory","web"],"sources":["cvelist","eef","nvd"]},{"url":"https://osv.dev/vulnerability/EEF-CVE-2026-68749","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/4f4bd9eb254881462c0461fbab74b29188c2c133","tags":["fix","patch"],"sources":["cvelist","eef","nvd"]},{"url":"https://github.com/rrrene/html_sanitize_ex/commit/b673df33ddf982c8bd0a8bd6348aa247080b3b14","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:44:14.739Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-68749","url":"https://www.cve.org/CVERecord?id=CVE-2026-68749","licence":"CVE Terms of Use","modified":"2026-11-19T08:45:57.597Z"},{"source":"eef","name":"Erlang Ecosystem Foundation","id":"EEF-CVE-2026-68749","url":"https://osv.dev/vulnerability/EEF-CVE-2026-68749","licence":"CC-BY-4.0","modified":"2026-11-25T06:31:00.632Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-68749","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-68749","licence":"Public domain","modified":"2026-11-19T09:17:53.150Z"}],"updatedAt":"2026-11-25T22:59:31.276Z","epss":{"score":0.00476,"percentile":0.42736,"date":"2026-12-01T12:00:22.000Z"}}