CVE-2026-5751
Received Received - Intake

justhtml mXSS via Foreign Namespace Preservation

Vulnerability report for CVE-2026-5751, including description, CVSS score, EPSS score, affected products, exploitability, helpful resources, and attack-flow context.

Publication date: 2026-08-23

Last updated on: 2026-08-23

Assigner: 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.

CVSS Scores

EPSS Scores

Probability:
Percentile:

Meta Information

Published
2026-08-23
Last Modified
2026-08-23
Generated
2026-08-23
AI Q&A
2026-08-23
EPSS Evaluated
N/A
NVD
EUVD

Affected Vendors & Products

Currently, no data is known.

Helpful Resources

Exploitability

CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-79 The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.

Attack-Flow Graph

AI Quick Actions

Instant insights powered by AI
Executive Summary

This is a mutation cross-site scripting (mXSS) vulnerability in the justhtml library versions 1.13.0 and earlier. It occurs when using custom sanitization policies that preserve foreign namespaces like SVG or MathML. Specially crafted input can appear safe after sanitization but becomes malicious when re-parsed by a browser or another HTML parser, allowing markup injection.

Detection Guidance

To detect this vulnerability, check if your system uses justhtml versions 1.13.0 or earlier with custom SanitizationPolicy settings that preserve foreign namespaces like SVG, MathML, or raw-text containers such as <style>. Verify if drop_foreign_namespaces=False is set or if foreign namespaces are allowlisted. Update to version 1.14.0 or later to mitigate the risk.

Impact Analysis

An attacker could exploit this to inject malicious markup that survives sanitization and becomes active HTML after re-parsing. This could lead to unauthorized actions on behalf of users, data theft, or defacement of web pages. Users are only affected if they use custom sanitization policies with settings like drop_foreign_namespaces=False or allowlisted foreign elements.

Compliance Impact

This vulnerability could lead to unauthorized data access or modification, potentially violating GDPR (data protection) and HIPAA (health information privacy) by exposing sensitive user data. Compliance may be impacted if the vulnerability results in data breaches or unauthorized access to protected information.

Mitigation Strategies
  • Update justhtml to version 1.14.0 or later to fix the vulnerability.
  • If using custom SanitizationPolicy, set drop_foreign_namespaces=True to prevent preserving foreign namespaces.
  • Avoid allowlisting foreign namespaces like SVG or MathML for untrusted input.
  • Do not allowlist raw-text containers such as <style> in custom sanitization policies.

Chat Assistant

Ask questions about this CVE
Hi! I’m here to help you understand CVE-2026-5751. Ask me anything about the vulnerability, its impact, or mitigation strategies.
0/70

EPSS Chart