CVE-2025-71381: Hono Hono Vulnerable To Vary Header Vulnerability

MODERATE
Advisory Identifier: GHSA-q7jf-gf43-6x6p
CVSS 4.2
CWE-444
Published
Advisory Summary

CVE-2025-71381 is a MODERATE (CVSS 4.2) hono vulnerable to vary header vulnerability (CWE-444: Inconsistent Interpretation of HTTP Requests ('HTTP Request/Response Smuggling')) affecting Hono libraries in the npm ecosystem. The issue involves hono vulnerable to vary header injection leading to potential cors bypass. Remediation is available by upgrading affected packages to version 4.10.3.

CVE-2025-71381 at a Glance

CVE Identifier CVE-2025-71381
GHSA Identifier GHSA-q7jf-gf43-6x6p
Severity MODERATE
CVSS v3.1 Base Score 4.2
CWE Classification CWE-444: Inconsistent Interpretation of HTTP Requests ('HTTP Request/Response Smuggling')
Affected Product Hono
Package Ecosystem npm
Published Date
Last Updated

Security Impact

CVSS: 4.2

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

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

How to Fix CVE-2025-71381

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.10.3
npm install hono@4.10.3
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-2025-71381, 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.10.3), 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-444: Inconsistent Interpretation of HTTP Requests ('HTTP Request/Response Smuggling'), where the product acts as an intermediary http agent (such as a proxy or firewall) in the data flow between two entities such as a client and server, but it does not interpret malformed http requests or responses in ways that are consistent with how the messages will be processed by those entities that are at the ultimate destination. 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 A flaw in the CORS middleware allowed request `Vary` headers to be reflected into the response, enabling attacker-controlled `Vary` values and potentially affecting cache behavior. ### Details The middleware previously copied the `Vary` header from the request when `origin` was not set to `"*"`. Since `Vary` is a response header that should only be managed by the server, this could allow an attacker to influence caching behavior or cause inconsistent CORS handling. Most environments will see impact only when shared caches or proxies rely on the `Vary` header. The practical effect varies by configuration. ### Impact May cause cache key pollution and inconsistent CORS enforcement in certain setups. No direct confidentiality, integrity, or availability impact in default configurations. ### Resolution Update to the latest patched release. The CORS middleware has been corrected to handle `Vary` exclusively as a response header.

CVE-2025-71381 Affected Hono Versions

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

References

Frequently Asked Questions

What is CVE-2025-71381?
CVE-2025-71381 is a security vulnerability in Hono involving Hono vulnerable to Vary Header Injection leading to potential CORS Bypass under CWE-444: Inconsistent Interpretation of HTTP Requests ('HTTP Request/Response Smuggling').
Which Hono versions are affected?
Affected versions include releases prior to 4.10.3 across affected packages: hono.
What version fixes CVE-2025-71381?
Upgrading to 4.10.3 (or the latest patched release for your respective branch) resolves the vulnerability.
Is hono affected?
Yes, hono is affected in releases prior to 4.10.3. Upgrade your dependency to 4.10.3 or later.
What is the CVSS score of CVE-2025-71381?
CVE-2025-71381 has a CVSS v3.1 base score of 4.2 (MODERATE) with vector string CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:N.
What CWE is associated with CVE-2025-71381?
CVE-2025-71381 is classified under CWE-444: Inconsistent Interpretation of HTTP Requests ('HTTP Request/Response Smuggling') (The product acts as an intermediary HTTP agent (such as a proxy or firewall) in the data flow between two entities such as a client and server, but it does not interpret malformed HTTP requests or responses in ways that are consistent with how the messages will be processed by those entities that are at the ultimate destination.).
How can I check npm dependencies for CVE-2025-71381?
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-q7jf-gf43-6x6p",
  "modified" : "2026-10-02T18:28:55Z",
  "published" : "2025-10-24T19:15:13Z",
  "aliases" : [ "CVE-2025-71381" ],
  "summary" : "Hono vulnerable to Vary Header Injection leading to potential CORS Bypass",
  "details" : "### Summary  \nA flaw in the CORS middleware allowed request `Vary` headers to be reflected into the response, enabling attacker-controlled `Vary` values and potentially affecting cache behavior.\n\n### Details  \nThe middleware previously copied the `Vary` header from the request when `origin` was not set to `\"*\"`.  Since `Vary` is a response header that should only be managed by the server, this could allow an attacker to influence caching behavior or cause inconsistent CORS handling.\n\nMost environments will see impact only when shared caches or proxies rely on the `Vary` header. The practical effect varies by configuration.\n\n### Impact  \nMay cause cache key pollution and inconsistent CORS enforcement in certain setups. No direct confidentiality, integrity, or availability impact in default configurations.  \n\n### Resolution  \nUpdate to the latest patched release. The CORS middleware has been corrected to handle `Vary` exclusively as a response header.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "hono"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "4.10.3"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/honojs/hono/security/advisories/GHSA-q7jf-gf43-6x6p"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-71381"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/honojs/hono/commit/d9b8b4b73b4f997994f2764013207365fe711282"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/honojs/hono"
  }, {
    "type" : "WEB",
    "url" : "https://www.vulncheck.com/advisories/hono-vary-header-injection-in-cors-middleware"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-444" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2025-10-24T19:15:13Z",
    "nvd_published_at" : null
  }
}