Skip to main content

HtmlUnit Neko CVE-2026-104828

| EUVDEUVD-2026-102316 HIGH
Cross-site Scripting (XSS) (CWE-79)
2026-10-15 GitHub_M
7.2
CVSS 3.1 · Vendor: GitHub_M
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Submit entity-encoded markup inside TEXTAREA/TITLE
  2. Delivery
    Sanitizer pipeline parses and decodes entities
  3. Exploit
    HTMLWriterFilter re-emits content as raw markup
  4. Execution
    Victim browser renders injected script
  5. Impact
    Execute XSS in victim session

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Output encoding, context-aware escaping
MITRE ATT&CK

2 techniques across 2 tactics: Initial Access, Execution

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Exploitation requires that the consuming application use htmlunit-neko (prior to 5.4.0) as the serialization stage of a parse-transform-serialize flow - specifically an HTML sanitizer, content filter, or normalizer that relies on HTMLWriterFilter to re-emit parsed HTML - AND that the serialized output is subsequently rendered by a browser. The attacker must be able to supply HTML in which entity-encoded markup appears inside the escapable raw-text elements TEXTAREA or TITLE; the parser decodes those entities and printCharacters() writes them back as raw markup. Limiting factors that reduce real-world risk: the flaw is inert if htmlunit-neko is used only for parsing/inspection and not for producing sanitized output, if a different serializer is used, or if output is never rendered in a browser; it is also limited to deployments running a version before 5.4.0.

Impact

This is a CWE-79 cross-site scripting sanitizer-bypass in the htmlunit-neko library, scored CVSS 7.2 (High) with vector AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:L/A:N - network reachable, low complexity, no privileges, no user interaction, and a scope change reflecting that injected markup executes in a separate component (the victim's browser). No EPSS probability, CISA KEV entry, or public POC was provided in the input, so there is no public exploit identified at time of analysis and no evidence of active exploitation; the 7.2 is driven largely by the scope change rather than by observed in-the-wild activity. The practical risk is strongly conditional: this is not a flaw that triggers against htmlunit-neko in isolation but only when the library is used as the serialization stage of a parse-transform-serialize sanitizer or content-filter pipeline whose output is subsequently rendered by a browser. Teams using htmlunit-neko purely for parsing/testing (its HtmlUnit headless-browser lineage) and not for security sanitization face materially lower risk. Overall this is a legitimate 'patch it' issue for anyone relying on htmlunit-neko to sanitize untrusted HTML, but absent EPSS/KEV/POC signals it is not an emergency drop-everything item for most deployments. Note the provided vector asserts UI:N, which is reasonable for a stored/persistent XSS where any later viewer triggers execution, but differs from classic reflected-XSS UI:R assumptions - verify against your rendering model.

Exploit ScenarioDerived

An attacker submits content containing entity-encoded HTML (e.g. '<script>...') placed inside a TITLE or TEXTAREA element to an application that uses htmlunit-neko to sanitize or normalize HTML. During the parse-and-serialize round trip the parser decodes the entity references and HTMLWriterFilter re-emits them as raw markup, so the supposedly sanitized output contains live executable markup that runs when a victim later renders the page. No public exploit identified at time of analysis, though the fix commit and canonical-HTML test fixtures publicly illustrate the decoding-to-raw-markup behavior.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
Patch available 0.3% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Oct 15, 2026

Cross-site scripting in HtmlUnit Neko (htmlunit-neko) before 5.4.0 lets an unauthenticated remote attacker smuggle executable markup out of HTML sanitizers and content filters that use the library to serialize parsed HTML. HTMLWriterFilter fails to entity-encode decoded TEXTAREA and TITLE text, so entity-encoded markup supplied inside those elements is decoded on parse and re-emitted as literal markup by printCharacters(); output rendered by a victim's browser executes in that browser, which is why the CVSS 3.1 score of 7.2 (High) carries a scope change (S:C) on the vector AV:N/AC:L/PR:N/UI:N. The flaw is only reachable in a parse-transform-serialize pipeline that both relies on HTMLWriterFilter for its output and renders that output in a browser, and no public exploit code was identified at time of analysis; the issue is fixed in 5.4.0.

RemediationAI

Vendor-released patch: 5.4.0 - upgrade htmlunit-neko to version 5.4.0 (or later) from https://github.com/HtmlUnit/htmlunit-neko/releases/tag/5.4.0, which incorporates the fix commit c165891e0753aef3e05f5daa6250d3e8d4ada3c0 and restores entity encoding of TEXTAREA and TITLE content; this is the only complete fix and should be the default action for any application in the affected parse-transform-serialize path. For deployments that cannot upgrade immediately, actionable compensating controls include: stop using HTMLWriterFilter as the serialization stage of a sanitizer or normalizer and substitute a serializer that unconditionally entity-encodes escapable raw-text elements (trade-off: output byte-for-byte differs from current behavior and downstream consumers or tests may expect htmlunit-neko canonical form); post-process serialized output to entity-encode <, >, & and, where relevant, / and = inside TITLE and TEXTAREA content before it is stored or served (trade-off: requires careful, context-aware rewriting and can corrupt legitimate decoded text if applied too broadly); or remove TITLE and TEXTAREA from the set of elements the sanitizer permits, stripping their content entirely (trade-off: reduces allowed markup and may break legitimate content authoring). Do not treat HTMLWriterFilter output as sanitized until the library is upgraded, and validate against the advisory at https://github.com/HtmlUnit/htmlunit-neko/security/advisories/GHSA-39xg-prhf-8785.

Affected VersionsENISA

htmlunit-neko < 5.4.0

Affected Packages

euvd htmlunit_neko fix: 5.4.0

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

The root cause is CWE-79 (Improper Neutralization of Input During Web Page Generation, i.e. cross-site scripting) arising from incorrect serializer context handling in htmlunit-neko, an HtmlUnit adaptation of NekoHTML. HTML and HTML-like markup define escapable raw-text elements - notably TEXTAREA and TITLE - whose content is generally treated as text rather than parsed as child markup, but which the parser still entity-decodes. HTMLWriterFilter tracked whether to entity-encode character output with a boolean 'normalize_' derived from the generic isSpecial() classification of the current element; because TEXTAREA and TITLE were considered special content, printCharacters() wrote their decoded contents back verbatim. On a parse-and-serialize round trip this changes document semantics: an entity such as &lt;script&gt; inside a TITLE or TEXTAREA is decoded by the parser into <script>, then emitted as raw markup instead of being re-escaped. The upstream commit c165891e0753aef3e05f5daa6250d3e8d4ada3c0 corrects this by keying normalization off the element code and skipping normalization only for the genuinely raw-text elements PLAINTEXT, SCRIPT, STYLE and XMP; updated canonical-HTML test fixtures show TITLE content now serialized as entities (e.g. &lt;&sol;head&gt;&lt;body&gt; and &agrave;&comma;). The affected component is identified by CPE cpe:2.3:a:htmlunit:htmlunit-neko:*:*:*:*:*:*:*:*, with the library consumed as a Java dependency by downstream applications, meaning the vulnerable code path must be invoked by the integrating application rather than exposed directly by the library itself.

Know when Htmlunit gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (GitHub_M) PRIMARY 7.2 HIGH
AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:L/A:N
vuln.today AI 7.2 HIGH

Attacker-controlled encoded input needs no authentication (PR:N) and is network-reachable (AV:N); the library-level decode-to-raw-markup triggers reliably (AC:L), and injected script crosses into the browser (S:C) with limited C/I and no availability impact.

3.1 AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:L/A:N
4.0 AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N

Primary rating from Vendor (GitHub_M).

CVSS VectorVendor: GitHub_M

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Changed
Confidentiality
Low
Integrity
Low
Availability
None

Lifecycle Timeline

2
Patch available
Oct 15, 2026 - 20:03 EUVD
CVE Published
Oct 15, 2026 - 18:36 cve.org
HIGH 7.2

DescriptionCVE.org

HtmlUnit Neko is an HtmlUnit adaptation of NekoHTML. Prior to 5.4.0, HTMLWriterFilter writes decoded TEXTAREA and TITLE character content without entity encoding because both elements are treated as special content. During a parse-and-serialize round trip, entity references inside these escapable raw-text elements are decoded by the parser and then emitted as raw markup by printCharacters(), changing the document's semantics. Applications that use htmlunit-neko in an HTML sanitizer, content filter, or other parse-transform-serialize pipeline can therefore turn attacker-controlled encoded text into executable markup when the output is rendered by a browser. This issue is fixed in version 5.4.0.

Technical POC Analysis

CWE-79 (Improper Neutralization of Input During Web Page Generation).

Full technical POC analysis - root cause, step-by-step exploitation and patch breakdown - is part of the Pro and Business plans.

Executive ViewAI

Why It Matters

HtmlUnit Neko, a Java library commonly embedded in server-side HTML sanitization and content-filtering pipelines, can be induced to re-emit attacker-supplied markup that a victim's browser then executes, placing end users of any web application that serializes untrusted HTML with the library at risk of session theft and client-side compromise. The flaw requires no authentication and is triggered by ordinary browsing activity, so the exposure is customer- and employee-facing rather than confined to back-end infrastructure. It is only reachable in deployments that both rely on HTMLWriterFilter for output and render that output in a browser, meaning the practical blast radius depends on how many internal applications follow that pattern.

Business Impact: High
Compensating Controls

No patch is confirmed available per the advisory metadata, so apply interim mitigations: remove or bypass HTMLWriterFilter-based serialization of untrusted HTML, entity-encode decoded TEXTAREA and TITLE text before output, enforce a strict Content-Security-Policy on any page rendering sanitized markup, and run a second independent sanitizer over the final output; upgrade to htmlunit-neko 5.4.0 or later as soon as the vendor confirms availability.

Threat Intelligence Overview

EPSS Score
0.3%
Top 83% exploitable
Prevalence
Medium
Java HTML-parsing library embedded in some sanitizer/filter pipelines, not ubiquitous
Data Quality
5 sources
Confidence: Medium

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity HIGH
CISA KEV No
Public POC No
EPSS 0.3%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation· derived
None
System Exposure· derived
Open
Automatable· derived
Yes
Human Impact
High

Priority Score

36
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +36
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Cross-Site Scripting occurs when an application accepts untrusted data and sends it to a web browser without proper validation or encoding.

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy