Skip to content
OpenAdvisories
Medium · 6.1 CVE-2026-5751 EUVD-2026-64654GHSA-3227-3f97-9f2qGHSA-r758-8hxw-4845

justhtml before 1.14.0 Mutation XSS via custom sanitization policies

Published Aug 23, 2026 · Updated Aug 24, 2026 · Assigned by VulnCheck

Description

justhtml versions 1.13.0 and earlier contain a parser-differential / mutation cross-site scripting (mXSS) vulnerability when using a custom SanitizationPolicy that preserves foreign namespaces (e.g., drop_foreign_namespaces=False with allowlisted SVG/MathML elements or raw-text containers such as <style>). Specially crafted input can sanitize into markup that appears safe but becomes unsafe when re-parsed by a browser or another HTML parser, allowing markup injection. The default safe configuration (sanitize=True) is not affected. Fixed in 1.14.0.

Affected products

VendorProductAffectedFixed
EmilStenstrom justhtml < 1.14.0 1.14.0

Affected packages

EcosystemPackageAffectedFixedRecord
PyPI justhtml >= 1.13.0, < 1.14.0 1.14.0 GHSA-r758-8hxw-4845

References