CVE-2026-5388: Improper Input Validation in EmilStenstrom justhtml
Description
justhtml versions before 1.15.0 have multiple security issues related to improper input validation in URL sanitization helpers, HTML serialization, Markdown passthrough, and custom sanitization policies. These issues can allow attackers to bypass sanitization and inject active HTML and JavaScript, potentially leading to cross-site scripting (XSS) vulnerabilities. The default sanitize=true configuration is mostly unaffected; the vulnerabilities primarily impact custom policies, helper APIs, programmatic DOM construction, and html_passthrough=true settings.
CVSS v4.0
Score 9.3critical
Affected software
EmilStenstrom
justhtml
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
CVE-2026-5388 describes multiple security flaws in justhtml before version 1.15.0 involving improper input validation in URL sanitization helpers (clean_url_value and clean_url_in_js_string), HTML serialization, Markdown passthrough with html_passthrough=True, and several edge cases in custom sanitization policies. These flaws enable attackers to bypass sanitization controls and inject active HTML and JavaScript code. Examples include injection via encoded javascript: URLs, backslash-based relative URLs resolved as remote hosts, markup-breaking element or attribute names, HTML comments, raw </textarea> tags reintroduced through Markdown passthrough, and preservation of <style>, <meta http-equiv=refresh>, and <base href> tags in custom policies. The default sanitize=true configuration is largely unaffected, with most issues arising in custom or programmatic use cases.
Potential Impact
The vulnerability allows attackers to bypass sanitization and inject active HTML and JavaScript, which can lead to cross-site scripting (XSS) attacks. This can result in unauthorized script execution in the context of users of applications relying on affected justhtml versions, potentially compromising user data, session integrity, or enabling other malicious actions. The impact is critical given the high CVSS score (9.3) and the ability to execute code without user interaction or privileges.
Mitigation Recommendations
No official patch or remediation level is currently confirmed. Users should upgrade to justhtml version 1.15.0 or later once available, as the vulnerability affects versions before 1.15.0. Until a fix is confirmed, avoid using custom sanitization policies, html_passthrough=True, and programmatic DOM construction features that rely on vulnerable sanitization helpers. Use the default sanitize=true configuration where possible to reduce exposure. Monitor the vendor advisory for updates on official fixes.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- VulnCheck
- Date Reserved
- 2026-04-01T21:11:10.753Z
- Cvss Version
- 4.0
- State
- PUBLISHED
Threat ID: 6a8afb27acd9273b49f5f721
Added to database: 08/23/2026, 13:52:39 UTC
Last enriched: 09/10/2026, 12:52:54 UTC
Last updated: 10/05/2026, 18:48:20 UTC
Views: 71
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.