CVE-2026-59895
Hono: Server-Side XSS via JSX Escaping Bypass in cx() Utility
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.
Attack profile
How easy it is to exploit
- Attack vector
- Network
- Complexity
- Low
- Privileges needed
- None
- User interaction
- Required
What an attacker can affect
- Confidentiality
- Low
- Integrity
- Low
- Availability
- None
Exploit likelihood
What each source reports
CVE List Score used
6.1
Hono: Server-Side XSS via JSX Escaping Bypass in cx() Utility
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.
- Record
CVE-2026-59895- CVSS 3.1
- 6.1 Medium
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N - Weakness
- CWE-79, CWE-116
- Updated
- 2026-11-02
EUVDEUVD-2026-42327
6.1
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.
- Record
EUVD-2026-42327- CVSS 3.1
- 6.1 Medium
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N - Updated
- 2026-11-02
GitHub AdvisoriesGHSA-w62v-xxxg-mg59
6.1
Hono: Server-Side XSS via JSX Escaping Bypass in cx() Utility
Summary
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).
Details
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.
Impact
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 victim's browser.
This may lead to:
- Execution of attacker-controlled script in the victim's browser session.
- Session hijacking, credential theft, or actions performed on behalf of the victim.
Applications are affected only if they render JSX server-side and pass untrusted input as a class name to cx().
- Record
GHSA-w62v-xxxg-mg59- CVSS 3.1
- 6.1 Medium
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N - Weakness
- CWE-79, CWE-116
- Updated
- 2026-11-02
NVD
6.1
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.
- Record
CVE-2026-59895- CVSS 3.1
- 6.1 Medium
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N - Weakness
- CWE-79, CWE-116
- Updated
- 2026-11-02
OSV
6.1
Hono: Server-Side XSS via JSX Escaping Bypass in cx() Utility
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.
- Record
CVE-2026-59895- CVSS 3.1
- 6.1 Medium
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N - Weakness
- CWE-116, CWE-79
- Updated
- 2026-11-02
OSVGHSA-w62v-xxxg-mg59
6.1
Hono: Server-Side XSS via JSX Escaping Bypass in cx() Utility
Summary
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).
Details
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.
Impact
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 victim's browser.
This may lead to:
- Execution of attacker-controlled script in the victim's browser session.
- Session hijacking, credential theft, or actions performed on behalf of the victim.
Applications are affected only if they render JSX server-side and pass untrusted input as a class name to cx().
- Record
GHSA-w62v-xxxg-mg59- CVSS 3.1
- 6.1 Medium
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N - Weakness
- CWE-116, CWE-79
- Updated
- 2026-11-02
OSVCLSA-2026-1793790161 No score
TuxCare security update for hono (1 CVE)
TuxCare rebuilt hono to address 1 CVE. Fixed in 3.12.12-tuxcare.5.
- Record
CLSA-2026-1793790161- Updated
- 2026-11-04
OSVROOT-APP-NPM-CVE-2026-59895 No score
CVE-2026-59895 in hono - Patched by Root
Root has patched CVE-2026-59895 in the hono package for Root:npm. Multiple fixed versions available.
- Record
ROOT-APP-NPM-CVE-2026-59895- Updated
- 2026-11-02
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
hononpm |
4.0.0 up to 4.12.27 | 4.12.27 |
honoTuxCare:npm |
3.12.12-tuxcare.0 up to 3.12.12-tuxcare.5, plus listed versions 3.12.123.12.12-tuxcare.13.12.12-tuxcare.23.12.12-tuxcare.33.12.12-tuxcare.4 |
3.12.12-tuxcare.5 |
honoRoot:npm |
before 4.12.25-aikido.1 | 4.12.25-aikido.1 |
@rootio/honoRoot:npm |
before 4.12.25-root.io.1 | 4.12.25-root.io.1 |
History
| Recorded | Changed | Sources |
|---|---|---|
| affected, aliases, facts | OSV | |
| first indexed | CVE List, EUVD, GitHub Advisories, NVD, OSV |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
CVE-2026-59895 is a medium vulnerability (CVSS 6.1) in Hono, published July 8, 2026. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 0.33%, the 25th percentile. Fixed in hono 4.12.27.
References
github.com/honojs/hono/security/advisories/GHSA-w62v-xxxg-mg59
github.com/honojs/hono/commit/cd3f6f7194f0e5c9d4b26ae0cf232018d0f388fc
github.com/honojs/hono/releases/tag/v4.12.27
nvd.nist.gov/vuln/detail/CVE-2026-59895
github.com/advisories/GHSA-w62v-xxxg-mg59
github.com/CVEProject/cvelistV5/tree/main/cves/2026/59xxx/CVE-2026-59895.json
github.com/honojs/hono