Hono: Non-breaking space prefix bypass in cookie name handling in getCookie()
Summary
A discrepancy between browser cookie parsing and parse() handling allows cookie prefix protections to be bypassed.
Cookie names that are treated as distinct by the browser may be normalized to the same key by parse(), allowing attacker-controlled cookies to override legitimate ones.
Details
Browsers follow RFC 6265bis and only trim SP (0x20) and HTAB (0x09) from cookie names. Other characters, such as the non-breaking space (U+00A0), are preserved as part of the cookie name.
For example, the browser treats the following cookies as distinct:
"dummy-cookie"
"\u00a0dummy-cookie"
However, parse() previously used JavaScript's trim(), which removes a broader set of characters including U+00A0. As a result, both names are normalized to:
"dummy-cookie"
This mismatch allows attacker-controlled cookies with a U+00A0 prefix to shadow or override legitimate cookies when accessed via getCookie().
Impact
An attacker who can set cookies (e.g., via a man-in-the-middle on a non-secure page or other injection vector) can bypass cookie prefix protections and override sensitive cookies.
This may lead to:
- Bypassing
__Secure-and__Host-prefix protections - Overriding cookies that rely on the Secure attribute
- Session fixation or session hijacking depending on application usage
This issue affects applications that rely on getCookie() for security-sensitive cookie handling.
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 15 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 28 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: | May 11, 2026 8 days ago |
| CVSS Score: | 4.8 CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:N |
| EPSS: | 0.03% 9th percentile |
| Source: | Github |
| Classification: | GENERAL |
| UUID: | GSA_kwCzR0hTQS1yNXJwLWo2d2gtcnZ2NM4ABU3p |
PR Statistics
References
- https://github.com/honojs/hono/security/advisories/GHSA-r5rp-j6wh-rvv4
- https://github.com/honojs/hono/commit/cc067c85592415cb1880ad3c61ed923472452ec0
- https://github.com/honojs/hono/releases/tag/v4.12.12
- https://nvd.nist.gov/vuln/detail/CVE-2026-39410
- https://github.com/advisories/GHSA-r5rp-j6wh-rvv4