CVE-2026-5389: Improper Neutralization of Script-Related HTML Tags in a Web Page (Basic XSS) in EmilStenstrom justhtml
justhtml versions before 1.13.0 contain a cross-site scripting (XSS) vulnerability in the to_markdown() function. This occurs when serializing attacker-controlled pre content, allowing attackers to inject backticks inside sanitized pre elements. This breaks out of fixed-length code fences and enables raw HTML execution when the Markdown is rendered by CommonMark or GFM-style renderers.
AI Analysis
Technical Summary
The vulnerability in EmilStenstrom justhtml affects versions prior to 1.13.0. It is a basic cross-site scripting (XSS) flaw in the to_markdown() function. Specifically, when serializing pre elements controlled by an attacker, the presence of backticks can break out of the intended fixed-length code fences. This allows raw HTML to be executed upon rendering the generated Markdown with CommonMark or GitHub Flavored Markdown (GFM) style renderers. The CVSS 4.0 base score is 5.1, indicating a medium severity issue with network attack vector, low attack complexity, no privileges required, and user interaction needed.
Potential Impact
An attacker can inject malicious HTML code that executes in the context of users rendering the affected Markdown output. This can lead to typical XSS impacts such as session hijacking, content manipulation, or other client-side attacks. However, exploitation requires user interaction and no elevated privileges are needed.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. No official fix or patch link is provided at this time. Users should monitor the EmilStenstrom justhtml project for updates and apply any official patches when available. Until then, avoid processing untrusted input with the vulnerable to_markdown() function or apply custom sanitization to prevent backtick injection within pre elements.
CVE-2026-5389: Improper Neutralization of Script-Related HTML Tags in a Web Page (Basic XSS) in EmilStenstrom justhtml
Description
justhtml versions before 1.13.0 contain a cross-site scripting (XSS) vulnerability in the to_markdown() function. This occurs when serializing attacker-controlled pre content, allowing attackers to inject backticks inside sanitized pre elements. This breaks out of fixed-length code fences and enables raw HTML execution when the Markdown is rendered by CommonMark or GFM-style renderers.
CVSS v4.0
Score 5.1medium
Affected software
pkg:github/emilstenstrom/justhtmlRun on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The vulnerability in EmilStenstrom justhtml affects versions prior to 1.13.0. It is a basic cross-site scripting (XSS) flaw in the to_markdown() function. Specifically, when serializing pre elements controlled by an attacker, the presence of backticks can break out of the intended fixed-length code fences. This allows raw HTML to be executed upon rendering the generated Markdown with CommonMark or GitHub Flavored Markdown (GFM) style renderers. The CVSS 4.0 base score is 5.1, indicating a medium severity issue with network attack vector, low attack complexity, no privileges required, and user interaction needed.
Potential Impact
An attacker can inject malicious HTML code that executes in the context of users rendering the affected Markdown output. This can lead to typical XSS impacts such as session hijacking, content manipulation, or other client-side attacks. However, exploitation requires user interaction and no elevated privileges are needed.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. No official fix or patch link is provided at this time. Users should monitor the EmilStenstrom justhtml project for updates and apply any official patches when available. Until then, avoid processing untrusted input with the vulnerable to_markdown() function or apply custom sanitization to prevent backtick injection within pre elements.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- VulnCheck
- Date Reserved
- 2026-04-01T21:14:36.435Z
- Cvss Version
- 4.0
- State
- PUBLISHED
- Remediation Level
- null
Threat ID: 6a8afb27acd9273b49f5f723
Added to database: 08/23/2026, 13:52:39 UTC
Last enriched: 08/23/2026, 14:08:03 UTC
Last updated: 08/23/2026, 15:01:44 UTC
Views: 4
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.