CVE-2026-5751
MEDIUM 5.1CVSS 4.0justhtml: Mutation XSS with custom foreign-namespace sanitization policies
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.
- Published
- 23 Aug 2026
- Last modified
- 12 Oct 2026
- Assigned by
- disclosure@vulncheck.com
- NVD status
- Deferred
- Weakness
- CWE-79
- Also known as
- GHSA-r758-8hxw-4845
- Sources
- NVDJSONOSV GHSA-r758-8hxw-4845JSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| NVD | disclosure@vulncheck.com (Secondary) | CVSS 4.0 | MEDIUM 5.1 | CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:A/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X |
| OSV | GitHub | CVSS 4.0 | CVSS:4.0/AV:N/AC:H/AT:N/PR:N/UI:A/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N | |
| NVD | disclosure@vulncheck.com (Secondary) | CVSS 3.1 | MEDIUM 6.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| OSV | PyPI | justhtml | >= 1.13.0, < 1.14.0 | 1.14.0 |
References
- https://github.com/EmilStenstrom/justhtml/security/advisories/GHSA-r758-8hxw-4845 · WEB
- https://www.vulncheck.com/advisories/justhtml-before-mutation-xss-via-custom-sanitization-policies
- https://github.com/EmilStenstrom/justhtml/commit/8adc4dfe31723dc522f44338f9bd98381c92b076 · WEB
- https://github.com/EmilStenstrom/justhtml · PACKAGE
- https://github.com/EmilStenstrom/justhtml/releases/tag/v1.14.0 · WEB
History
- 25 Nov 2026 21:04 UTC · NVD: first stored (published 23 Aug 2026)
- 25 Nov 2026 20:12 UTC · OSV: first stored (published 8 Apr 2026)