lowVulnerability

GHSA-4p64-v8f5-r2gx

## Summary `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 ## Affected versions - `justhtml` `<= 1.15.0` ## Fixed version - `justhtml` `1.16.0` released on April 12, 2026 ## Impact ### Policy reuse and mutation 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. ### In-memory sanitization gaps 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. ### Serialization injection Crafted programmatic doctype names could serialize into active markup before the document body. ### Foreign-namespace policy bypasses 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 ### Rawtext hardening gap Mixed-case programmatic `style` or `script` nodes could bypass rawtext hardening and preserve active stylesheet content such as remote `@import` rules. ## Default configuration Most of these issues did **not** affect the normal `JustHTML(..., sanitize=True)` path for ordinary parsed HTML. The main

Properties

ghsa_id
GHSA-4p64-v8f5-r2gx
summary
Multiple security fixes in justhtml
severity
low
cve_id
GHSA-4p64-v8f5-r2gx
is_ghsa_only
true
ghsa_published
2026-04-14T20:05:10Z
source_url
https://github.com/advisories/GHSA-4p64-v8f5-r2gx
ghsa_updated
2026-04-14T20:05:11Z

Related Entities (7)

HAS_WEAKNESS (4)

[Weakness]Interpretation Conflict
[Weakness]Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
[Weakness]Modification of Assumed-Immutable Data (MAID)
[Weakness]Improper Handling of Case Sensitivity

REPORTED_BY (1)

[Source]GitHub Advisory Database

VULNERABLE_TO (1)

[Software]pip/justhtml

AFFECTS (1)

[Software]pip/justhtml

Explore deeper with Ninja Signal's threat intelligence graph

GHSA-4p64-v8f5-r2gx — Ninja Signal Threat Intelligence | Ninja Signal