CVE-2026-56762: Hono Hono Missing Validation Of Cookie Vulnerability

MODERATE
Advisory Identifier: GHSA-26pp-8wgv-hjvm
CVSS 5.3
CWE-113 CWE-20
Published
Advisory Summary

CVE-2026-56762 is a MODERATE (CVSS 5.3) hono missing validation of cookie vulnerability (CWE-113: Improper Neutralization of CRLF Sequences in HTTP Headers ('HTTP Request/Response Splitting')) affecting Hono libraries in the npm ecosystem. The issue involves hono missing validation of cookie name on write path in setcookie(). Remediation is available by upgrading affected packages to version 4.12.12.

CVE-2026-56762 at a Glance

CVE Identifier CVE-2026-56762
GHSA Identifier GHSA-26pp-8wgv-hjvm
Severity MODERATE
CVSS v3.1 Base Score 5.3
CWE Classification CWE-113: Improper Neutralization of CRLF Sequences in HTTP Headers ('HTTP Request/Response Splitting')
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:N/A:L).

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 None (I:N)
Availability Low (A:L)

How to Fix CVE-2026-56762

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.12
npm install hono@4.12.12
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-56762, 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.12), 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-113: Improper Neutralization of CRLF Sequences in HTTP Headers ('HTTP Request/Response Splitting'), where the product receives data from an http agent/component (e.g., web server, proxy, browser, etc.), but it does not neutralize or incorrectly neutralizes cr and lf characters before the data is included in outgoing http headers. 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 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.

CVE-2026-56762 Affected Hono Versions

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

References

Frequently Asked Questions

What is CVE-2026-56762?
CVE-2026-56762 is a security vulnerability in Hono involving Hono missing validation of cookie name on write path in setCookie() under CWE-113: Improper Neutralization of CRLF Sequences in HTTP Headers ('HTTP Request/Response Splitting').
Which Hono versions are affected?
Affected versions include releases prior to 4.12.12 across affected packages: hono.
What version fixes CVE-2026-56762?
Upgrading to 4.12.12 (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.12. Upgrade your dependency to 4.12.12 or later.
What is the CVSS score of CVE-2026-56762?
CVE-2026-56762 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:N/A:L.
What CWE is associated with CVE-2026-56762?
CVE-2026-56762 is classified under CWE-113: Improper Neutralization of CRLF Sequences in HTTP Headers ('HTTP Request/Response Splitting') (The product receives data from an HTTP agent/component (e.g., web server, proxy, browser, etc.), but it does not neutralize or incorrectly neutralizes CR and LF characters before the data is included in outgoing HTTP headers.).
How can I check npm dependencies for CVE-2026-56762?
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-26pp-8wgv-hjvm",
  "modified" : "2026-09-24T18:25:34Z",
  "published" : "2026-04-08T00:17:02Z",
  "aliases" : [ "CVE-2026-56762" ],
  "summary" : "Hono missing validation of cookie name on write path in setCookie()",
  "details" : "## Summary\n\nCookie names are not validated on the write path when using `setCookie()`, `serialize()`, or `serializeSigned()` to generate Set-Cookie headers.\n\nWhile certain cookie attributes such as domain and path are validated, the cookie name itself may contain invalid characters.\n\nThis results in inconsistent handling of cookie names between parsing (read path) and serialization (write path).\n\n## Details\n\nWhen 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.\n\nFor example:\n\n```\nSet-Cookie: legit\nX-Injected: evil=value\n```\n\nHowever, 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.\n\nAs a result, the reported header injection / response splitting behavior could not be reproduced in these environments.\n\n## Impact\n\nApplications that pass untrusted input as the cookie name to `setCookie()`, `serialize()`, or `serializeSigned()` may encounter runtime errors due to invalid header values.\n\nIn tested environments, malformed `Set-Cookie` headers are rejected before being sent, and the reported header injection behavior could not be reproduced.\n\nThis issue primarily affects correctness and robustness rather than introducing a confirmed exploitable vulnerability.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "hono"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "4.12.12"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/honojs/hono/security/advisories/GHSA-26pp-8wgv-hjvm"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-56762"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/honojs/hono/commit/a586cd72e3f6122792e631ecf1817e5cabb803ec"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/honojs/hono"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/honojs/hono/releases/tag/v4.12.12"
  }, {
    "type" : "WEB",
    "url" : "https://www.vulncheck.com/advisories/hono-missing-cookie-name-validation-in-setcookie"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-113", "CWE-20" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-04-08T00:17:02Z",
    "nvd_published_at" : null
  }
}