{"id":"GHSA-5pq2-9x2x-5p6w","revision":"13df91ba8d4443a0963266532c3dcccd","records":[{"revision":"13df91ba8d4443a0963266532c3dcccd","observedAt":"2026-10-24T13:17:17.793+00:00","statement":{"source":"osv","id":"GHSA-5pq2-9x2x-5p6w","aliases":["CVE-2026-29086"],"title":"Hono Vulnerable to Cookie Attribute Injection via Unsanitized domain and path in setCookie()","description":"## Summary\n\nThe `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.\n\nBecause cookie attributes are delimited by semicolons, this could allow injection of additional cookie attributes if untrusted input was passed into these fields.\n\n## Details\n\n`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.\n\nIncluding `;`, `\\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.\n\nModern runtimes prevent full header injection via CRLF, so this issue is limited to attribute-level manipulation within a single `Set-Cookie` header.\n\nThe issue has been fixed by rejecting these characters in the `domain` and `path` options.\n\n## Impact\n\nAn attacker may be able to manipulate cookie attributes if an application passes user-controlled input directly into the `domain` or `path` options of `setCookie()`.\n\nThis could affect cookie scoping or security attributes depending on browser behavior. Exploitation requires application-level misuse of cookie options.","state":0,"publishedAt":"2026-03-04T19:49:14+00:00","modifiedAt":"2026-09-10T03:50:37.686722+00:00","affected":[{"ecosystem":"npm","name":"hono","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"0"},{"kind":"fixed","version":"4.12.4"}]}],"versions":[],"rawVersionEvidence":null}],"metrics":[{"system":"CVSS_V3","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N","score":null,"severity":null},{"system":"Publisher rating","vector":null,"score":null,"severity":"MODERATE"}],"references":["https://github.com/honojs/hono/security/advisories/GHSA-5pq2-9x2x-5p6w","https://nvd.nist.gov/vuln/detail/CVE-2026-29086","https://github.com/honojs/hono/commit/44ae0c8cc4d5ab2bed529127a4ac72e1483ad073","https://github.com/honojs/hono"],"sourceUrl":"https://github.com/advisories/GHSA-5pq2-9x2x-5p6w","license":"GitHub Advisory Database · CC-BY-4.0","key":"osv:GHSA-5pq2-9x2x-5p6w","identifiers":["GHSA-5pq2-9x2x-5p6w","CVE-2026-29086"]},"retained":false,"historicalAffected":[]}],"coverage":[]}