Monitor vulnerabilities like this one.
Sign up free to get alerted when software you use is affected.
9.3
Justhtml 1.16.0 fixes security risks in HTML sanitization
published 11 days ago
Summary
Justhtml versions 1.15.0 and earlier have security weaknesses in how they handle certain HTML inputs. This can lead to malicious code being executed when sanitizing HTML. To fix this, update to Justhtml version 1.16.0, released on April 12, 2026. This version includes security patches to prevent potential attacks.
What to do
- Update justhtml to version 1.16.0.
- Update emilstenstrom justhtml to version 1.16.0 or later.
Affected software
| Ecosystem | Vendor | Product | Affected versions |
|---|---|---|---|
| PyPI | – | justhtml |
< 1.16.0 Fix: upgrade to 1.16.0
|
| – | emilstenstrom | justhtml | < 1.16.0 |
Original advisory text
justhtml before 1.16.0 Multiple Security Issues via Sanitization
justhtml before 1.16.0 contains multiple HTML sanitization bypass issues that can allow active/dangerous content (e.g., script or style) to survive sanitization, potentially leading to cross-site scripting. The issues primarily affect advanced usage rather than the default JustHTML(..., sanitize=True) path for ordinary parsed HTML: mutating or reusing sanitization policy objects (including exported defaults) could weaken later sanitization; programmatic DOM input to sanitize()/sanitize_dom() could miss mixed-case tag names (e.g., ScRiPt, StYlE); crafted programmatic doctype names could serialize into active markup; and custom policies preserving SVG or MathML could allow animation elements, presentation attributes with external url(...) references, or DOM trees mislabeled as namespace="html" to bypass foreign-content checks. Fixed in 1.16.0.
Severity
9.3
Critical
CVSS 4.0: 7.5 (OSV)
Type
CWE-178Improper Handling of Case Sensitivity
CWE-436Interpretation Conflict
CWE-471Modification of Assumed-Immutable Data (MAID)
CWE-79Cross-site Scripting (XSS)
CWE-20Improper Input Validation
Timeline
Published23 Aug 2026
Updated24 Aug 2026
First seen14 Apr 2026
Sources
GHSA-4p64-v8f5-r2gx · OSV
Monitor software like this
Free during beta