{"id":"CVE-2026-5389","title":"justhtml versions before 1.13.0 contain a cross-site scripting vulnerability in the to_markdown() function when serializing attacker-controlled pre content","summary":"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 fixe…","severity":"medium","cvss":6.1,"cvssVector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","cwe":["CWE-80"],"vendor":"justhtml","product":"justhtml","affected":["justhtml < 1.13.0"],"patched":["justhtml 1.13.0"],"published":"2026-08-23","updated":"2026-10-12","sourceUpdated":"2026-10-12T16:10:00.220","source":"NVD","sourceUrl":"https://nvd.nist.gov/vuln/detail/CVE-2026-5389","references":[{"url":"https://github.com/EmilStenstrom/justhtml/security/advisories/GHSA-5vp3-3cg6-2rq3","label":"disclosure@vulncheck.com"},{"url":"https://www.vulncheck.com/advisories/justhtml-before-xss-via-code-fence-breakout","label":"disclosure@vulncheck.com"},{"url":"https://github.com/EmilStenstrom/justhtml/security/advisories/GHSA-5vp3-3cg6-2rq3","label":"134c704f-9b21-4f2e-91b3-4a467353bcc0"},{"url":"https://github.com/EmilStenstrom/justhtml/commit/f35f8f723c713bd8f912d86e9ec6881275ff5af9"},{"url":"https://github.com/EmilStenstrom/justhtml"},{"url":"https://github.com/EmilStenstrom/justhtml/releases/tag/v1.13.0"}],"tags":["nvd","osv","pip"],"epss":0.0023,"epssPercentile":0.13737,"aliases":["GHSA-5vp3-3cg6-2rq3"],"ecosystem":"pip","ingestedAt":"2026-08-24T19:25:44.090Z","slug":"CVE-2026-5389","body":"## Overview\n\njusthtml 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.\n\n## Remediation\n\nRefer to the linked advisories for vendor-supplied fixes and affected version ranges.\n\n## Package advisory (CVE-2026-5389)\n\nAffected packages:\n\n- `justhtml < 1.13.0`\n\nPatched in:\n\n- `justhtml 1.13.0`\n\nSource: https://osv.dev/vulnerability/GHSA-5vp3-3cg6-2rq3","depth":"sunlit","depthScore":34,"depthScoreParts":{"impact":33.6,"likelihood":0,"exploitation":0,"ransomware":0},"changes":[{"seq":219484,"id":"CVE-2026-5389","ts":1791824360048,"field":"cvss","old":null,"new":"6.1"},{"seq":219483,"id":"CVE-2026-5389","ts":1791824360048,"field":"severity","old":"high","new":"medium"}]}