All vulnerabilities

npm

CVE-2026-59895

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

Severity
Medium 6.1
Published
21 Jul 2026
Last changed
10 Sept 2026
Added to UpHeron
22 Oct 2026
Fixed in
4.12.27
Exploit chance
0.3% in the next 30 daysHigher than 26% of CVEs. EPSS by FIRST, 19 Nov 2026
Weakness
Improper output encoding (CWE-116)Cross-site scripting (CWE-79)
Attack
Over the network · No login needed · Needs someone to click or open something
Attacker can
Read some data · Change some data
CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
Also known as
GHSA-w62v-xxxg-mg59
Sources
OSV.dev and GitHub

Description

cx() in hono/css composes class names from plain strings but marks the result as already-escaped without HTML-escaping the input. When the result is used as a JSX class attribute during server-side rendering, the value is written into the attribute unescaped, so untrusted input can break out of the class attribute and inject arbitrary markup, leading to Cross-Site Scripting (XSS).

Because the composed value is treated as pre-escaped, the HTML attribute escaping normally applied to interpolated values is skipped, and characters such as " pass through unescaped — allowing a value to terminate the attribute and add further attributes or elements. This arises when an application passes untrusted, user-controlled input as a class name to cx(), for example when merging a base class with an externally provided className.

During server-side rendering, an attacker who controls a value passed to cx() can inject arbitrary HTML into the page, resulting in stored or reflected XSS in the…

From the GitHub Advisory Database, CC BY 4.0. Shortened; the full text is there.

Affected software

SoftwareAffected versions
hononpm · osv:npm:hono
  • From 4.0.0 before 4.12.27

About hono

Weekly downloads (npm)
108,805,821npm, 16 Nov 2026

References