CVE-2026-56762: Hono Cookie Name Validation Vulnerability – MEDIUM Severity
Hono, a popular web framework, has a vulnerability in how it handles cookie names when developers use user-controlled input. Before version 4.12.12, the framework doesn't properly validate cookie names, allowing special characters like line breaks to slip through. While modern JavaScript runtimes (Node.js, Cloudflare Workers) actively reject these malformed cookies and prevent them from being sent, the result is a runtime crash rather than a successful attack. This means your application stops responding rather than being exploited for data theft or tampering.
Source data · NVD / CISA · public domain
- CVSS
- 3.1 · 5.3 MEDIUM · CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
- Weaknesses (CWE)
- CWE-20
- Affected products
- 0 configuration(s)
- Published / Modified
- 2026-06-23 / 2026-06-24
NVD description (verbatim)
Hono before 4.12.12 does not validate cookie names on the write path in the setCookie(), serialize(), and serializeSigned() functions, allowing invalid characters such as control characters (e.g. \r or \n) when an application passes a user-controlled cookie name. This can produce malformed Set-Cookie header values. In modern runtimes such as Node.js and Cloudflare Workers, such invalid header values are rejected and cause a runtime error before the response is sent, so header injection or response splitting could not be reproduced; the issue primarily affects correctness and robustness, resulting in runtime errors (availability) rather than confirmed header injection.
2 reference(s) · View on NVD →
SEC.co analysis · AI-assisted, reviewed against source
Technical summary
Hono versions prior to 4.12.12 lack input validation on the cookie name parameter across three functions: setCookie(), serialize(), and serializeSigned(). When untrusted cookie names containing control characters (\r, \n, or other invalid characters) are passed to these functions, the resulting Set-Cookie header becomes malformed. Although HTTP header injection or response splitting attacks were theoretically possible, they are not practically exploitable in current runtimes because Node.js and Cloudflare Workers validate header values before transmission and throw errors. This converts a potential integrity issue into an availability concern—the application fails to send the response rather than sending an injected one.
Business impact
Applications using Hono risk unexpected crashes when cookie operations are performed with unsanitized user input. For production systems, this translates to service unavailability during the window of failure. The impact is limited to availability rather than confidentiality or integrity, since modern runtimes prevent the header from being transmitted. However, if an attacker can trigger these crashes repeatedly, they can cause denial of service. Teams relying on Hono for API gateways, web servers, or middleware should prioritize patching to prevent user-facing downtime.
Affected systems
Any application using Hono framework versions before 4.12.12 is affected, particularly those that accept cookie names from external sources (query parameters, request headers, user input). Cloudflare Workers, Node.js applications, and other modern JavaScript runtimes that validate headers are affected in terms of runtime errors. Older or more permissive runtimes might behave differently and should be assessed independently.
Exploitability
Exploitation requires an attacker to control or influence the cookie name parameter passed to setCookie(), serialize(), or serializeSigned(). This is a low-barrier attack since no authentication or special privileges are typically needed—a public API endpoint accepting user input in cookie logic is sufficient. However, the practical outcome in modern runtimes is limited to denial of service via runtime error rather than header injection. No active exploitation in the wild has been confirmed, and the vulnerability is not listed on CISA's Known Exploited Vulnerabilities catalog.
Remediation
Upgrade Hono to version 4.12.12 or later. This release includes input validation on cookie names to reject control characters and other invalid characters before they reach the header generation functions. For organizations unable to upgrade immediately, implement application-level validation of all user-controlled cookie names before passing them to Hono functions, rejecting names containing whitespace, control characters, or other non-standard characters.
Patch guidance
Check your package.json or lock file to confirm your current Hono version. If it is below 4.12.12, update via npm (npm install hono@latest) or your preferred package manager. Verify in your changelog or release notes that the update includes the cookie name validation fix. Test your application thoroughly in a staging environment before deploying to production, especially any code paths that construct cookie names from user input. No breaking changes are anticipated with this patch.
Detection guidance
Monitor application logs for runtime errors originating from cookie operations, particularly TypeErrors or malformed header errors when Set-Cookie headers are being constructed. Search your codebase for calls to setCookie(), serialize(), and serializeSigned() where the cookie name parameter is derived from user input without prior validation. In runtime environments, enable detailed error logging to catch and alert on header validation failures. Automated dependency scanning tools should flag Hono versions below 4.12.12.
Why prioritize this
Although the CVSS score of 5.3 reflects a medium-severity, low-complexity vulnerability, prioritization should focus on the attack surface in your environment. If your applications pass user input directly to Hono cookie functions, this should be addressed soon to prevent availability disruptions. The lack of active exploitation and the mitigating effect of modern runtimes mean this is not an emergency, but it should not be deferred indefinitely. Organizations with strict uptime requirements should treat this as higher priority.
Risk score, explained
The CVSS 3.1 score of 5.3 (MEDIUM) reflects network-accessible attack surface (AV:N), low attack complexity (AC:L), no privilege requirements (PR:N), no user interaction (UI:N), and impact limited to availability (A:L). No confidentiality or integrity impact is scored because modern runtimes prevent the malformed header from leaving the application. The score appropriately reflects a correctness and robustness issue rather than a security boundary breach.
Frequently asked questions
Can an attacker use this to inject HTTP headers or split responses?
In modern runtimes like Node.js and Cloudflare Workers, no. These platforms validate header values before transmission and reject malformed headers with a runtime error. Earlier or custom runtimes might behave differently, so if you use a non-standard JavaScript runtime, consult your runtime documentation. The primary risk is availability, not header injection.
Do I need to change my application code if I upgrade Hono?
No. The fix is entirely in Hono's validation layer. Once you upgrade to 4.12.12 or later, Hono will reject invalid cookie names automatically. If your application relies on passing unusual characters in cookie names (which is not recommended), you may see new errors that were previously hidden—but this is a correctness fix, not a breaking change in the intended API.
What characters in cookie names are now blocked?
The fix validates cookie names according to HTTP standards. Control characters (including \r, \n, \t), spaces, and other non-alphanumeric characters are rejected. Standard cookie names containing letters, digits, hyphens, and underscores remain valid. Review RFC 6265 or your Hono documentation for the exact allowed character set.
Is this vulnerability actively being exploited?
No. The vulnerability is not listed on CISA's Known Exploited Vulnerabilities (KEV) catalog, and no public proof-of-concept or active exploitation has been reported. However, you should still patch promptly as part of normal maintenance, especially if your application handles untrusted cookie names.
This analysis is provided for informational purposes and reflects the vulnerability as described in the CVE record and vendor advisories as of the publication date. Security landscapes evolve; always consult the official Hono repository and security advisories for the latest information. No guarantee is made regarding the completeness or accuracy of derived impact assessments. Organizations should conduct their own risk analysis based on their specific environment, runtime platform, and threat model. This document does not constitute legal or compliance advice. Source: NVD (public-domain), retrieved 2026-07-29. Analysis generated by SEC.co (claude-haiku-4-5).
Weaknesses (CWE)
Related vulnerabilities
- CVE-2024-21944MEDIUMMemory Integrity Vulnerability in DIMM SPD Validation
- CVE-2025-5089MEDIUMArista EOS/CVX DoS via Malformed Messages
- CVE-2025-5090MEDIUMCVX CVE-2025-5090: Input Validation Flaw Leads to Agent Crashes and Denial of Service
- CVE-2025-58175MEDIUMGeoServer SSRF Vulnerability in Proxy Configuration
- CVE-2026-0018MEDIUMAndroid AccessibilityManagerService Denial of Service Vulnerability
- CVE-2026-0051MEDIUMAndroid UBSan Runtime Denial of Service Vulnerability
- CVE-2026-0070MEDIUMAndroid DevicePolicyManagerService Local Denial of Service Vulnerability
- CVE-2026-0085MEDIUMAndroid Contact Handler Denial of Service Vulnerability