Oct 1, 2026·6 min read·44 visits
A critical vulnerability in Hono's JSX rendering engine allows unescaped user inputs to bypass HTML serialization. Attackers can inject arbitrary script payloads into Suspense, ErrorBoundary, Context.Provider, or direct render pipelines, resulting in unauthenticated Cross-Site Scripting.
An improper neutralization of input during web page generation (CWE-79) vulnerability exists in the server-side rendering JSX engine (hono/jsx) of the Hono web framework prior to version 4.13.7. The flaw enables unauthenticated remote attackers to execute arbitrary JavaScript in the victim's browser context by supplying unescaped HTML characters into user-controlled fields rendered within specific boundary components, context providers, or direct server-side utilities.
Hono is a high-performance web framework designed for edge-computing environments, Cloudflare Workers, and Node.js runtimes. Its server-side rendering (SSR) JSX subsystem, hono/jsx, executes performance optimizations during elements serialization to streamline delivery. These performance mechanisms bypass typical tag validation check routines in selected contexts, introducing architectural security flaws.
The vulnerability cataloged as CVE-2026-93981 is an implementation of Improper Neutralization of Input During Web Page Generation (CWE-79). When server-side code handles dynamic untrusted string values inside specialized layout boundaries, the engine serializes inputs directly to the client browser without applying HTML-escaping sequences. This behavior permits remote attackers to execute arbitrary JavaScript within the security origin of the target web application.
The impact of this flaw depends on the placement of user input within server-side components. If the inputs flow into affected rendering blocks, an unauthenticated attacker can execute drive-by compromise actions, steal session tokens, or perform unauthorized administrative actions on behalf of authenticated users. The vulnerability affects all versions of Hono prior to 4.13.7.
The root cause of CVE-2026-93981 lies in the design of the element serialization routines inside hono/jsx. Typically, the JSX parsing engine routes children through escaping layers to ensure special characters like <, >, and & convert to their corresponding HTML entities. However, the serialization pathways in selected rendering contexts implement shortcut logic for performance optimization.
There are four distinct unescaped rendering paths identified in the vulnerable versions of Hono. The first pathway involves the children or fallbacks of the <Suspense> component, where Hono's streaming component maps children directly using the .toString() function, treating plain unescaped strings as trusted markup. The second pathway involves <ErrorBoundary> components using a helper function called resolveChildEarly(). If an asynchronous sibling triggers early evaluation, this helper casts plain strings directly to the pre-escaped HtmlEscapedString class, bypassing the escaping rules.
The third pathway occurs when a single child is evaluated inside a <Context.Provider>. The component converts the child node directly via .toString() and wraps the unescaped output in the raw HTML helper raw(). The fourth pathway occurs within direct server-side utilities like renderToString() or renderToReadableStream(), where primitive evaluations execute element.toString() on plain string parameters directly. These paths bypass the standard sanitization routines and expose the application to code injection.
Analyzing the vulnerable implementation within src/jsx/components.ts reveals the lack of validation in the resolveChildEarly handler. This helper determines how to resolve nested elements during early rendering of boundaries:
// Vulnerable Code Path
const resolveChildEarly = (c: Child): HtmlEscapedString | Promise<HtmlEscapedString> => {
if (c == null || typeof c === 'boolean') {
return '' as HtmlEscapedString
} else if (typeof c === 'string') {
return c as HtmlEscapedString // <--- BUG: Plain string cast as pre-escaped
} else {
const str = c.toString()
if (!(str instanceof Promise)) {
return raw(str) // <--- BUG: Wraps plain object output in raw(), disabling escaping
} else {
return str as Promise<HtmlEscapedString>
}
}
}The corresponding fix implemented in commit 2b8ed402cdab6dfc5e829b480806dcd8db94161e introduces dynamic checks to evaluate if a variable is untrusted. If an element evaluates as an untrusted object or plain string, Hono now routes the item through the standard renderChildren function to apply entity-escaping:
// Patched Code Path
const resolveChildEarly = (child: Child): HtmlEscapedString | Promise<HtmlEscapedString> => {
if (child == null || typeof child === 'boolean') {
return '' as HtmlEscapedString
} else if (typeof child === 'string' || Array.isArray(child)) {
return renderChildren([child]) // Correctly escapes plain string inputs
} else if (isUntrustedObject(child)) {
return renderUntrustedObject(child) // Prevents custom object toString bypass
} else {
const str = child.toString()
return str instanceof Promise ? (str as Promise<HtmlEscapedString>) : raw(str)
}
}Additionally, the engineering team resolved a secondary, uncredited security vulnerability involving JavaScript's .replace() function. Inside structural components, buffered strings were replaced using standard match parameters. An attacker who controls the replacement string could supply JavaScript regex substitution characters (like $') to cause information leakage or render buffer manipulation. The patch changes replacement logic to execute using an arrow function callback, which treats the variable as a literal string.
To exploit CVE-2026-93981, an attacker must identify endpoints that consume user-supplied input and render it within an affected component structure. The most direct exploitation pathway involves rendering a single dynamic child inside a <Context.Provider>. If an application dynamically configures context values based on URL parameters, attackers can inject arbitrary script blocks.
For example, an attacker can submit a payload targeting an endpoint that processes context values. If the parameter is assigned to a single child node, the application serializes the parameter directly into the template. The server returns the payload as unescaped HTML, resulting in JavaScript execution on the client browser:
GET /vuln-endpoint?param=%3Cimg%20src%3Dx%20onerror%3Dalert(document.domain)%3E HTTP/1.1
Host: target-app.com
A second scenario targets applications utilizing fallback rendering mechanisms inside <ErrorBoundary> components. When an asynchronous element errors during page compilation, the error handler evaluates sibling nodes early. If the sibling contains unescaped user-supplied inputs, the early resolution handler bypasses HTML escaping and renders the script tags directly inside the document output.
The potential consequences of exploitation are severe. If an attacker successfully executes arbitrary JavaScript, they can access session tokens stored in localStorage or session-only cookies without the HttpOnly flag. This allows attackers to perform complete session hijacking and impersonate administrative accounts on the host domain.
While the patch published in Hono version 4.13.7 resolves direct unescaped execution paths, security teams must monitor potential bypass vectors. The patched framework checks object trust parameters using the isUntrustedObject utility, which evaluates if (value as HtmlEscaped).isEscaped is false. If the host application is vulnerable to prototype pollution, attackers can manipulate the global prototype chain.
By injecting properties like Object.prototype.isEscaped = true, an attacker can cause the validation routine to bypass untrusted elements. The application would then process untrusted custom objects as trusted, pre-escaped HTML elements. Security engineers must combine Hono framework updates with input structure validation to prevent object property manipulations.
CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:L/I:L/A:N| Product | Affected Versions | Fixed Version |
|---|---|---|
Hono Hono | >= 0, < 4.13.7 | 4.13.7 |
| Attribute | Detail |
|---|---|
| CWE ID | CWE-79 |
| Attack Vector | Network |
| CVSS v3.1 Score | 4.7 (Medium) |
| EPSS Score | 0.00227 |
| EPSS Percentile | 12.17% |
| Exploit Status | Proof-of-Concept Available |
| KEV Status | Not Listed |
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
CVE-2026-128087 (GHSA-9264-jvgf-6w2f) is an incorrect behavior order (CWE-696) and improper authorization (CWE-863) vulnerability in the russh Rust SSH library, affecting versions 0.55.0 through 0.65.0. During the initial SSH key exchange (KEX) handshake, the client state machine invokes the client::Handler::kex_done() callback—providing the negotiated raw shared secret bytes—prior to validating the remote server's host key or certificate via check_server_key(). Consequently, an untrusted or rogue SSH server can complete cryptographic key agreement and force a connecting client to execute side-effecting application logic inside kex_done() before the server's identity is checked and rejected.
CVE-2026-128082 (GHSA-6vhm-j9h7-f9gh) is an uncontrolled recursion vulnerability (CWE-674) in AutoMapper, a convention-based object-object mapper for .NET. When mapping nested or self-referential types into destination models that rely on parameterized constructors, C# positional records, or recursive ConstructUsing expressions, AutoMapper evaluates child constructor arguments prior to incrementing the parent's recursion depth counter. This ordering flaw bypasses both explicit MaxDepth limits and the default depth limit of 64. An unauthenticated remote attacker can supply deeply nested input payloads to affected endpoints, exhausting the thread call stack and triggering an uncatchable System.StackOverflowException that terminates the hosting .NET process.
An information exposure vulnerability in the @opentelemetry/instrumentation-http package for OpenTelemetry JavaScript versions 0.204.0 prior to 0.222.0 causes incoming HTTP server spans to record raw, unredacted query string parameters under the url.query attribute. While outgoing client spans applied built-in and user-configured query parameter redaction, incoming server spans bypassed this sanitization completely, resulting in the transmission of sensitive credentials such as pre-signed cloud URLs and API tokens to external observability backends.
CVE-2026-128089 is an uncontrolled resource consumption vulnerability in the dnspython toolkit for Python, affecting all versions prior to 2.9.2. When parsing Well-Known Service (WKS) records from text via dns.rdtypes.IN.WKS.WKS.from_text(), the parser fails to validate that numeric service port identifiers fall within the RFC 1035 valid range of 0 through 65535. An attacker capable of supplying untrusted zone files or RDATA text strings containing an arbitrarily large service port integer can force the parser to allocate an unbounded bitmap array using an inefficient linear append loop, resulting in severe CPU exhaustion, application hangs, or Out-Of-Memory (OOM) process termination.
CVE-2026-126347 (GHSA-5cjw-f85j-cv6r) is an open redirect vulnerability (CWE-601) in Tornado, an asynchronous Python networking library and web framework. The flaw resides in tornado.web.RedirectHandler when dynamic URL redirection templates incorporate unvalidated user input. Due to a parser differential between RFC 3986 (used by Python's urllib.parse.urlsplit) and the WHATWG URL Standard (used by modern web browsers), inputs containing three or more leading slashes bypass Tornado 6.6.0's validation logic, allowing unauthenticated attackers to redirect users to arbitrary external domains.
A Denial of Service (DoS) vulnerability exists in @sveltejs/adapter-node versions 5.5.7 and 6.0.0-next.0 through 6.0.0. When a SvelteKit server route returns a direct response from a fetch() call with a Content-Type of text/event-stream, the Node.js adapter attempts to mutate the response headers to disable proxy buffering. Because headers returned directly by the WHATWG Fetch API carry an immutable guard, this mutation throws an unhandled TypeError, terminating the underlying Node.js process and denying service to all active and subsequent clients.