Hono has incorrect IP matching in ipRestriction() for IPv4-mapped IPv6 addresses
Summary
ipRestriction() does not canonicalize IPv4-mapped IPv6 client addresses (e.g. ::ffff:127.0.0.1) before applying IPv4 allow or deny rules. In environments such as Node.js dual-stack, this can cause IPv4 rules to fail to match, leading to unintended authorization behavior.
Details
The middleware classifies client addresses based on their textual form. Addresses containing ":" are treated as IPv6, including IPv4-mapped IPv6 addresses such as ::ffff:127.0.0.1. These addresses are not normalized to IPv4 before matching.
As a result:
- IPv4 static rules (e.g.
127.0.0.1) do not match because the raw string differs - IPv4 CIDR rules (e.g.
127.0.0.0/8,10.0.0.0/8) are skipped because the address is treated as IPv6
For example, with:
denyList: ['127.0.0.1']
a request from 127.0.0.1 may be represented as ::ffff:127.0.0.1 and bypass the deny rule.
This behavior commonly occurs in Node.js environments where IPv4 clients are exposed as IPv4-mapped IPv6 addresses.
Impact
Applications that rely on IPv4-based ipRestriction() rules may incorrectly allow or deny requests.
In affected deployments, a denied IPv4 client may bypass access restrictions. Conversely, legitimate clients may be rejected when using IPv4 allow lists.
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 agobuild(deps): bump hono from 4.12.9 to 4.12.15 in /server
Open 20 days agoBump the npm_and_yarn group across 18 directories with 4 updates
Open 20 days agobuild(deps): bump the minor-and-patch group across 1 directory with 7 updates
Closed 20 days agoBump hono from 4.6.0 to 4.12.15 in /backend
Closed 21 days agodeps: bump hono from 4.12.10 to 4.12.15
Open 21 days agochore(deps): bump the all-minor-and-patch group across 1 directory with 26 updates
Open 21 days agodeps(deps): bump the security-patches group across 3 directories with 2 updates
Open 21 days agochore(deps): bump the minor-and-patch group across 1 directory with 25 updates
Closed 21 days agochore(deps): bump the production group across 1 directory with 12 updates
Open 21 days agochore(deps): bump the npm_and_yarn group across 1 directory with 3 updates
Open 21 days agochore(deps): Bump hono from 4.11.4 to 4.12.14
Closed 21 days agochore(deps): bump the dependencies group across 1 directory with 6 updates
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 agoBump hono from 4.12.3 to 4.12.15
Closed 21 days agochore(deps)(deps): bump hono from 4.11.2 to 4.12.15
Open 21 days agochore(deps): Bump the npm-non-major group across 1 directory with 8 updates
Open 22 days agoBump the npm_and_yarn group across 5 directories with 5 updates
Closed 22 days agodeps(api)(deps): bump hono from 4.11.9 to 4.12.15 in /cloudflare/forgescan-api in the hono group
Open 22 days agochore(deps): bump the production-dependencies group across 1 directory with 6 updates
Open 22 days agochore(deps): bump the all-minor-patch group across 1 directory with 23 updates
Open 22 days agochore(deps): Bump hono from 4.6.0 to 4.12.15
Open 22 days agodeps: Bump the minor-and-patch group across 1 directory with 12 updates
Open 22 days agochore(deps): bump hono from 4.12.9 to 4.12.15
Open 22 days agoBump the npm_and_yarn group across 1 directory with 5 updates
Open 22 days agoBump hono from 4.12.9 to 4.12.15
Closed 22 days agobuild(deps): bump the npm_and_yarn group across 1 directory with 23 updates
Open 22 days agochore(deps): bump hono from 4.12.8 to 4.12.15 in /frontend
Closed 22 days agochore(deps): bump hono from 4.12.10 to 4.12.15 in /dashboard
Open 22 days agochore(deps): Bump hono from 4.12.10 to 4.12.15 in /apps/translator/server in the minor-and-patch group across 1 directory
Closed 23 days agoBump hono from 4.12.6 to 4.12.15
Open 23 days agochore(deps): Bump the npm_and_yarn group across 1 directory with 2 updates
Closed 23 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 agoBump the npm_and_yarn group across 1 directory with 12 updates
Open 24 days agoActions
Advisory Details
| Published: | April 08, 2026 about 1 month ago |
| Updated: | May 11, 2026 8 days ago |
| CVSS Score: | 6.3 CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N |
| EPSS: | 0.01% 2th percentile |
| Source: | Github |
| Classification: | GENERAL |
| UUID: | GSA_kwCzR0hTQS14cGNmLXBnNTItcjkyZ84ABU3o |
PR Statistics
References
- https://github.com/honojs/hono/security/advisories/GHSA-xpcf-pg52-r92g
- https://github.com/honojs/hono/commit/48fa2233bc092f650119f42df043050737cabf39
- https://github.com/honojs/hono/releases/tag/v4.12.12
- https://nvd.nist.gov/vuln/detail/CVE-2026-39409
- https://github.com/advisories/GHSA-xpcf-pg52-r92g