Hono/JSX, Improper Handling of JSX Attribute Names, GHSA-458j-xx4x-4375 (Medium)

Listen to this Post

How the mentioned CVE works

The vulnerability exists in the `hono/jsx` JSX rendering engine during server-side rendering (SSR). When rendering JSX elements to HTML strings, attribute values are escaped, but attribute names (keys) were previously inserted into the output without any validation or sanitization. If an attribute name contains characters such as ", >, or whitespace, it can alter the structure of the generated HTML. An attacker can craft a malformed attribute key that breaks out of the current attribute, introducing unintended additional attributes, or breaks out of the current HTML tag to inject entirely new elements into the output. This issue arises when untrusted input (such as query parameters or form data) is used as JSX attribute keys during server-side rendering. The root cause is the lack of output encoding or filtering for attribute names, allowing injected HTML/XML special characters to be interpreted as part of the document structure rather than as plain text. As a result, an attacker can inject arbitrary HTML attributes or elements, potentially leading to cross-site scripting (XSS) if combined with unsafe usage patterns that later evaluate the injected content as script.

dailycve form

Platform: hono/jsx SSR
Version: before 4.12.14
Vulnerability: JSX attribute injection
Severity: medium (GHSA)
Date: 2026-04-16

Prediction: patch 2026-04-15

Analytics under heading What Undercode Say:

Check your Hono version
npm list hono
Verify if vulnerable (versions < 4.12.14)
npm view hono version
Update to patched version
npm install [email protected]
Search for dangerous patterns in code
grep -r "createElement" --include=".jsx" --include=".tsx" .

Exploit

// Malicious attribute key example
const userInput = <code>" onload="alert('XSS')</code>;
return

<div {userInput}="x">Content</div>

;
// Rendered output (before patch)

<

div " onload="alert('XSS')"="x">Content</div>

Protection from this CVE

Upgrade to Hono version 4.12.14 or later. Apply input validation for all dynamic attribute names. Use a strict allowlist of permitted attribute names. Implement a Content Security Policy (CSP) to mitigate XSS impact.

Impact

Injection of arbitrary HTML attributes or elements; corruption of HTML structure; potential cross-site scripting (XSS) if combined with unsafe patterns; allows attackers to break attribute/tag boundaries and inject unintended HTML.

🎯Let’s Practice Exploiting & Learn Patching For Free:

Sources:

Reported By: github.com
Extra Source Hub:
Undercode

🔐JOIN OUR CYBER WORLD [ CVE News • HackMonitor • UndercodeNews ]

💬 Whatsapp | 💬 Telegram

📢 Follow DailyCVE & Stay Tuned:

𝕏 formerly Twitter 🐦 | @ Threads | 🔗 Linkedin Featured Image

Scroll to Top