CVE-2026-24771

4.7 MEDIUM

📋 TL;DR

This Cross-Site Scripting (XSS) vulnerability in Hono's ErrorBoundary component allows attackers to inject malicious scripts that execute in victims' browsers when viewing pages with untrusted user input. Applications using Hono's JSX library versions before 4.11.7 are affected. The vulnerability requires specific usage patterns where user-controlled strings are rendered as raw HTML.

💻 Affected Systems

Products:
  • Hono JSX library
Versions: All versions prior to 4.11.7
Operating Systems: Any OS running JavaScript runtime (Node.js, Deno, Bun, Cloudflare Workers, etc.)
Default Config Vulnerable: ✅ No
Notes: Only affects applications using the ErrorBoundary component with specific patterns where user input is rendered without proper sanitization. Not all Hono applications are vulnerable.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Attackers could steal session cookies, perform actions as authenticated users, deface websites, or redirect users to malicious sites, potentially leading to account compromise and data theft.

🟠

Likely Case

Attackers inject malicious scripts to steal session tokens or user data from vulnerable pages, potentially compromising user accounts on the affected application.

🟢

If Mitigated

With proper Content Security Policy (CSP) headers and input validation, impact is limited to script execution within CSP constraints, though data exfiltration may still occur.

🌐 Internet-Facing: HIGH
🏢 Internal Only: MEDIUM

🎯 Exploit Status

Public PoC: ✅ No
Weaponized: UNKNOWN
Unauthenticated Exploit: ⚠️ Yes
Complexity: LOW

Exploitation requires finding vulnerable ErrorBoundary usage patterns and injecting malicious payloads. No public exploit code has been identified.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 4.11.7

Vendor Advisory: https://github.com/honojs/hono/security/advisories/GHSA-9r54-q6cx-xmh5

Restart Required: Yes

Instructions:

1. Update Hono package to version 4.11.7 or later using npm/yarn/pnpm. 2. Restart your application server. 3. Verify the update was successful by checking package.json and running the application.

🔧 Temporary Workarounds

Implement Content Security Policy

all

Add strict CSP headers to prevent script execution from untrusted sources

Sanitize ErrorBoundary Input

all

Manually sanitize any user input passed to ErrorBoundary components before rendering

🧯 If You Can't Patch

  • Implement strict Content Security Policy headers with script-src directives
  • Review and sanitize all user input passed to ErrorBoundary components

🔍 How to Verify

Check if Vulnerable:

Check package.json for Hono version below 4.11.7 and review ErrorBoundary component usage for unsanitized user input rendering.

Check Version:

npm list hono | grep hono OR check package.json for "hono" version

Verify Fix Applied:

Verify package.json shows Hono version 4.11.7 or higher and test ErrorBoundary functionality with test payloads.

📡 Detection & Monitoring

Log Indicators:

  • Unusual error messages containing script tags or JavaScript code in ErrorBoundary contexts
  • Multiple failed requests to error handling endpoints

Network Indicators:

  • HTTP requests containing script payloads in error-related parameters
  • Unexpected outbound connections from client browsers after error pages

SIEM Query:

source="application_logs" AND ("ErrorBoundary" OR "error") AND ("<script>" OR "javascript:" OR "onerror=")

🔗 References

📤 Share & Export