CVE-2026-39410: Hono Non-breaking Space Prefix Bypass Vulnerability

MODERATE
Advisory Identifier: GHSA-r5rp-j6wh-rvv4
CVSS 4.8
CWE-20
Published
Advisory Summary

CVE-2026-39410 is a MODERATE (CVSS 4.8) non-breaking space prefix bypass vulnerability (CWE-20: Improper Input Validation) affecting Hono libraries in the npm ecosystem. The issue involves non-breaking space prefix bypass in cookie name handling in getcookie(). Remediation is available by upgrading affected packages to version 4.12.12.

CVE-2026-39410 at a Glance

CVE Identifier CVE-2026-39410
GHSA Identifier GHSA-r5rp-j6wh-rvv4
Severity MODERATE
CVSS v3.1 Base Score 4.8
CWE Classification CWE-20: Improper Input Validation
Affected Product Hono
Package Ecosystem npm
Published Date
Last Updated

Security Impact

CVSS: 4.8

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:N/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 None (UI:N)
Scope Unchanged (S:U)
Confidentiality Low (C:L)
Integrity Low (I:L)
Availability None (A:N)

How to Fix CVE-2026-39410

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-39410, 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-20: Improper Input Validation, where the product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly. 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 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.

CVE-2026-39410 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-39410?
CVE-2026-39410 is a security vulnerability in Hono involving Non-breaking space prefix bypass in cookie name handling in getCookie() under CWE-20: Improper Input Validation.
Which Hono versions are affected?
Affected versions include releases prior to 4.12.12 across affected packages: hono.
What version fixes CVE-2026-39410?
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-39410?
CVE-2026-39410 has a CVSS v3.1 base score of 4.8 (MODERATE) with vector string CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:N.
What CWE is associated with CVE-2026-39410?
CVE-2026-39410 is classified under CWE-20: Improper Input Validation (The product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly.).
How can I check npm dependencies for CVE-2026-39410?
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-r5rp-j6wh-rvv4",
  "modified" : "2026-04-08T15:34:46Z",
  "published" : "2026-04-08T00:17:21Z",
  "aliases" : [ "CVE-2026-39410" ],
  "summary" : "Hono: Non-breaking space prefix bypass in cookie name handling in getCookie()",
  "details" : "## Summary\n\nA discrepancy between browser cookie parsing and `parse()` handling allows cookie prefix protections to be bypassed.\n\nCookie 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.\n\n## Details\n\nBrowsers 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.\n\nFor example, the browser treats the following cookies as distinct:\n\n```\n\"dummy-cookie\"\n\"\\u00a0dummy-cookie\"\n```\n\nHowever, `parse()` previously used JavaScript's `trim()`, which removes a broader set of characters including `U+00A0`. As a result, both names are normalized to:\n\n```\n\"dummy-cookie\"\n```\n\nThis mismatch allows attacker-controlled cookies with a `U+00A0` prefix to shadow or override legitimate cookies when accessed via `getCookie()`.\n\n## Impact\n\nAn 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.\n\nThis may lead to:\n\n* Bypassing `__Secure-` and `__Host-` prefix protections\n* Overriding cookies that rely on the Secure attribute\n* Session fixation or session hijacking depending on application usage\n\nThis issue affects applications that rely on `getCookie()` for security-sensitive cookie handling.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:N"
  } ],
  "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-r5rp-j6wh-rvv4"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-39410"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/honojs/hono/commit/cc067c85592415cb1880ad3c61ed923472452ec0"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/honojs/hono"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/honojs/hono/releases/tag/v4.12.12"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-20" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-04-08T00:17:21Z",
    "nvd_published_at" : "2026-04-08T15:16:15Z"
  }
}