8.2high
Quadratic sibling re-flattening in the html_sanitize_ex traversal engine allows CPU-exhaustion denial of service
- Severity
- 8.2high CVSS:4.0 by EEF
- Exploit likelihood
- 0.65% (higher than 52% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- EEF
- Also known as
- EEF-CVE-2026-68750GHSA-463q-p2fr-mh9p
Description
Inefficient Algorithmic Complexity vulnerability in the traversal engine in rrrene html_sanitize_ex allows an unauthenticated remote attacker to exhaust server CPU and memory via a flat run of sibling elements in sanitized HTML. The list clause of HtmlSanitizeEx.Traverser.traverse/2 recurses on the tail of a sibling list and then evaluates List.flatten([head] ++ tail) over the already flattened result, so every one of n siblings copies and re-walks the entire remaining tail. The flattening is only needed for the rare case where scrub returns several replacement nodes for one node, but the cost is paid across the whole tail at every step, making traversal quadratic in sibling count. The traverser sits on every public entry point, so no particular scrubber or configuration is required and the payload needs only allowed tags. A 160 KB body of 20,000 sibling elements occupies a scheduler for roughly 1.7 seconds, and the cost grows faster than the body does. This issue affects html_sanitize_ex: from 0.3.1 before 1.4.5 and from 1.5.0-rc.0 before 1.5.3.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| html_sanitize_ex | from 0.3.1 before 1.4.5, from 1.5.0-rc.0 before 1.5.3 | CVE List |
| rrrene/html_sanitize_ex | from 69ea11d61525c470b39b6860d024770d5573ff1f before * | CVE List |
| html_sanitize_ex (Hex) | from 0.3.1 before 1.4.5, from 1.5.0-rc.0 before 1.5.3 | Erlang Ecosystem Foundation |
| https://github.com/rrrene/html_sanitize_ex | from 69ea11d61525c470b39b6860d024770d5573ff1f before 507a6fb95dd4c466cac8a8355d8989043e9fbcc1, before 9f5ccedbed230930813f992a1e6906fcf485981e | Erlang Ecosystem Foundation |
| rrrene htmlsanitizeex | from 0.3.1 before 1.5.3 | NVD |
All scores
| EEF | 8.2high CVSS:4.0 | 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 |
| Erlang Ecosystem Foundation | Not scored CVSS:4.0 | 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 |
| NVD | 7.5high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H |
Classification
SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial.
What each source says
CVE List
Inefficient Algorithmic Complexity vulnerability in the traversal engine in rrrene html_sanitize_ex allows an unauthenticated remote attacker to exhaust server CPU and memory via a flat run of sibling elements in sanitized HTML. The list clause of HtmlSanitizeEx.Traverser.traverse/2 recurses on the tail of a sibling list and then evaluates List.flatten([head] ++ tail) over the already flattened result, so every one of n siblings copies and re-walks the entire remaining tail. The flattening is only needed for the rare case where scrub returns several replacement nodes for one node, but the cost is paid across the whole tail at every step, making traversal quadratic in sibling count. The traverser sits on every public entry point, so no particular scrubber or configuration is required and the payload needs only allowed tags. A 160 KB body of 20,000 sibling elements occupies a scheduler for roughly 1.7 seconds, and the cost grows faster than the body does. This issue affects html_sanitize_ex: from 0.3.1 before 1.4.5 and from 1.5.0-rc.0 before 1.5.3.
Erlang Ecosystem Foundation
Summary
Inefficient Algorithmic Complexity vulnerability in the traversal engine in rrrene html_sanitize_ex allows an unauthenticated remote attacker to exhaust server CPU and memory via a flat run of sibling elements in sanitized HTML. The list clause of HtmlSanitizeEx.Traverser.traverse/2 recurses on the tail of a sibling list and then evaluates List.flatten([head] ++ tail) over the already flattened result, so every one of n siblings copies and re-walks the entire remaining tail. The flattening is only needed for the rare case where scrub returns several replacement nodes for one node, but the cost is paid across the whole tail at every step, making traversal quadratic in sibling count.
The traverser sits on every public entry point, so no particular scrubber or configuration is required and the payload needs only allowed tags. A 160 KB body of 20,000 sibling elements occupies a scheduler for roughly 1.7 seconds, and the cost grows faster than the body does.
This issue affects html_sanitize_ex: from 0.3.1 before 1.4.5 and from 1.5.0-rc.0 before 1.5.3.
Workarounds
Cap the size of user-supplied HTML, and in particular the node count, before it reaches the sanitizer. The quadratic growth means the cap has to be small to be effective.
NVD (es)
Vulnerabilidad de complejidad algorítmica ineficiente en el motor de recorrido en rrrene html_sanitize_ex permite a un atacante remoto no autenticado agotar la CPU y la memoria del servidor a través de una secuencia plana de elementos hermanos en HTML saneado. La cláusula de lista de HtmlSanitizeEx.Traverser.traverse/2 recursiona en la cola de una lista de hermanos y luego evalúa List.flatten([head] ++ tail) sobre el resultado ya aplanado, por lo que cada uno de n hermanos copia y vuelve a recorrer toda la cola restante. El aplanamiento solo es necesario para el caso raro en que scrub devuelve varios nodos de reemplazo para un nodo, pero el costo se paga en toda la cola en cada paso, haciendo que el recorrido sea cuadrático en el recuento de hermanos. El recorredor se encuentra en cada punto de entrada público, por lo que no se requiere ningún depurador o configuración particular y la carga útil solo necesita etiquetas permitidas. Un cuerpo de 160 KB de 20.000 elementos hermanos ocupa un planificador durante aproximadamente 1,7 segundos, y el costo crece más rápido que el cuerpo. Este problema afecta a html_sanitize_ex: desde 0.3.1 antes de 1.5.3.
References
| https://github.com/rrrene/html_sanitize_ex/security/advisories/GHSA-463q-p2fr-mh9p | advisory, broken-link, related, vendor-advisory | |
| https://cna.erlef.org/cves/CVE-2026-68750.html | patch, related, third-party-advisory, web | |
| https://osv.dev/vulnerability/EEF-CVE-2026-68750 | patch, related, third-party-advisory | |
| https://github.com/rrrene/html_sanitize_ex/commit/69ea11d61525c470b39b6860d024770d5573ff1f | related, web | |
| https://github.com/rrrene/html_sanitize_ex/commit/507a6fb95dd4c466cac8a8355d8989043e9fbcc1 | fix, patch | |
| https://github.com/rrrene/html_sanitize_ex/commit/9f5ccedbed230930813f992a1e6906fcf485981e | fix, patch | |
| https://hex.pm/packages/html_sanitize_ex | package | |
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2026-68750 changed 2026-11-20 | CVE Terms of Use |
| Erlang Ecosystem Foundation | EEF-CVE-2026-68750 changed 2026-11-25 | CC-BY-4.0 |
| NVD | CVE-2026-68750 changed 2026-11-20 | Public domain |