LOW · CVSS 3.1 3.4 EPSS 0.3% · 18th percentile CWE-79

CVE-2026-126359: Hono: `css` helper does not escape a closing tag split between the template and an interpolated value, allowing HTML injection

Published 2026-11-12 · Updated 2026-11-12 · Also known as GHSA-3gg2-335m-rxc6

Summary

The Hono css helper fails to properly sanitize interpolated values that immediately follow a less-than character, potentially allowing HTML injection. Engineering teams using Hono versions 3.12.0 through 4.13.15 should update to 4.13.16 to mitigate this flaw.

Who is affected

Affected deployments are those where untrusted user input is interpolated into Hono css templates immediately following a '<' character. An attacker can close the style element early to inject arbitrary HTML or scripts into the rendered page. This vulnerability requires specific conditions involving the concatenation of template literals and interpolated strings.

Exploitability

The vulnerability has a low severity rating with a CVSS 3.1 score of 3.4, indicating it is difficult to exploit. It requires high complexity and user interaction, and the current EPSS score of 0.003 suggests a low probability of exploitation. It is not currently listed on the CISA Known Exploited Vulnerabilities catalog.

Remediation

How to check your project

Automated analysis of the published advisory data, generated 2026-11-19. Not human-reviewed; verify against the official advisory. How this works.

Affected packages

EcosystemPackageAffected versionsFixed inUpgrade
npm hono >= 3.12.0, < 4.13.16 4.13.16 npm install [email protected]

CVSS 3.1 vector

CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:L/I:N/A:N

Attack vectorNetwork
Attack complexityHigh
Privileges requiredNone
User interactionRequired
ScopeChanged
ConfidentialityLow
IntegrityNone
AvailabilityNone

FAQ

Does this affect all Hono users?

No, it only affects users of the hono/css helper who interpolate untrusted data directly after a '<' character.

What is the primary risk associated with this flaw?

The primary risk is Cross-Site Scripting (XSS), where an attacker could execute arbitrary scripts in the context of a user's browser.

Is this vulnerability being actively exploited in the wild?

There is no evidence of active exploitation at this time, as the vulnerability is not listed in the CISA Known Exploited Vulnerabilities catalog.

Original advisory description
### 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

Source records: GHSA-3gg2-335m-rxc6 (OSV.dev) · EPSS by FIRST, 2026-11-21.