CVE-2026-59895

Hono: Server-Side XSS via JSX Escaping Bypass in cx() Utility

Published Jul 8, 2026 CVSS 3.1 · 6.1 Medium EPSS < 1% KEV · Not listed
Description
Hono is a Web application framework that provides support for any JavaScript runtime. From 4.0.0 before 4.12.27, cx() in hono/css composes class names from plain strings but marks the result as already escaped without HTML-escaping the input, allowing untrusted className values used in a JSX class attribute during server-side rendering to break out of the attribute and inject arbitrary markup. This issue is fixed in version 4.12.27.

Analysis

AI-generated

Technical impact

cx() in the Hono framework concatenates class names from string inputs and marks the output as already escaped without performing HTML escaping. When untrusted className data is supplied during server‑side rendering of JSX, a malicious user can break out of the class attribute and inject arbitrary markup, enabling client‑side code injection delivered by the server.

Affected Systems

The vulnerability affects installations of the Hono web framework produced by honojs. Versions from 4.0.0 up to but not including 4.12.27 are vulnerable. The issue was fixed in release 4.12.27.

Risk and Exploitability

The CVSS score of 6.1 indicates moderate severity. The EPSS score is below 1%, and the vulnerability is not listed in the CISA KEV catalog, suggesting limited evidence of exploitation in the wild. An attacker can exploit the vulnerability by providing untrusted className data that reaches the cx() function during server‑side rendering of JSX, enabling arbitrary markup injection. The vulnerability description does not mention authentication or privilege requirements, so any user who can influence className values in rendered output may potentially exploit it.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade the Hono framework to version 4.12.27 or later to apply the vendor patch.
  • Ensure any user‑supplied className values are validated or properly escaped before being passed to the cx() utility.
  • If an upgrade is not feasible, replace cx() with a safer alternative that performs HTML escaping, and monitor logs for injection attempts.

Generated by OpenCVE AI on August 1, 2026 at 15:57 UTC.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Github GHSA Github GHSA GHSA-w62v-xxxg-mg59 Hono: Server-Side XSS via JSX Escaping Bypass in cx() Utility
History
Type Values Removed Values Added
First Time appeared Hono
Hono hono
Vendors & Products Hono
Hono hono
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
Description Hono is a Web application framework that provides support for any JavaScript runtime. From 4.0.0 before 4.12.27, cx() in hono/css composes class names from plain strings but marks the result as already escaped without HTML-escaping the input, allowing untrusted className values used in a JSX class attribute during server-side rendering to break out of the attribute and inject arbitrary markup. This issue is fixed in version 4.12.27.
Title Hono: Server-Side XSS via JSX Escaping Bypass in cx() Utility
Weaknesses CWE-116
CWE-79
References
Metrics cvssV3_1

{'score': 6.1, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N'}

Weaknesses
  • CWE-116

    Improper Encoding or Escaping of Output

  • CWE-79

    Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Jul 8, 2026, 7:41 PM
Reserved
Jul 7, 2026, 4:40 PM
Status
Analyzed
Published
Jul 8, 2026, 5:17 PM
Modified
Oct 25, 2026, 5:10 PM