Loading advisory.
Loading advisory.
justhtml: Mutation XSS with custom foreign-namespace sanitization policies
A parser-differential / mutation XSS issue was found in justhtml when using a custom sanitization policy that preserves foreign namespaces such as SVG or MathML.
Published 2026-04-08 00:06 UTC · Modified 2026-08-24 19:03 UTC
Severity and EPSS are shown separately. Helm does not combine them into one score. How tiers work
| Package | Ecosystem | Affected | Fixed in | Upgrade command |
|---|---|---|---|---|
| justhtml | PyPI | >= 1.13.0, < 1.14.0 versions 1.13.0 | 1.14.0 | pip install --upgrade 'justhtml>=1.14.0' |
A parser-differential / mutation XSS issue was found in justhtml when using a custom sanitization policy that preserves foreign namespaces such as SVG or MathML.
Under these custom settings, specially crafted input could sanitize into HTML that looked safe at first, but became unsafe when parsed again by a browser or another HTML parser.
This issue does not affect the default safe configuration.
You may be affected if you use a custom SanitizationPolicy with settings like:
drop_foreign_namespaces=False
allowlisted foreign elements such as MathML or SVG
allowlisted raw-text containers such as <style>
In that case, an attacker could inject markup that survives sanitization and turns into active HTML after re-parsing.
justhtml <= 1.13.0
Fixed in 1.14.0
Until you upgrade:
keep drop_foreign_namespaces=True
avoid allowlisting foreign namespaces for untrusted input
avoid allowlisting raw-text containers such as <style> in custom policies
The default JustHTML(..., sanitize=True) behavior was not found to be vulnerable in this issue.
Discovered by JustHTML author during a LLM-based security review of justhtml.
No public exploit code known to Helm's sources (Nuclei templates, Metasploit, Exploit-DB and PoC-in-GitHub). That does not mean none exists.
One EPSS score on record: 0.003 on 2026-11-24.
| Date | Score | Previous | Model |
|---|---|---|---|
| 2026-11-24 | 0.003 | first score | v2026.06.15 |