CVE-2026-59897: Hono AWS API Gateway v1 Header De-duplication Flaw
Hono, a JavaScript web application framework, has a flaw in how it handles HTTP headers when deployed on AWS API Gateway v1. The framework incorrectly removes duplicate header values by comparing substrings instead of exact matches. This means if a request contains the same header value multiple times with slight differences, one instance gets dropped. For applications relying on complete header chains—especially the X-Forwarded-For header used to track proxy chains—this data loss can break security controls like rate limiting, audit logging, and proxy validation. The vulnerability affects versions 4.3.3 through 4.12.26 and is resolved in 4.12.27.
Source data · NVD / CISA · public domain
- CVSS
- 3.1 · 4.8 MEDIUM · CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:N
- Weaknesses (CWE)
- CWE-348
- Affected products
- 1 configuration(s)
- Published / Modified
- 2026-07-08 / 2026-07-10
NVD description (verbatim)
Hono is a Web application framework that provides support for any JavaScript runtime. From 4.3.3 before 4.12.27, the AWS API Gateway v1 adapter can drop a distinct repeated request header value because it de-duplicates values using a substring comparison instead of an exact match, so middleware or application logic that depends on the complete X-Forwarded-For chain, rate limiting, audit logging, or proxy-chain validation can receive incomplete data. This issue is fixed in version 4.12.27.
3 reference(s) · View on NVD →
SEC.co analysis · AI-assisted, reviewed against source
Technical summary
The AWS API Gateway v1 adapter in Hono uses substring comparison logic when de-duplicating repeated request header values. The correct approach for HTTP header handling is exact-match comparison per RFC specifications. When a header appears multiple times with values that partially overlap (e.g., '192.168.1.1' and '192.168.1.10'), the adapter's substring logic incorrectly treats one as a duplicate and removes it. This is classified as CWE-348 (Improper Neutralization of Special Elements used in an HTTP Request), as the malformed header processing fails to preserve the semantic integrity of the HTTP message. The issue manifests specifically in the AWS API Gateway v1 adapter and does not affect other Hono adapters or runtime configurations.
Business impact
Applications using Hono with AWS API Gateway v1 that depend on complete request header information face degraded security posture. Rate-limiting middleware may be bypassed if it relies on the full X-Forwarded-For chain to identify clients. Audit logs may contain incomplete or inaccurate client IP chains, complicating incident investigation. Proxy-chain validation logic may fail to authenticate legitimate requests or accept spoofed ones due to missing header values. For organizations processing sensitive transactions or operating in regulated environments, incomplete audit trails create compliance risk. The impact is direct for applications where header integrity is a security boundary, but negligible for stateless services without header-dependent logic.
Affected systems
Only Hono versions 4.3.3 through 4.12.26 are affected when deployed using the AWS API Gateway v1 adapter. Other Hono adapters (Lambda@Edge, API Gateway v2, others) and non-AWS deployments are not vulnerable. Organizations running Hono 4.12.27 or later are protected. Versions prior to 4.3.3 are not affected because the adapter logic in question did not exist in earlier releases. Exact determination of impact requires identifying both the Hono version and confirmation that the application is actively using the AWS API Gateway v1 adapter (not v2).
Exploitability
This is not a remotely exploitable vulnerability in the traditional sense; it does not grant unauthenticated access or execute code. Instead, it is a logic flaw that an attacker can leverage if they control or influence the request headers themselves. An attacker behind a chain of proxies or controlling a legitimate forwarding proxy could craft a request with X-Forwarded-For values designed to exploit the substring de-duplication logic, causing the server to lose part of the client chain. The CVSS score of 4.8 (MEDIUM) reflects low attack complexity and network access, but limited confidentiality and integrity impact. Exploitation requires the application's business logic to actually depend on complete headers; if rate-limiting or validation is implemented elsewhere, the flaw has minimal practical effect.
Remediation
Upgrade Hono to version 4.12.27 or later. This release corrects the header de-duplication logic to use exact-match comparison. For applications unable to upgrade immediately, implement a compensating control: deploy a reverse proxy (nginx, ALB) in front of API Gateway that re-validates and normalizes the X-Forwarded-For header before Hono processes it. Additionally, audit any rate-limiting, audit logging, or proxy-validation code that relies on headers; consider moving these checks to infrastructure layers (AWS WAF, API Gateway policies) that are not vulnerable to Hono's adapter logic.
Patch guidance
1. Test Hono 4.12.27 in a non-production environment to verify compatibility with your application's dependencies and features. 2. Review your deployment's use of the AWS API Gateway v1 adapter; if you are using v2 or another adapter, the vulnerability does not apply, but upgrade is still recommended for defense-in-depth. 3. Plan a phased rollout to production, monitoring for any regressions in header handling or rate-limiting behavior. 4. After patching, re-validate that rate-limiting, audit logging, and proxy-validation functions operate as expected. 5. For any custom middleware that parses X-Forwarded-For, verify it handles the now-complete header chain correctly (multiple comma-separated IPs).
Detection guidance
1. Scan your codebase and package.json files for Hono versions between 4.3.3 and 4.12.26. 2. Confirm whether your application explicitly imports or uses the AWS API Gateway v1 adapter (check for '@hono/aws-lambda' imports with v1 configuration). 3. Monitor runtime logs for anomalies in rate-limiting enforcement or missing client IPs in audit logs. 4. Enable AWS API Gateway logging and inspect X-Forwarded-For headers in requests to identify potential cases where values are being dropped. 5. Implement a test request with duplicate proxy entries in X-Forwarded-For and verify the full chain is logged by your application.
Why prioritize this
Although the CVSS score is MEDIUM (4.8), this vulnerability should be patched promptly for organizations where header integrity is a security control. It is not zero-day or weaponized, but it directly affects confidentiality and integrity of critical audit and rate-limiting data. Prioritize remediation if you operate under PCI DSS, HIPAA, or SOC 2 compliance regimes that mandate complete audit trails. For standard web applications without strict header-based security requirements, it can follow normal patch cycles but should not be deferred indefinitely.
Risk score, explained
The CVSS 3.1 score of 4.8 reflects: Attack Vector = Network (remote exploitation possible via crafted headers), Attack Complexity = High (attacker must control or influence proxies in the request chain), Privileges Required = None, User Interaction = None, Scope = Unchanged, Confidentiality Impact = Low (incomplete header data reduces visibility), Integrity Impact = Low (audit records and rate-limit decisions are compromised), Availability Impact = None. The MEDIUM severity is justified because the impact is confined to data loss in specific application scenarios, not system-wide compromise.
Frequently asked questions
Do we need to patch if we use Hono with a different adapter (not AWS API Gateway v1)?
No, this specific vulnerability only affects the AWS API Gateway v1 adapter. If you use API Gateway v2, the Lambda adapter without API Gateway, or non-AWS runtimes, you are not vulnerable. However, upgrading to 4.12.27 is still recommended as a general best practice.
Our application does not use the X-Forwarded-For header for security decisions. Are we at risk?
Your risk is minimal. The vulnerability only has practical impact if your middleware or application logic explicitly depends on the complete X-Forwarded-For chain for rate-limiting, proxy validation, or audit purposes. If you do not parse this header, the flaw will not affect your security posture.
Can we work around this without upgrading?
Yes, deploy a reverse proxy (AWS ALB, nginx, or similar) in front of API Gateway that re-normalizes and validates the X-Forwarded-For header before requests reach Hono. This shifts header handling to a layer not affected by Hono's adapter logic. However, upgrading is the permanent and recommended solution.
Is this vulnerability being actively exploited?
No, this vulnerability is not listed in the CISA Known Exploited Vulnerabilities (KEV) catalog and is not known to be weaponized. It is a logic flaw that requires understanding of proxy header mechanics to exploit, making opportunistic attacks unlikely.
This analysis is provided for informational purposes and reflects the vulnerability details as of the publication date. Security patches, exploit techniques, and vendor advisories may evolve. Always verify patch applicability against the official Hono release notes and your specific deployment configuration. This content does not constitute legal, compliance, or formal risk assessment advice; consult your security team and relevant compliance frameworks for your organization's remediation timeline. Source: NVD (public-domain), retrieved 2026-08-17. Analysis generated by SEC.co (claude-haiku-4-5).
Related vulnerabilities
- CVE-2020-37248MEDIUMOfflineIMAP STRIPTLS Vulnerability – Credential Exposure Risk
- CVE-2026-44046MEDIUMApache APISIX wolf-rbac Plugin Identity Spoofing and Access Control Bypass
- CVE-2026-54289MEDIUMHono Lambda@Edge Request Header Truncation Vulnerability
- CVE-2026-57942MEDIUMLibreTranslate IP Spoofing & Rate Limit Bypass Vulnerability
- CVE-2026-59999MEDIUMOpenSSH DisableForwarding Bypass Allows Unauthorized SSH Tunneling
- CVE-2026-46466LOWDell PowerProtect Data Domain Information Tampering Vulnerability
- CVE-2026-55641HIGH9Router Authentication Bypass and SSRF Vulnerability
- CVE-2026-47673MEDIUMHono JWT Middleware Bearer Scheme Validation Bypass