{"id":"CVE-2026-59895","aliases":["CVE-2026-59895","GHSA-w62v-xxxg-mg59"],"related":[],"kind":"vulnerability","state":"published","title":"Hono: Server-Side XSS via JSX Escaping Bypass in cx() Utility","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"en","text":"### Summary\n\n`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).\n\n### Details\n\nBecause 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`.\n\n### Impact\n\nDuring 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.\n\nThis may lead to:\n\n- Execution of attacker-controlled script in the victim's browser session.\n- Session hijacking, credential theft, or actions performed on behalf of the victim.\n\nApplications are affected only if they render JSX server-side and pass untrusted input as a class name to `cx()`.","format":"markdown","source":"ghsa"},{"lang":"es","text":"Hono es un framework de aplicación web que proporciona soporte para cualquier entorno de ejecución de JavaScript. Desde la versión 4.0.0 hasta la 4.12.27, cx() en hono/css compone nombres de clase a partir de cadenas de texto simples pero marca el resultado como ya escapado sin escapar la entrada en HTML, permitiendo que valores de className no confiables utilizados en un atributo de clase JSX durante la renderización del lado del servidor rompan el atributo e inyecten marcado arbitrario. Este problema está solucionado en la versión 4.12.27.","source":"nvd"}],"published":"2026-07-08T16:09:51.273Z","modified":"2026-10-25T17:10:00.197Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","score":6.1,"rating":"MEDIUM"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","score":6.1,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","score":6.1,"rating":"MEDIUM"}],"cwes":["CWE-79","CWE-116"],"affected":[{"ranges":[{"version":">= 4.0.0, < 4.12.27","status":"affected"}],"vendor":"honojs","product":"hono","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"4.0.0","status":"affected","fixed":"4.12.27"}],"ecosystem":"npm","package":"hono","purl":"pkg:npm/hono","source":"ghsa"},{"ranges":[{"status":"affected","introduced":"4.0.0","fixed":"4.12.27"}],"vendor":"hono","product":"hono","cpe":"cpe:2.3:a:hono:hono:*:*:*:*:*:node.js:*:*","source":"nvd"}],"references":[{"url":"https://github.com/honojs/hono/security/advisories/GHSA-w62v-xxxg-mg59","tags":["vendor-advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/honojs/hono/commit/cd3f6f7194f0e5c9d4b26ae0cf232018d0f388fc","tags":["patch","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/honojs/hono/releases/tag/v4.12.27","tags":["release-notes","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-59895","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/honojs/hono","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2026-07-08T17:50:18.277Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-59895","url":"https://www.cve.org/CVERecord?id=CVE-2026-59895","licence":"CVE Terms of Use","modified":"2026-07-08T19:41:04.292Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-w62v-xxxg-mg59","url":"https://github.com/advisories/GHSA-w62v-xxxg-mg59","licence":"CC-BY-4.0","modified":"2026-09-10T03:51:12.371Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-59895","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-59895","licence":"Public domain","modified":"2026-10-25T17:10:00.197Z"}],"updatedAt":"2026-11-25T22:59:27.401Z","epss":{"score":0.00327,"percentile":0.1823,"date":"2026-11-30T12:00:22.000Z"}}