Skip to main content
EPSS 0.3%top 83%

CVE-2026-5751: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') in EmilStenstrom justhtml

0
Medium
VulnerabilityCVE-2026-5751cvecve-2026-5751
Published: 08/23/2026 (08/23/2026, 13:34:10 UTC)
Source: CVE Database V5
Vendor/Project: EmilStenstrom
Product: justhtml

Description

justhtml versions 1.13.0 and earlier have a mutation cross-site scripting (mXSS) vulnerability when using a custom SanitizationPolicy that preserves foreign namespaces. This vulnerability allows specially crafted input to be sanitized into markup that appears safe but becomes unsafe when re-parsed by a browser or another HTML parser, enabling markup injection. The default safe configuration is not affected. The issue is fixed in version 1.14.0.

CVSS v4.0

Score 5.1medium

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
None
User Interaction
Active
Vuln. Confidentiality
None
Vuln. Integrity
None
Vuln. Availability
None
Subsq. Confidentiality
Low
Subsq. Integrity
Low
Subsq. Availability
None
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:A/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N

Affected software

EmilStenstrom

justhtml

Affected versions
>=0 <1.14.0
GitHub Actionsmore threats →ai
emilstenstrom/justhtml
pkg:github/emilstenstrom/justhtml
Affected versions
<=1.13.0

Run 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

AILast updated: 09/10/2026, 23:32:42 UTC

Technical Analysis

CVE-2026-5751 is a mutation cross-site scripting (mXSS) vulnerability in justhtml up to version 1.13.0. It occurs when a custom SanitizationPolicy is used that preserves foreign namespaces (e.g., drop_foreign_namespaces=False with allowlisted SVG/MathML elements or raw-text containers like <style>). The vulnerability arises because input sanitized under these conditions can be transformed into markup that appears safe but becomes unsafe upon re-parsing by browsers or other HTML parsers, allowing markup injection. The default configuration with sanitize=True is not vulnerable. The vulnerability is fixed in version 1.14.0.

Potential Impact

An attacker can inject unsafe markup through specially crafted input when a vulnerable version of justhtml is used with a custom SanitizationPolicy preserving foreign namespaces. This can lead to cross-site scripting attacks, potentially allowing execution of malicious scripts in the context of affected web pages. The default safe configuration is not affected, limiting exposure to configurations that explicitly enable the vulnerable sanitization policy.

Mitigation Recommendations

Upgrade justhtml to version 1.14.0 or later, where this vulnerability is fixed. Avoid using custom SanitizationPolicy configurations that preserve foreign namespaces unless necessary and ensure they are updated to the fixed version. The default configuration (sanitize=True) is not affected and does not require changes.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

Technical Details

Data Version
5.2
Assigner Short Name
VulnCheck
Date Reserved
2026-04-07T15:54:18.686Z
Cvss Version
4.0
State
PUBLISHED

Threat ID: 6a8afb27acd9273b49f5f725

Added to database: 08/23/2026, 13:52:39 UTC

Last enriched: 09/10/2026, 23:32:42 UTC

Last updated: 10/07/2026, 06:48:17 UTC

Views: 86

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

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

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses