Low

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

  • Disclosed: 12.11.2026
  • Updated: 13.11.2026 01:17

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 <.

Affected software

Click a technology to see all vulnerabilities affecting it.

PlatformPackageVulnerable versionsFixed in
npm package hono >= 3.12.0, < 4.13.16 4.13.16

References

CVSS score 3.4/10
CVSS vector
CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:L/I:N/A:N
Weakness (CWE)
CWE-79
Platform
npm
Package
hono
Disclosed
12.11.2026
Updated
13.11.2026 01:17

Sources and licenses

OSV / GitHub Advisory Database - GHSA-3gg2-335m-rxc6 - CC BY 4.0

Vulnerability history: hono

All published vulnerabilities of this package (npm package), newest first. Shows whether this is a one-off slip or a package that needs watching.

All (57) in the archive
Total entries
57
First → latest
12.2023 11.2026
Without a fix
0
Exploited in attacks
0

Severity breakdown

  • High 7
  • Medium 45
  • Low 5

Disclosures per year

  1. 2023: 1
  2. 2024: 3
  3. 2025: 4
  4. 2026: 49
Severity:
  1. Hono: `css` helper does not escape a closing tag split between the template and an interpolated value, allowing HTML injection this entry
    Low · 3.4 CVE-2026-126359 >= 3.12.0, < 4.13.16 4.13.16
  2. High · 8.1 CVE-2025-62610 >= 1.1.0, < 4.10.2 4.10.2
  3. High · 7.5 CVE-2025-58362 >= 4.8.0, < 4.9.6 4.9.6

Know which vulnerabilities affect your application

With the DockRay integration and software inventory enabled, DockRay checks reported component versions against known vulnerabilities and notifies you about confirmed matches. Coverage depends on the supported technology and available advisory data.

Connect your application
DockRay newsletter

Application security in your inbox

Important vulnerabilities, actionable guidance and practical advice for your applications. Choose your technologies and follow what matters to your project.

  • A daily digest of new vulnerabilities, critical ones included.
  • Notifications about important updates.
  • Practical advice on application security and monitoring.

Leave empty to receive updates for every technology.

Free to subscribe. Unsubscribe with one click in any email.