What’s Vulnerable › Vulnerabilities
CVE-2026-5751: justhtml before 1.14.0 Mutation XSS via custom sanitization policies
- Severity: medium (CVSS 6.1 v3.1)
- Exploited in the wild: not listed in CISA KEV
- EPSS: 0.3% probability of exploitation in the next 30 days
- Public exploit or detection template: none known
- Published: 2026-08-23 · updated 2026-10-12
- Weakness: CWE-79
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
- EmilStenstrom justhtml: before 1.14.0 — fixed in 1.14.0
How to fix
Upgrade to a fixed version: EmilStenstrom justhtml 1.14.0. Check the vendor advisory for mitigations.
References
- https://github.com/EmilStenstrom/justhtml/security/advisories/GHSA-r758-8hxw-4845
- https://www.vulncheck.com/advisories/justhtml-before-mutation-xss-via-custom-sanitization-policies
Get alerted when CVE-2026-5751 or the next vulnerability affects your stack