CVE-2026-47674: Hono IP Restriction Bypasses Static Deny Vulnerability

MODERATE
Advisory Identifier: GHSA-xrhx-7g5j-rcj5
CVSS 5.3
CWE-1289 CWE-185
Published
Advisory Summary

CVE-2026-47674 is a MODERATE (CVSS 5.3) ip restriction bypasses static deny vulnerability (CWE-1289: Improper Validation of Unsafe Equivalence in Input) affecting Hono libraries in the npm ecosystem. The issue involves ip restriction bypasses static deny rules for non-canonical ipv6. Remediation is available by upgrading affected packages to version 4.12.21.

CVE-2026-47674 at a Glance

CVE Identifier CVE-2026-47674
GHSA Identifier GHSA-xrhx-7g5j-rcj5
Severity MODERATE
CVSS v3.1 Base Score 5.3
CWE Classification CWE-1289: Improper Validation of Unsafe Equivalence in Input
Affected Product Hono
Package Ecosystem npm
Published Date
Last Updated

Security Impact

CVSS: 5.3

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality None (C:N)
Integrity Low (I:L)
Availability None (A:N)

How to Fix CVE-2026-47674

To remediate this vulnerability, upgrade all affected Hono dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

hono fixed: 4.12.21
npm install hono@4.12.21
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

npm ls hono

How to Check if You Are Affected

To determine whether your Node.js application is affected by CVE-2026-47674, inspect your project dependencies using npm:

npm ls hono

Analyze the terminal output to locate any version of Hono in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 4.12.21), your application is affected.

Note: The npm ls hono command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-1289: Improper Validation of Unsafe Equivalence in Input, where the product receives an input value that is used as a resource identifier or other type of reference, but it does not validate or incorrectly validates that the input is equivalent to a potentially-unsafe value. In Hono, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### Summary The `ip-restriction` middleware (`hono/ip-restriction`) compares incoming IP addresses against configured deny and allow rules using string equality after partial normalization. Non-canonical IPv6 representations of an address already listed in a static rule — such as compressed forms, explicit-zero forms, or hex-notation IPv4-mapped addresses — do not match the normalized rule entry, causing the rule to be silently skipped. ### Details When the rule matcher is built, each configured IP rule is normalized to a canonical string form. Incoming IP addresses received at request time are then compared against those canonical strings without applying the same normalization. Because IPv6 permits multiple syntactically different representations of the same numeric address, a non-canonical form of a denied address fails the string lookup and proceeds to the CIDR check, which also finds no match for rules registered as static (no prefix length). The request is then allowed. Affected non-canonical forms include: - Compressed versus expanded notation (`2001:db8::1` vs `2001:db8:0:0:0:0:0:1`) - Hex-notation IPv4-mapped addresses (`::ffff:7f00:1` vs `::ffff:127.0.0.1`) - Zone identifier suffixes (e.g., `fe80::1%eth0`) Additionally, invalid IP address strings provided as the remote address are not rejected and may result in unexpected allow or deny behavior. This issue arises when applications use `ipRestriction()` with static (non-CIDR) rules and the IP address source can supply addresses in non-canonical IPv6 form. ### Impact A request from an IP address covered by a static deny rule may bypass the restriction if the address is presented in a non-canonical IPv6 form. This may lead to: - Unauthorized access to endpoints intended to be restricted to specific IP addresses - Bypass of IP-based access controls in environments where the runtime or an upstream proxy provides source addresses in a form that differs from the canonical form used in the rule configuration This issue affects applications using `hono/ip-restriction` with static deny rules for IPv4 or IPv6 addresses, particularly when the source address is derived from proxy headers or custom `getIP` implementations that may return non-canonical forms.

CVE-2026-47674 Affected Hono Versions

1 component(s)
Fixed Versions:
4.12.21
Product / Package Ecosystem Affected Versions Fixed Version
hono
npm
< 4.12.21
4.12.21

References

Frequently Asked Questions

What is CVE-2026-47674?
CVE-2026-47674 is a security vulnerability in Hono involving IP Restriction bypasses static deny rules for non-canonical IPv6 under CWE-1289: Improper Validation of Unsafe Equivalence in Input.
Which Hono versions are affected?
Affected versions include releases prior to 4.12.21 across affected packages: hono.
What version fixes CVE-2026-47674?
Upgrading to 4.12.21 (or the latest patched release for your respective branch) resolves the vulnerability.
Is hono affected?
Yes, hono is affected in releases prior to 4.12.21. Upgrade your dependency to 4.12.21 or later.
What is the CVSS score of CVE-2026-47674?
CVE-2026-47674 has a CVSS v3.1 base score of 5.3 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N.
What CWE is associated with CVE-2026-47674?
CVE-2026-47674 is classified under CWE-1289: Improper Validation of Unsafe Equivalence in Input (The product receives an input value that is used as a resource identifier or other type of reference, but it does not validate or incorrectly validates that the input is equivalent to a potentially-unsafe value.).
How can I check npm dependencies for CVE-2026-47674?
Run the dependency tree command: 'npm ls hono'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-xrhx-7g5j-rcj5",
  "modified" : "2026-06-04T18:00:22Z",
  "published" : "2026-06-04T18:00:22Z",
  "aliases" : [ "CVE-2026-47674" ],
  "summary" : "Hono: IP Restriction bypasses static deny rules for non-canonical IPv6 ",
  "details" : "### Summary\n\nThe `ip-restriction` middleware (`hono/ip-restriction`) compares incoming IP addresses against configured deny and allow rules using string equality after partial normalization. Non-canonical IPv6 representations of an address already listed in a static rule — such as compressed forms, explicit-zero forms, or hex-notation IPv4-mapped addresses — do not match the normalized rule entry, causing the rule to be silently skipped.\n\n### Details\n\nWhen the rule matcher is built, each configured IP rule is normalized to a canonical string form. Incoming IP addresses received at request time are then compared against those canonical strings without applying the same normalization. Because IPv6 permits multiple syntactically different representations of the same numeric address, a non-canonical form of a denied address fails the string lookup and proceeds to the CIDR check, which also finds no match for rules registered as static (no prefix length). The request is then allowed.\n\nAffected non-canonical forms include:\n\n- Compressed versus expanded notation (`2001:db8::1` vs `2001:db8:0:0:0:0:0:1`)\n- Hex-notation IPv4-mapped addresses (`::ffff:7f00:1` vs `::ffff:127.0.0.1`)\n- Zone identifier suffixes (e.g., `fe80::1%eth0`)\n\nAdditionally, invalid IP address strings provided as the remote address are not rejected and may result in unexpected allow or deny behavior.\n\nThis issue arises when applications use `ipRestriction()` with static (non-CIDR) rules and the IP address source can supply addresses in non-canonical IPv6 form.\n\n### Impact\n\nA request from an IP address covered by a static deny rule may bypass the restriction if the address is presented in a non-canonical IPv6 form.\n\nThis may lead to:\n\n- Unauthorized access to endpoints intended to be restricted to specific IP addresses\n- Bypass of IP-based access controls in environments where the runtime or an upstream proxy provides source addresses in a form that differs from the canonical form used in the rule configuration\n\nThis issue affects applications using `hono/ip-restriction` with static deny rules for IPv4 or IPv6 addresses, particularly when the source address is derived from proxy headers or custom `getIP` implementations that may return non-canonical forms.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "hono"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "4.12.21"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/honojs/hono/security/advisories/GHSA-xrhx-7g5j-rcj5"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-47674"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/honojs/hono/commit/c831020fb1fa2e929d222f6c84e1abfe013e512b"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/honojs/hono"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/honojs/hono/releases/tag/v4.12.21"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-1289", "CWE-185" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-06-04T18:00:22Z",
    "nvd_published_at" : "2026-05-28T17:16:32Z"
  }
}