{"id":"CVE-2026-56762","aliases":["CVE-2026-56762","GHSA-26pp-8wgv-hjvm"],"related":[],"kind":"vulnerability","state":"published","title":"Hono - Missing Cookie Name Validation in setCookie()","summary":"Hono before 4.12.12 does not validate cookie names on the write path in the setCookie(), serialize(), and serializeSigned() functions, allowing invalid characters such as control characters (e.g. \\r or \\n) when an application passes a user-controlled cookie name. This can produce malformed Set-Cookie header values. In modern runtimes such as Node.js and Cloudflare Workers, such invalid header values are rejected and cause a runtime error before the response is sent, so header injection or response splitting could not be reproduced; the issue primarily affects correctness and robustness, resulting in runtime errors (availability) rather than confirmed header injection.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"Hono before 4.12.12 does not validate cookie names on the write path in the setCookie(), serialize(), and serializeSigned() functions, allowing invalid characters such as control characters (e.g. \\r or \\n) when an application passes a user-controlled cookie name. This can produce malformed Set-Cookie header values. In modern runtimes such as Node.js and Cloudflare Workers, such invalid header values are rejected and cause a runtime error before the response is sent, so header injection or response splitting could not be reproduced; the issue primarily affects correctness and robustness, resulting in runtime errors (availability) rather than confirmed header injection.","source":"cvelist"},{"lang":"en","text":"## 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.","format":"markdown","source":"ghsa"}],"published":"2026-04-08T00:17:02.000Z","modified":"2026-09-24T18:45:10.903Z","severity":{"scorer":"VulnCheck","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N","score":6.9,"rating":"MEDIUM"},"severities":[{"scorer":"VulnCheck","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N","score":6.9,"rating":"MEDIUM"},{"scorer":"VulnCheck","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L","score":5.3,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L","score":5.3,"rating":"MEDIUM"}],"cwes":["CWE-20","CWE-113"],"affected":[{"ranges":[{"type":"semver","introduced":"0","fixed":"4.12.12","status":"affected"},{"type":"semver","version":"4.12.12","status":"unaffected"}],"vendor":"Hono","product":"Hono","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"4.12.12"}],"ecosystem":"npm","package":"hono","purl":"pkg:npm/hono","source":"ghsa"}],"references":[{"url":"https://github.com/honojs/hono/security/advisories/GHSA-26pp-8wgv-hjvm","tags":["vendor-advisory","web"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://www.vulncheck.com/advisories/hono-missing-cookie-name-validation-in-setcookie","tags":["third-party-advisory","web"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-56762","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/honojs/hono/commit/a586cd72e3f6122792e631ecf1817e5cabb803ec","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/honojs/hono","tags":["package"],"sources":["ghsa"]},{"url":"https://github.com/honojs/hono/releases/tag/v4.12.12","tags":["web"],"sources":["ghsa"]}],"credits":["athuljayaram"],"assigner":"VulnCheck","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"yes","technicalImpact":"partial","date":"2026-06-23T13:07:54.410Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-56762","url":"https://www.cve.org/CVERecord?id=CVE-2026-56762","licence":"CVE Terms of Use","modified":"2026-06-24T11:17:03.577Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-26pp-8wgv-hjvm","url":"https://github.com/advisories/GHSA-26pp-8wgv-hjvm","licence":"CC-BY-4.0","modified":"2026-09-24T18:45:10.903Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-56762","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-56762","licence":"Public domain","modified":"2026-06-24T13:16:37.203Z"}],"updatedAt":"2026-11-25T22:59:25.459Z","epss":{"score":0.00247,"percentile":0.17092,"date":"2026-12-01T12:00:22.000Z"}}