# CVE-2026-5751: justhtml before 1.14.0 Mutation XSS via custom sanitization policies

- Severity: Medium 5.1 (CVSS:4.0, scored by VulnCheck) `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`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.19%, higher than 8% of CVEs (2026-12-01)
- Published: 2026-04-08T00:06:17.000Z
- Modified: 2026-10-12T16:10:00.220Z
- Also known as: GHSA-r758-8hxw-4845
- Weaknesses: CWE-79
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: 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.

(As written by CVE List.)

## Affected

- EmilStenstrom justhtml: before 1.14.0 (not affected: 1.14.0)
- justhtml (PyPI): from 1.13.0 before 1.14.0

## Every score

- VulnCheck: CVSS:4.0 5.1 Medium `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`
- VulnCheck: CVSS:3.1 6.1 Medium `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N`
- GitHub: CVSS:4.0 Low `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`

## References

- <https://github.com/EmilStenstrom/justhtml/security/advisories/GHSA-r758-8hxw-4845> (vendor-advisory, web)
- <https://www.vulncheck.com/advisories/justhtml-before-mutation-xss-via-custom-sanitization-policies> (third-party-advisory)
- <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)

## Sources

- CVE List: [CVE-2026-5751](https://www.cve.org/CVERecord?id=CVE-2026-5751), CVE Terms of Use, modified 2026-08-24
- GitHub Advisory Database: [GHSA-r758-8hxw-4845](https://github.com/advisories/GHSA-r758-8hxw-4845), CC-BY-4.0, modified 2026-08-24
- NVD: [CVE-2026-5751](https://nvd.nist.gov/vuln/detail/CVE-2026-5751), Public domain, modified 2026-10-12

---

Page: https://cve.day/CVE-2026-5751 · Whole record: https://cve.day/CVE-2026-5751.json · Rebuilt by cve.day 2026-11-25T22:59:34.967Z
