Loading advisory.
Loading advisory.
Multiple security fixes in justhtml
justhtml 1.16.0 fixes multiple security issues in sanitization, serialization, and programmatic DOM handling.
Published 2026-04-14 20:05 UTC · Modified 2026-08-24 18:14 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.16.0 versions 0.1.0, 0.10.0, 0.11.0, 0.12.0, 0.13.0, 0.13.1, 0.14.0, 0.15.0, 0.16.0, 0.17.0, 0.18.0, 0.19.0, 0.2.0, 0.20.0, 0.21.0, 0.22.0, 0.23.0, 0.24.0, 0.25.0, 0.26.0 and 40 more | 1.16.0 | pip install --upgrade 'justhtml>=1.16.0' |
justhtml 1.16.0 fixes multiple security issues in sanitization, serialization, and programmatic DOM handling.
Most of these issues affected one of these advanced paths rather than ordinary parsed HTML with the default safe settings:
programmatic DOM input to sanitize() or sanitize_dom()
reused or mutated sanitization policy objects
custom policies that preserve foreign namespaces such as SVG or MathML
justhtml <= 1.15.0
justhtml 1.16.0 released on April 12, 2026
Nested mutation of sanitization policy internals could weaken later sanitization by leaving stale compiled sanitizers active, or by mutating exported default policy internals process-wide.
Programmatic DOM sanitization could miss dangerous mixed-case tag names such as ScRiPt or StYlE, and custom drop_content_tags values such as {"SCRIPT"} could silently fail to drop dangerous subtrees.
Crafted programmatic doctype names could serialize into active markup before the document body.
Custom policies that preserve SVG or MathML could allow active SVG features to survive sanitization, including:
animation elements such as <set> and <animate> that mutate already-sanitized attributes after sanitization
presentation attributes such as fill, clip-path, mask, marker-start, and cursor containing external url(...) references
programmatic DOM trees that claim namespace="html" but serialize as <svg> or <math>, bypassing foreign-content checks
Mixed-case programmatic style or script nodes could bypass rawtext hardening and preserve active stylesheet content such as remote @import rules.
Most of these issues did not affect the normal JustHTML(..., sanitize=True) path for ordinary parsed HTML.
The main exceptions were policy-mutation issues, which could weaken later sanitization if code mutated nested state on reused policy objects or exported defaults.
Upgrade to justhtml 1.16.0.
If you cannot upgrade immediately:
do not mutate DEFAULT_POLICY, DEFAULT_DOCUMENT_POLICY, or nested policy internals
avoid reusing policy objects after mutating nested state
avoid preserving SVG or MathML for untrusted input
avoid preserving style or script in custom policies for untrusted input
avoid serializing untrusted programmatic doctypes or DOM trees
Discovered during an internal 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.006 on 2026-11-24.
| Date | Score | Previous | Model |
|---|---|---|---|
| 2026-11-24 | 0.006 | first score | v2026.06.15 |