CVE-2026-29086: Hono: Cookie Attribute Injection via Unsanitized domain and path in setCookie()

Published Mar 4, 2026
·
Updated

Summary

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.

Details

setCookie() builds the Set-Cookie header by concatenating option values. While the cookie value itself is URL-encoded, the domain and path options were previously interpolated without rejecting unsafe characters.

Including ;, \r, or \n in these fields could result in unintended additional attributes (such as SameSite, Secure, Domain, or Path) being appended to the cookie header.

Modern runtimes prevent full header injection via CRLF, so this issue is limited to attribute-level manipulation within a single Set-Cookie header.

The issue has been fixed by rejecting these characters in the domain and path options.

Impact

An attacker may be able to manipulate cookie attributes if an application passes user-controlled input directly into the domain or path options of setCookie().

This could affect cookie scoping or security attributes depending on browser behavior. Exploitation requires application-level misuse of cookie options.

Other sources

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.

MITRE

Affected Software

2 affected componentsFixes available
npm/hono<4.12.4
4.12.4
Hono Hono Node.js<4.12.4

Event History

Mar 4, 2026
Advisory Published
via GitHub·07:49 PM
Data Sourced
via GitHub·07:49 PM
DescriptionSeverityWeaknessAffected Software
CVE Published
via MITRE·10:09 PM
Data Sourced
via MITRE·10:09 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·11:16 PM
RemedyDescriptionSeverityWeaknessAffected Software
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2026-29086?

CVE-2026-29086 has a high severity rating due to the potential for cookie injection attacks.

2

How do I fix CVE-2026-29086?

To fix CVE-2026-29086, update the 'hono' package to version 4.12.4 or later.

3

What type of vulnerability is CVE-2026-29086?

CVE-2026-29086 is a cookie injection vulnerability related to improper validation of cookie attributes.

4

What is affected by CVE-2026-29086?

CVE-2026-29086 affects the 'hono' package when used prior to version 4.12.4.

5

What could happen if CVE-2026-29086 is exploited?

If exploited, CVE-2026-29086 could lead to unauthorized access or modifications of user sessions through malformed cookies.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203