CVE-2026-126359: Hono: `css` helper does not escape a closing tag split between the template and an interpolated value, allowing HTML injection
Summary The css helper in hono/css escapes a / that follows element. The check only looks inside each value. When the text before a value ends with when that string starts with /style. During server-side rendering the element is closed early and the rest of the value is interpreted as HTML.
Published Nov 12, 2026
Affected packages
hono
- Ecosystem
- npm
- Affected
- >= 3.12.0, <= 4.13.15
- Fixed in
- 4.13.16
- Check
npm ls hono
Advisory details
From the GitHub Advisory Database (CC BY 4.0).
Summary
The css helper in hono/css escapes a / that follows < inside an interpolated value so that a value cannot close the <style> element. The check only looks inside each value. When the text before a value ends with <, whether that is the template itself or an earlier interpolated value, and the next value starts with /, the / is not escaped and the combined output contains an unescaped closing tag.
Details
Interpolated string values are escaped one at a time before they are joined with the surrounding template text. The rule that neutralizes </ therefore cannot see a < that belongs to the template. A template such as a content declaration that opens with a literal < and interpolates a string right after it produces a raw </style> when that string starts with /style>. During server-side rendering the <Style /> element is closed early and the rest of the value is interpreted as HTML.
This issue arises only when < is the last character before an interpolation in a css template, either written in the template or supplied by a preceding value, and the interpolated value is controlled by a client.
Impact
A client that controls such a value can inject HTML, including script, into the page rendered on the server.
This may lead to:
- Execution of attacker-controlled script in the browser of a user who views the page
- Exposure of information available to that page
This issue affects applications that interpolate untrusted strings into a css template immediately after a <, including two adjacent interpolations such as ${prefix}${name} where both are untrusted. Other uses of the css helper are not affected.
Workarounds
Do not interpolate untrusted values into css templates, or make sure the text before an interpolated value does not end with <.
References
How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. No analysis has been written for this entry yet. Methodology
More npm vulnerabilities
All npm entriesCVE-2026-126355
Hono: `csrf()` does not check requests sent by hyperlink auditing (`text/ping`)
medium5.3Nov 12, 2026CVE-2026-126356
Hono: `validator('form')` skips validation for `multipart/form-data` requests with extra parameters
medium5.3Nov 12, 2026CVE-2026-126357
Hono: `mount()` and `app.mount()` can forward a path that bypasses middleware scoped inside the mount prefix
medium5.3Nov 12, 2026CVE-2026-126358
Hono: RegExpRouter skips wildcard middleware for some route sets and for paths with an encoded line terminator
medium5.3Nov 12, 2026CVE-2026-111757
Hono: `serveStatic` decodes the request path a second time, leading to bypass of middleware on static paths
medium5.3Oct 20, 2026CVE-2026-93981
hono/jsx renders plain strings unescaped in boundary components, leading to XSS
medium4.7Sep 30, 2026
