{"containers":{"cna":{"affected":[{"collectionURL":"https://repo.hex.pm","cpes":["cpe:2.3:a:rrrene:html_sanitize_ex:*:*:*:*:*:*:*:*"],"defaultStatus":"unaffected","modules":["'Elixir.HtmlSanitizeEx.Scrubber.CSS'","'Elixir.HtmlSanitizeEx'"],"packageName":"html_sanitize_ex","packageURL":"pkg:hex/html_sanitize_ex","product":"html_sanitize_ex","programFiles":["lib/html_sanitize_ex/scrubber/css.ex","lib/html_sanitize_ex.ex"],"programRoutines":[{"name":"'Elixir.HtmlSanitizeEx.Scrubber.CSS':scrub/1"},{"name":"'Elixir.HtmlSanitizeEx':html5/1"}],"repo":"https://github.com/rrrene/html_sanitize_ex","vendor":"rrrene","versions":[{"lessThan":"1.5.3","status":"affected","version":"0.3.1","versionType":"semver"}]},{"collectionURL":"https://github.com","cpes":["cpe:2.3:a:rrrene:html_sanitize_ex:*:*:*:*:*:*:*:*"],"defaultStatus":"unaffected","modules":["'Elixir.HtmlSanitizeEx.Scrubber.CSS'","'Elixir.HtmlSanitizeEx'"],"packageName":"rrrene/html_sanitize_ex","packageURL":"pkg:github/rrrene/html_sanitize_ex","product":"html_sanitize_ex","programFiles":["lib/html_sanitize_ex/scrubber/css.ex","lib/html_sanitize_ex.ex"],"programRoutines":[{"name":"'Elixir.HtmlSanitizeEx.Scrubber.CSS':scrub/1"},{"name":"'Elixir.HtmlSanitizeEx':html5/1"}],"repo":"https://github.com/rrrene/html_sanitize_ex","vendor":"rrrene","versions":[{"lessThan":"4f4bd9eb254881462c0461fbab74b29188c2c133","status":"affected","version":"21f90012eb21aa36f4e3701b7547e12faf0f3c8b","versionType":"git"}]}],"configurations":[{"lang":"en","supportingMedia":[{"base64":false,"type":"text/html","value":"<p>Only <code>HtmlSanitizeEx.html5/1</code>, and custom scrubbers declared with <code>use HtmlSanitizeEx, extend: :html5</code>, route input into the CSS scrubber, by way of <code>&lt;style&gt;</code> element bodies and <code>style</code> attributes. Applications calling <code>HtmlSanitizeEx.Scrubber.CSS.scrub/1</code> directly are also affected.</p>"},{"base64":false,"type":"text/markdown","value":"Only `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."}],"value":"Only 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."}],"cpeApplicability":[{"nodes":[{"cpeMatch":[{"criteria":"cpe:2.3:a:rrrene:html_sanitize_ex:*:*:*:*:*:*:*:*","versionEndExcluding":"1.5.3","versionStartIncluding":"0.3.1","vulnerable":true}],"negate":false,"operator":"OR"}],"operator":"AND"}],"credits":[{"lang":"en","type":"finder","value":"Peter Ullrich"},{"lang":"en","type":"analyst","value":"Jonatan Männchen / EEF"},{"lang":"en","type":"remediation developer","value":"René Föhring"}],"descriptions":[{"lang":"en","supportingMedia":[{"base64":false,"type":"text/html","value":"<p>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 <code>HtmlSanitizeEx.Scrubber.CSS.scrub/1</code> matches the property name with an unbounded greedy <code>[-\\w]+</code> followed by a mandatory <code>:</code>, 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 <code>&lt;style&gt;</code> body costs roughly 2.4 seconds of scheduler time, so a few concurrent requests saturate the BEAM scheduler pool and make the application unresponsive.</p>\n<p>The impact is CPU exhaustion only. Nothing is read, modified or disclosed.</p>\n<p>This issue affects html_sanitize_ex: from 0.3.1 before 1.5.3.</p>"},{"base64":false,"type":"text/markdown","value":"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.5.3."}],"value":"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.5.3."}],"impacts":[{"capecId":"CAPEC-492","descriptions":[{"lang":"en","value":"CAPEC-492 Regular Expression Exponential Blowup"}]}],"metrics":[{"cvssV4_0":{"Automatable":"NOT_DEFINED","Recovery":"NOT_DEFINED","Safety":"NOT_DEFINED","attackComplexity":"LOW","attackRequirements":"PRESENT","attackVector":"NETWORK","baseScore":8.2,"baseSeverity":"HIGH","privilegesRequired":"NONE","providerUrgency":"NOT_DEFINED","subAvailabilityImpact":"NONE","subConfidentialityImpact":"NONE","subIntegrityImpact":"NONE","userInteraction":"NONE","valueDensity":"NOT_DEFINED","vectorString":"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","version":"4.0","vulnAvailabilityImpact":"HIGH","vulnConfidentialityImpact":"NONE","vulnIntegrityImpact":"NONE","vulnerabilityResponseEffort":"NOT_DEFINED"},"format":"CVSS","scenarios":[{"lang":"en","value":"GENERAL"}]}],"problemTypes":[{"descriptions":[{"cweId":"CWE-1333","description":"CWE-1333 Inefficient Regular Expression Complexity","lang":"en","type":"CWE"}]}],"providerMetadata":{"dateUpdated":"2026-08-06T14:50:12.593Z","orgId":"6b3ad84c-e1a6-4bf7-a703-f496b71e49db","shortName":"EEF"},"references":[{"tags":["vendor-advisory","related"],"url":"https://github.com/rrrene/html_sanitize_ex/security/advisories/GHSA-4cx2-987x-rr2x"},{"tags":["related"],"url":"https://cna.erlef.org/cves/CVE-2026-68749.html"},{"tags":["related"],"url":"https://osv.dev/vulnerability/EEF-CVE-2026-68749"},{"tags":["patch"],"url":"https://github.com/rrrene/html_sanitize_ex/commit/4f4bd9eb254881462c0461fbab74b29188c2c133"}],"source":{"discovery":"EXTERNAL"},"title":"Quadratic regex backtracking in the html_sanitize_ex CSS scrubber allows CPU-exhaustion denial of service","workarounds":[{"lang":"en","supportingMedia":[{"base64":false,"type":"text/html","value":"<p>Sanitize with <code>basic_html/1</code>, <code>markdown_html/1</code> or <code>strip_tags/1</code>, none of which reach the CSS scrubber, or define a custom scrubber that allows neither <code>&lt;style&gt;</code> elements nor <code>style</code> attributes.</p>\n<p>Capping 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.</p>"},{"base64":false,"type":"text/markdown","value":"Sanitize 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."}],"value":"Sanitize 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."}]}},"cveMetadata":{"assignerOrgId":"6b3ad84c-e1a6-4bf7-a703-f496b71e49db","assignerShortName":"EEF","cveId":"CVE-2026-68749","datePublished":"2026-08-06T14:50:12.593Z","dateReserved":"2026-07-31T13:23:00.355Z","dateUpdated":"2026-08-06T14:50:12.593Z","state":"PUBLISHED"},"dataType":"CVE_RECORD","dataVersion":"5.2"}