CVE-2026-8630: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') in EmilStenstrom justhtml
Description
justhtml versions before 1.12.0 contain a mutation cross-site scripting (mXSS) vulnerability in the serialization of raw-text elements like <style> and <script>. This occurs when a custom sanitization policy that retains these elements is used, allowing attacker-controlled text to break out of the raw-text context and inject arbitrary HTML. The default sanitization policy is not affected as it removes the contents of style and script elements.
CVSS v4.0
Score 5.1medium
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-8630 is a mutation cross-site scripting vulnerability in justhtml prior to version 1.12.0 (<=1.11.0). The flaw arises during serialization of raw-text elements such as <style> and <script> when sanitize_dom() is used with a custom policy that preserves these elements. Text nodes inside these elements are serialized literally without escaping, enabling an attacker to inject arbitrary HTML by including matching closing tag sequences in the input. The default sanitization policy is not vulnerable because it drops the contents of style and script elements, preventing this injection.
Potential Impact
An attacker can exploit this vulnerability to inject arbitrary HTML into the serialized output when a custom sanitization policy that retains <style> or <script> elements is used. This could lead to cross-site scripting attacks if the serialized output is rendered in a browser context. The default sanitization policy is not affected, so only users employing custom policies that keep these raw-text elements are at risk.
Mitigation Recommendations
Upgrade justhtml to version 1.12.0 or later where this vulnerability is fixed. If upgrading is not immediately possible, avoid using custom sanitization policies that retain <style> or <script> elements, or ensure that text nodes inside these elements are properly escaped during serialization. Patch status is not explicitly confirmed in the input data, but the presence of a fixed version 1.12.0 indicates an official fix is available.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- VulnCheck
- Date Reserved
- 2026-05-14T18:57:10.898Z
- Cvss Version
- 4.0
- State
- PUBLISHED
Threat ID: 6a8afb28acd9273b49f5f731
Added to database: 08/23/2026, 13:52:40 UTC
Last enriched: 09/10/2026, 23:18:58 UTC
Last updated: 10/06/2026, 06:48:21 UTC
Views: 150
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.