🛡️ GHSA-r758-8hxw-4845 — justhtml
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
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
Affected Packages
| Software | From version | Fixed in |
|---|---|---|
| justhtml | 1.13.0 | 1.14.0 |
References
Similar Threats
- Unknown GHSA-jf6w-2mvx-633j
- Low GHSA-r8cj-3554-33mr
- Unknown GHSA-vrx2-77f2-ww34
- Low GHSA-4p64-v8f5-r2gx
- Unknown GHSA-c9vm-hv86-f23r
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.