Vulnerability · Published Aug 23, 2026 · Assigned by VulnCheck
CVE-2026-5751justhtml before 1.14.0 Mutation XSS via custom sanitization policies
Medium 6.1
In plain English
A medium-severity cross-site scripting in justhtml from EmilStenstrom. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.3% (higher than 18% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official 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 packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| PyPI | justhtml | 1.14.0 | GHSA-r758-8hxw-4845 |
Affected products (as reported)
| Vendor | Product | Versions |
|---|---|---|
| EmilStenstrom | justhtml | 0 – before 1.14.0 |
Weakness: CWE-79 · Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
References
- GitHub Security Advisory (GHSA-r758-8hxw-4845) vendor-advisory
- VulnCheck Advisory: justhtml before 1.14.0 Mutation XSS via custom sanitization policies third-party-advisory