Hono missing validation of cookie name on write path in setCookie()
Summary
Cookie names are not validated on the write path when using setCookie(), serialize(), or serializeSigned() to generate Set-Cookie headers.
While certain cookie attributes such as domain and path are validated, the cookie name itself may contain invalid characters.
This results in inconsistent handling of cookie names between parsing (read path) and serialization (write path).
Details
When 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.
For example:
Set-Cookie: legit
X-Injected: evil=value
However, 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.
As a result, the reported header injection / response splitting behavior could not be reproduced in these environments.
Impact
Applications that pass untrusted input as the cookie name to setCookie(), serialize(), or serializeSigned() may encounter runtime errors due to invalid header values.
In tested environments, malformed Set-Cookie headers are rejected before being sent, and the reported header injection behavior could not be reproduced.
This issue primarily affects correctness and robustness rather than introducing a confirmed exploitable vulnerability.
Affected Packages
| Ecosystem | Package | Vulnerable Versions | Patched Version |
|---|---|---|---|
| npm |
hono
|
< 4.12.12 |
4.12.12
|
deps(deps): bump the security-patches group across 4 directories with 2 updates
Open 14 days agochore(deps): bump the npm_and_yarn group across 11 directories with 24 updates
Open 15 days agodeps(deps): bump the security-patches group across 4 directories with 2 updates
Closed 15 days agobuild(deps): Bump the npm_and_yarn group across 1 directory with 15 updates
Closed 15 days agochore(deps): bump the npm_and_yarn group across 5 directories with 23 updates
Closed 16 days agochore(deps): bump the npm_and_yarn group across 24 directories with 5 updates
Open 16 days agoBump the npm_and_yarn group across 5 directories with 7 updates
Open 16 days agoBump the npm_and_yarn group across 4 directories with 9 updates
Closed 16 days agobuild(deps): bump the npm_and_yarn group across 2 directories with 5 updates
Open 16 days agochore(deps): bump the npm_and_yarn group across 9 directories with 8 updates
Closed 16 days agochore(deps): Bump the npm_and_yarn group across 4 directories with 5 updates
Closed 17 days agoBump the npm_and_yarn group across 4 directories with 7 updates
Open 17 days agochore(deps): bump the npm_and_yarn group across 15 directories with 10 updates
Closed 18 days agochore(deps): bump the npm_and_yarn group across 15 directories with 9 updates
Closed 18 days agoBump the npm_and_yarn group across 19 directories with 5 updates
Open 19 days agoBump the npm_and_yarn group across 1 directory with 5 updates
Closed 20 days agoBump the npm_and_yarn group across 18 directories with 4 updates
Open 20 days agodeps(deps): bump the security-patches group across 3 directories with 2 updates
Open 21 days agochore(deps): Bump hono from 4.11.4 to 4.12.14
Closed 21 days agobuild(deps): bump the npm_and_yarn group across 9 directories with 9 updates
Closed 21 days agochore(deps): bump the npm_and_yarn group across 1 directory with 5 updates
Closed 21 days agobuild(deps): bump the npm_and_yarn group across 1 directory with 23 updates
Open 22 days agochore(deps): bump hono from 3.11.8 to 4.12.14 in the npm_and_yarn group across 1 directory
Closed 24 days agochore(deps): bump the npm_and_yarn group across 2 directories with 10 updates
Open 24 days agochore(deps): bump the npm_and_yarn group across 4 directories with 11 updates
Closed 24 days agobuild(deps): bump the npm_and_yarn group across 1 directory with 3 updates
Open 25 days agobuild(deps): bump the npm_and_yarn group across 2 directories with 5 updates
Open 25 days agochore(deps): bump the npm_and_yarn group across 2 directories with 4 updates
Open 25 days agoBump hono from 4.11.5 to 4.12.14
Closed 25 days agobuild(deps): bump the npm_and_yarn group across 1 directory with 8 updates
Closed 26 days agochore(deps): bump the npm_and_yarn group across 4 directories with 10 updates
Closed 26 days agochore(deps): bump the npm_and_yarn group across 4 directories with 9 updates
Closed 26 days agochore(deps): bump the npm_and_yarn group across 3 directories with 12 updates
Open 27 days agochore(deps): bump hono from 4.12.0 to 4.12.14
Open 27 days agobuild(deps): bump the npm_and_yarn group across 1 directory with 12 updates
Closed 27 days agochore(deps): bump hono from 4.12.0 to 4.12.14
Open 27 days agobuild(deps): bump the npm_and_yarn group across 2 directories with 10 updates
Open 28 days agochore(deps): bump the all-minor-and-patch group across 1 directory with 24 updates
Open 28 days agochore(deps): bump the npm_and_yarn group across 3 directories with 9 updates
Closed 28 days agoBump the npm_and_yarn group across 1 directory with 3 updates
Closed 28 days agobuild(deps): bump hono from 4.12.0 to 4.12.14
Closed 28 days agochore(deps): bump the npm_and_yarn group across 1 directory with 5 updates
Open 28 days agoBump hono from 4.11.7 to 4.12.14 in the npm_and_yarn group across 1 directory
Open 29 days agochore(deps): Bump the backend-deps group across 1 directory with 7 updates
Closed 29 days agochore(deps): bump hono from 4.12.8 to 4.12.14
Open 29 days agochore(deps): bump the minor-and-patch group across 1 directory with 12 updates
Closed 29 days agodeps(deps): bump the production-dependencies group across 1 directory with 27 updates
Closed 29 days agochore(deps): Bump hono from 4.6.0 to 4.12.14
Open 29 days agochore(deps): bump hono from 4.12.9 to 4.12.14
Open 29 days agoBump hono from 4.11.1 to 4.12.14
Open 29 days agoActions
Advisory Details
| Published: | April 08, 2026 about 1 month ago |
| Updated: | April 08, 2026 about 1 month ago |
| CVSS Score: | 5.3 CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L |
| Source: | Github |
| Classification: | GENERAL |
| UUID: | GSA_kwCzR0hTQS0yNnBwLTh3Z3YtaGp2bc4ABU3n |