CVE-2026-39315: Unbounded Html Entity Regex Bypass

HTML entity decoders using regular expressions with fixed digit-length caps (e.g., `{1,6}`) for numeric character references are vulnerable to bypasses. Attackers can artificially pad numeric entities with leading zeros (e.g., `A`), exceeding the length limit and causing the malicious entity to be silently skipped by sanitizers. Because the brows

Provally CuratedPublic repositoryMediumMedium confidenceVerifiedApache-2.0JS
greprules fetch cve-2026-39315-unbounded-html-entity-regex-bypass --engine opengrep

Description

HTML entity decoders using regular expressions with fixed digit-length caps (e.g., `{1,6}`) for numeric character references are vulnerable to bypasses. Attackers can artificially pad numeric entities with leading zeros (e.g., `A`), exceeding the length limit and causing the malicious entity to be silently skipped by sanitizers. Because the brows