🛡️ GHSA-r758-8hxw-4845 — justhtml

🟢 CVSS 2.0 — Low ✅ No Known Exploit CWE-79 OSV
2.0
CVSS Score
0 Low4 Medium7 High9 Critical10

Description

justhtml: Mutation XSS with custom foreign-namespace sanitization policies

Summary

A parser-differential / mutation XSS issue was found in justhtml when using a custom sanitization policy that preserves foreign namespaces such as SVG or MathML.

Under these custom settings, specially crafted input could sanitize into HTML that looked safe at first, but became unsafe when parsed again by a browser or another HTML parser.

Impact

This issue does not affect the default safe configuration.

You may be affected if you use a custom SanitizationPolicy with settings like:

  • drop_foreign_namespaces=False
  • allowlisted foreign elements such as MathML or SVG
  • allowlisted raw-text containers such as <style>

In that case, an attacker could inject markup that survives sanitization and turns into active HTML after re-parsing.

Affected versions

  • justhtml <= 1.13.0

Fixed version

  • Fixed in 1.14.0

Workarounds

Until you upgrade:

  • keep drop_foreign_namespaces=True
  • avoid allowlisting foreign namespaces for untrusted input
  • avoid allowlisting raw-text containers such as <style> in custom policies

Notes

The default JustHTML(..., sanitize=True) behavior was not found to be vulnerable in this issue.

Credit

Discovered by JustHTML author during a LLM-based security review of justhtml.

How this vulnerability can be exploited

This issue can be reached over the network, attack complexity is high, an attacker needs no privileges on the target. A user must actively cooperate. Rated impact: confidentiality none, integrity low, availability none.

Weakness class

GHSA-r758-8hxw-4845 is classified as CWE-79: Cross-site Scripting (XSS). User-supplied data is written into a page without escaping, so attacker script runs in the browser of anyone who views it.

Affected software

GHSA-r758-8hxw-4845 is recorded against 1 package.

  • justhtml (from 1.13.0 up to 1.14.0)

Timeline and source

Published on 8 April 2026. No public exploit is currently recorded for this entry. Record sourced from OSV.

References

github.com (Web)
github.com (Web)
github.com (Package)
github.com (Web)

Details

Severity LOW
CVSS Score 2.0
CVSS Vector CVSS:4.0/AV:N/AC:H/AT:N/PR:N/UI:A/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N
CWE CWE-79
Public Exploit ✅ No
Source OSV
Published 2026-04-08
Updated 2026-08-20
Modified 2026-04-08
Fix URL N/A

Affected Packages

Software From version Fixed in
justhtml 1.13.0 1.14.0

Free Vulnerability Check

Is your site affected by GHSA-r758-8hxw-4845?

BotEraser helps you identify potentially vulnerable plugins and themes by checking your installation against GHSA-r758-8hxw-4845 and other known CVE records.

Scan My Site Free →

No credit card required  ·  Results in minutes

ⓘ Data Notice: The information presented above has been compiled from publicly available internet sources. Boteraser aggregates this data solely for informational purposes and does not independently classify, evaluate, or endorse any findings about the vulnerabilities listed. The accuracy and completeness of this information is the sole responsibility of the original publishers. Boteraser and its operators accept no liability for any decisions made based on this data.

Browse related advisories

All advisoriesGitHub AdvisoryGitHub Advisory Undated