# CVE-2026-8630: justhtml before 1.12.0 Mutation XSS via Raw Text Elements

- 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-02)
- Published: 2026-03-18T20:19:47.000Z
- Modified: 2026-10-26T11:10:00.157Z
- Also known as: GHSA-qvc2-mg72-jjhx
- Weaknesses: CWE-79
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: VulnCheck

## Description

justhtml before 1.12.0 (versions <= 1.11.0) contains a mutation cross-site scripting (mXSS) vulnerability in the serialization of raw-text elements such as <style> and <script>. When a DOM tree is processed by sanitize_dom() using a custom policy that keeps these elements, text nodes inside them are serialized literally without escaping, allowing attacker-controlled text containing the matching closing tag sequence to break out of the raw-text context and inject arbitrary HTML into the serialized output. The default sanitization policy is not affected because it drops the contents of style and script.

(As written by CVE List.)

## Affected

- EmilStenstrom justhtml: before 1.12.0 (not affected: 1.12.0)
- justhtml (PyPI): before 1.12.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 Medium `CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N`

## References

- <https://github.com/EmilStenstrom/justhtml/security/advisories/GHSA-qvc2-mg72-jjhx> (vendor-advisory, web)
- <https://www.vulncheck.com/advisories/justhtml-before-mutation-xss-via-raw-text-elements> (third-party-advisory)
- <https://github.com/EmilStenstrom/justhtml> (package)

## Sources

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

---

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