# CVE-2026-5389: justhtml before 1.13.0 XSS via code fence breakout

- 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.23%, higher than 14% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2026-03-24T19:22:21.000Z
- Modified: 2026-10-12T16:10:00.220Z
- Also known as: GHSA-5vp3-3cg6-2rq3
- Weaknesses: CWE-79, CWE-80
- SSVC (CISA-ADP): exploitation poc, automatable no, technical impact partial
- Assigned by: VulnCheck

## Description

justhtml versions before 1.13.0 contain a cross-site scripting vulnerability in the to_markdown() function when serializing attacker-controlled pre content. Attackers can place backticks inside sanitized pre elements to break out of fixed-length code fences, allowing raw HTML to execute when the generated Markdown is rendered by CommonMark or GFM-style renderers.

(As written by CVE List.)

## Affected

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

## References

- <https://github.com/EmilStenstrom/justhtml/security/advisories/GHSA-5vp3-3cg6-2rq3> (exploit, vendor-advisory, web)
- <https://www.vulncheck.com/advisories/justhtml-before-xss-via-code-fence-breakout> (third-party-advisory)
- <https://github.com/EmilStenstrom/justhtml/commit/f35f8f723c713bd8f912d86e9ec6881275ff5af9> (web)
- <https://github.com/EmilStenstrom/justhtml> (package)
- <https://github.com/EmilStenstrom/justhtml/releases/tag/v1.13.0> (web)

## Sources

- CVE List: [CVE-2026-5389](https://www.cve.org/CVERecord?id=CVE-2026-5389), CVE Terms of Use, modified 2026-08-24
- GitHub Advisory Database: [GHSA-5vp3-3cg6-2rq3](https://github.com/advisories/GHSA-5vp3-3cg6-2rq3), CC-BY-4.0, modified 2026-08-24
- NVD: [CVE-2026-5389](https://nvd.nist.gov/vuln/detail/CVE-2026-5389), Public domain, modified 2026-10-12

---

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