CVE-2026-29086

Hono: Cookie Attribute Injection via Unsanitized domain and path in setCookie()

Published Mar 4, 2026 CVSS 3.1 · 5.4 Medium EPSS < 1% KEV · Not listed
Description
Hono is a Web application framework that provides support for any JavaScript runtime. Prior to version 4.12.4, the setCookie() utility did not validate semicolons (;), carriage returns (\r), or newline characters (\n) in the domain and path options when constructing the Set-Cookie header. Because cookie attributes are delimited by semicolons, this could allow injection of additional cookie attributes if untrusted input was passed into these fields. This issue has been patched in version 4.12.4.

Analysis

AI-generated

Technical impact

The setCookie() utility in Hono did not escape semicolons, carriage returns, or newline characters present in the domain and path options. Because cookie attributes are separated by semicolons, an attacker can inject additional cookie attributes by supplying carefully crafted values in these fields, potentially allowing manipulation of cookie behavior such as setting custom flags, altering cookie names, or other unintended client-side state changes.

Affected Systems

All versions of the Hono web application framework released by honojs prior to 4.12.4 are affected. The vulnerability is present in Node.js runtimes that use these older Hono releases.

Risk and Exploitability

The CVSS score of 5.4 places this issue in the moderate risk range, yet the EPSS of less than 1% suggests low current exploitation likelihood. It is not listed in the CISA KEV catalog. An attacker would typically need to supply a crafted domain or path value—often via a user-supplied request header or API parameter—to trigger the injection during a server's response construction.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade Hono to version 4.12.4 or later, which implements validation of domain and path inputs.
  • If immediate upgrade is not feasible, sanitize or whitelist domain and path arguments before calling setCookie() to ensure they contain only acceptable characters.
  • Audit server-side code to confirm that no unsanitized values reach setCookie(); remove unnecessary domain or path options when they are not needed.

Generated by OpenCVE AI on April 16, 2026 at 13:05 UTC.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Github GHSA Github GHSA GHSA-5pq2-9x2x-5p6w Hono Vulnerable to Cookie Attribute Injection via Unsanitized domain and path in setCookie()
History
Type Values Removed Values Added
Weaknesses NVD-CWE-Other
CPEs cpe:2.3:a:hono:hono:*:*:*:*:*:node.js:*:*
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
First Time appeared Hono
Hono hono
Vendors & Products Hono
Hono hono
Type Values Removed Values Added
Description Hono is a Web application framework that provides support for any JavaScript runtime. Prior to version 4.12.4, the setCookie() utility did not validate semicolons (;), carriage returns (\r), or newline characters (\n) in the domain and path options when constructing the Set-Cookie header. Because cookie attributes are delimited by semicolons, this could allow injection of additional cookie attributes if untrusted input was passed into these fields. This issue has been patched in version 4.12.4.
Title Hono: Cookie Attribute Injection via Unsanitized domain and path in setCookie()
Weaknesses CWE-1113
References
Metrics cvssV3_1

{'score': 5.4, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N'}

Weaknesses

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Mar 5, 2026, 3:42 PM
Reserved
Mar 3, 2026, 8:51 PM
Status
Analyzed
Published
Mar 4, 2026, 11:16 PM
Modified
Jun 17, 2026, 10:29 AM