MEDIUM 4.8

CVE-2026-54289: Hono Lambda@Edge Request Header Truncation Vulnerability

Hono, a JavaScript web framework, has a vulnerability affecting AWS Lambda@Edge deployments prior to version 4.12.25. When CloudFront forwards requests to Lambda@Edge, it may send repeated headers (like X-Forwarded-For) as separate entries. The vulnerable Hono adapter incorrectly overwrites each duplicate header value instead of preserving all of them, so only the last value reaches the application. This silent truncation can break security controls that rely on the full header chain and lose audit trail information about request routing.

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
0 configuration(s)
Published / Modified
2026-06-22 / 2026-06-22

NVD description (verbatim)

Hono is a Web application framework that provides support for any JavaScript runtime. Prior to 4.12.25, on AWS Lambda@Edge, CloudFront delivers a request header that appears more than once as several separate entries. The adapter writes each value with Headers.set instead of Headers.append, so every value overwrites the previous one and only the last reaches the application. Repeated request headers such as X-Forwarded-For, Forwarded, and Via are silently truncated to a single value. Request middleware sees only the last value of a repeated header instead of the full chain. For applications that base access control on the X-Forwarded-For chain, this can weaken or alter that decision; for auditing, hop history is lost. This vulnerability is fixed in 4.12.25.

2 reference(s) · View on NVD →

SEC.co analysis · AI-assisted, reviewed against source

Technical summary

The vulnerability stems from improper header handling in the Hono AWS Lambda@Edge adapter. CloudFront delivers repeat headers as multiple distinct header entries, but the adapter uses Headers.set() for each value rather than Headers.append(). Since Headers.set() overwrites previous values, the header chain collapses to a single entry—only the final value. This affects headers designed to accumulate values across proxy hops: X-Forwarded-For (client IP chain), Forwarded (RFC 7239), and Via (proxy trace). Middleware and application logic receive truncated information, potentially missing the original client IP and hop history. The issue is classified as CWE-348 (Misrepresentation of Requested Resource)—the application does not receive the authentic request context it expects.

Business impact

For production applications using Hono on Lambda@Edge, this vulnerability introduces two practical risks. First, access control decisions based on X-Forwarded-For validation may be compromised if the system enforces rules on the first (real client) IP but only receives the last (CloudFront edge server) IP. Second, security auditing and incident investigation become harder because hop history is lost—you cannot reconstruct which proxies handled a request. Organizations relying on header chains for WAF rules, geolocation controls, or compliance logging should prioritize assessment.

Affected systems

The vulnerability affects Hono versions prior to 4.12.25 when deployed as an AWS Lambda@Edge function. It does not affect Hono deployments on other runtimes (Node.js, Bun, Deno, etc.) or standard Lambda; the issue is specific to the Lambda@Edge adapter's interaction with CloudFront's header format. Any application running Hono < 4.12.25 on Lambda@Edge that relies on repeated request headers is at risk.

Exploitability

Exploitation does not require special network capabilities or user interaction; the condition occurs automatically whenever CloudFront forwards a request with duplicate headers to Lambda@Edge. An attacker does not need to craft malformed requests—normal traffic with standard repeated headers (especially X-Forwarded-For in multi-proxy scenarios) triggers the truncation. However, the attacker must know or assume that the target application validates or logs the full header chain; if the application ignores repeated headers or does not perform IP-based access control, the risk is lower. The CVSS score of 4.8 reflects that exploitation is feasible and consequences are present, but requires specific application logic to materialize as a real security flaw.

Remediation

Update Hono to version 4.12.25 or later. The patch corrects the adapter to use Headers.append() instead of Headers.set() when handling repeated headers, preserving the full chain. After patching, redeploy the Lambda@Edge function. No configuration changes or data migration is required.

Patch guidance

To remediate: (1) Update your Hono dependency in package.json to version 4.12.25 or newer and run npm install (or equivalent). (2) Review your build pipeline to ensure the Lambda@Edge artifact is rebuilt with the patched version. (3) Test in a staging Lambda@Edge distribution before production rollout, focusing on requests with multiple X-Forwarded-For or other repeated headers to confirm the full chain is now visible to your application. (4) Deploy to production Lambda@Edge functions. Consider gradging the rollout using CloudFront traffic splitting if available.

Detection guidance

To identify if you are affected: (1) Check the Hono version in your Lambda@Edge deployment; any version before 4.12.25 is vulnerable. (2) Audit application logs or middleware handlers that receive headers; if you see only a single value for X-Forwarded-For or Via when you expect a comma-separated chain, truncation is occurring. (3) Enable CloudFront access logs and compare the 'x-forwarded-for' field with what your Hono application logs; mismatches indicate silent truncation. (4) Test by originating requests through multiple proxies (e.g., client → proxy → CloudFront → Lambda@Edge) and verify your application sees the complete chain.

Why prioritize this

This is a MEDIUM-severity vulnerability that should be patched in the near term but does not require emergency response. The fix is simple (a version upgrade), the affected population is specific (Lambda@Edge users), and the risk is conditional on application behavior (IP-based access control or audit logging). Prioritize patching if your application enforces security policy based on request headers or if compliance requirements mandate logging the full request chain. If your application does not validate headers or perform IP filtering, the urgency is lower but patching is still recommended for defense in depth.

Risk score, explained

CVSS 4.8 (MEDIUM) reflects: AV:N (network-accessible, any Internet user can send requests), AC:H (exploitation requires specific application logic—IP validation or logging), PR:N (no authentication needed), UI:N (no user interaction), S:U (impact is within the vulnerable component), C:L (confidentiality slightly impacted due to lost audit context), I:L (integrity slightly impacted due to truncated control data), A:N (availability not affected). The score correctly notes that the vulnerability exists but materializes as a real risk only in applications that depend on header chain validation or auditing.

Frequently asked questions

Does this affect all Hono deployments or just Lambda@Edge?

Only Hono deployments on AWS Lambda@Edge are affected. Standard Lambda, Node.js, Bun, Deno, and other runtimes do not have this vulnerability because they do not receive repeated headers in the CloudFront format that triggers the bug.

What if my application does not validate X-Forwarded-For headers?

If your application ignores or does not act on repeated headers, the truncation is unlikely to cause a security incident. However, you may still lose audit and debugging information. Patching is still recommended to ensure you can implement header-based controls in the future without introducing unexpected behavior.

Can I work around this without upgrading Hono?

A temporary workaround is to parse the CloudFront headers directly (e.g., CloudFront-Viewer-Address, CloudFront-Is-SmartTV-Viewer) instead of relying on X-Forwarded-For, but this requires application code changes and reduces portability. Upgrading to 4.12.25 is the proper fix.

Will upgrading Hono break my application?

Upgrading to 4.12.25 or later is a patch release and should be backward-compatible. The change only affects how headers are handled—your application will now receive the full header chain instead of a truncated version, which is the correct behavior. Test in staging before production to confirm no unexpected downstream changes occur.

This analysis is based on the CVE record and vendor advisory. Specific configurations, business context, and compliance requirements may alter risk and urgency. Test all patches in non-production environments before deployment. Consult your security team and vendor advisories for definitive guidance on your infrastructure. Source: NVD (public-domain), retrieved 2026-07-28. Analysis generated by SEC.co (claude-haiku-4-5).