Summary
justhtml includes multiple security fixes
justhtml 1.15.0 includes multiple security fixes affecting URL sanitization helpers, HTML serialization, Markdown passthrough, and several custom sanitization-policy edge cases.
These issues have different impact levels and do not all affect the default configuration in the same way.
Affected versions
justhtml<= 1.14.0
Fixed version
justhtml1.15.0released on April 9, 2026
Impact overview
Helper and serialization issues
These issues could affect applications using JustHTML helpers or programmatic DOM construction, even outside the default HTML sanitization path.
JustHTML.clean_url_value(...)andclean_url_in_js_string(...)could accept URL values such asjavascript:..., which became activejavascript:URLs after HTML attribute parsing.- URL sanitization could treat values like
\\evil.example/xor/\\evil.example/xas safe relative URLs even though browsers could resolve them as remote requests. - Malformed bracketed hosts such as
https://[evil.example]/xcould raise exceptions and crash sanitization when host allowlists were used. - Programmatic element or attribute names containing markup-breaking characters could be serialized into active HTML.
- Programmatic HTML comments containing
-->could break out of the comment and inject live markup.
Markdown passthrough issue
to_markdown(html_passthrough=True)could reintroduce active HTML from sanitized<textarea>content by emitting a raw closing</textarea>sequence.
Custom policy issues
These issues affected custom policies more than the default safe configuration.
a[ping]was handled as a single URL even though browsers interpret it as a space-separated URL list.attributionsrcwas not treated as URL-bearing and could preserve attacker-controlled reporting endpoints.link[imagesrcset]was not treated as URL-bearing and could preserve attacker-controlled image candidates.- Preserved
<meta http-equiv="refresh">tags could keep redirect targets without URL-policy enforcement. - Preserved
<base href>tags could rewrite how later relative URLs resolved in the browser. - Preserved
<style>blocks could keep resource-loading CSS such as@import,url(...), orimage-set(...). - Mixed-case attribute names in custom transform pipelines could bypass or confuse security-related transforms such as
DropAttrs(...),DropUrlAttrs(...),AllowStyleAttrs(...), andMergeAttrs(...).
Default configuration
Most of the custom-policy issues above did not affect the default JustHTML(..., sanitize=True) behavior.
The main exceptions were:
- helper APIs such as
clean_url_value(...) - programmatic DOM / serializer usage
- applications explicitly using
html_passthrough=True - applications using custom policies or custom transform pipelines
Recommended action
Upgrade to justhtml 1.15.0.
If you cannot upgrade immediately:
- avoid
html_passthrough=Truefor untrusted content - avoid preserving
<style>,<meta http-equiv="refresh">, and<base href>in custom policies - avoid allowing
ping,attributionsrc, orimagesrcsetunless you explicitly validate them - avoid serializing untrusted programmatic node names, attribute names, or comment data
Impact
The application does not adequately validate input before processing it, allowing unexpected values to reach sensitive code paths. Typical impact: varies by context: data corruption, logic bypass, or denial of service.
Affected versions
Security releases
Kodem intelligence
Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.
Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter. Kodem's runtime-powered SCA identifies whether this CVE is reachable in your applications.
Already deployed Kodem?
See it in your environmentNew to Kodem? Get a demo →Remediation advice
Kodem Kai can prioritize this vulnerability in your dependency tree and generate a fix recommendation.
Frequently Asked Questions
- What is GHSA-C9VM-HV86-F23R? GHSA-C9VM-HV86-F23R is a medium-severity improper input validation vulnerability in justhtml (pip), affecting versions <= 1.14.0. It is fixed in 1.15.0. The application does not adequately validate input before processing it, allowing unexpected values to reach sensitive code paths.
- Which versions of justhtml are affected by GHSA-C9VM-HV86-F23R? justhtml (pip) versions <= 1.14.0 is affected.
- Is there a fix for GHSA-C9VM-HV86-F23R? Yes. GHSA-C9VM-HV86-F23R is fixed in 1.15.0. Upgrade to this version or later.
- Is GHSA-C9VM-HV86-F23R exploitable, and should I be worried? Whether GHSA-C9VM-HV86-F23R is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
- What actually determines whether GHSA-C9VM-HV86-F23R is exploitable, and how bad it is? Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.
- How do I fix GHSA-C9VM-HV86-F23R? Upgrade
justhtmlto 1.15.0 or later.