Vulnerability 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.
CVSS Score
MEDIUM
Related Weaknesses (CWE)
References
- https://github.com/EmilStenstrom/justhtml/security/advisories/GHSA-r758-8hxw-484
- https://www.vulncheck.com/advisories/justhtml-before-mutation-xss-via-custom-san
FAQ
What is CVE-2026-5751?
CVE-2026-5751 is a vulnerability with a CVSS score of 6.1 (MEDIUM). 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., ...
How severe is CVE-2026-5751?
CVE-2026-5751 has been rated MEDIUM with a CVSS base score of 6.1/10. Review the CVSS metrics above for detailed severity breakdown.
Is there a patch for CVE-2026-5751?
Check the references section above for vendor advisories and patch information. Review vendor security bulletins for remediation guidance.