{"id":"CVE-2026-56762","aliases":["GHSA-26pp-8wgv-hjvm"],"url":"https://o3.security/vulnerability/CVE-2026-56762","summary":"Hono - Missing Cookie Name Validation in setCookie()","details":"## Summary\n\nCookie names are not validated on the write path when using `setCookie()`, `serialize()`, or `serializeSigned()` to generate Set-Cookie headers.\n\nWhile certain cookie attributes such as domain and path are validated, the cookie name itself may contain invalid characters.\n\nThis results in inconsistent handling of cookie names between parsing (read path) and serialization (write path).\n\n## Details\n\nWhen applications use `setCookie()`, `serialize()`, or `serializeSigned()` with a user-controlled cookie name, invalid values (e.g., containing control characters such as `\\r` or `\\n`) can be used to construct malformed `Set-Cookie` header values.\n\nFor example:\n\n```\nSet-Cookie: legit\nX-Injected: evil=value\n```\n\nHowever, in modern runtimes such as Node.js and Cloudflare Workers, such invalid header values are rejected and result in a runtime error before the response is sent.\n\nAs a result, the reported header injection / response splitting behavior could not be reproduced in these environments.\n\n## Impact\n\nApplications that pass untrusted input as the cookie name to `setCookie()`, `serialize()`, or `serializeSigned()` may encounter runtime errors due to invalid header values.\n\nIn tested environments, malformed `Set-Cookie` headers are rejected before being sent, and the reported header injection behavior could not be reproduced.\n\nThis issue primarily affects correctness and robustness rather than introducing a confirmed exploitable vulnerability.","published":"2026-06-23T12:13:06.899Z","modified":"2026-08-12T03:51:38.200050121Z","cvss":null,"epss":null,"cisaKev":null,"exploitsKnown":null,"affectedPackages":[{"ecosystem":"npm","name":"hono","fixedVersion":"4.12.12"}],"fix":{"url":"https://github.com/honojs/hono/commit/a586cd72e3f6122792e631ecf1817e5cabb803ec","label":"honojs/hono@a586cd7"},"references":[{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/56xxx/CVE-2026-56762.json"},{"type":"ADVISORY","url":"https://github.com/honojs/hono/security/advisories/GHSA-26pp-8wgv-hjvm"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-56762"},{"type":"ADVISORY","url":"https://www.vulncheck.com/advisories/hono-missing-cookie-name-validation-in-setcookie"},{"type":"WEB","url":"https://github.com/honojs/hono/commit/a586cd72e3f6122792e631ecf1817e5cabb803ec"},{"type":"PACKAGE","url":"https://github.com/honojs/hono"},{"type":"WEB","url":"https://github.com/honojs/hono/releases/tag/v4.12.12"}],"provenance":{"sources":["OSV.dev","FIRST.org (EPSS)"],"lastVerified":"2026-08-12T03:51:38.200050121Z"}}