CVE-2026-27700: Hono is Vulnerable to Authentication Bypass by IP Spoofing in AWS Lambda ALB conninfo
Summary When using the AWS Lambda adapter (hono/aws-lambda) behind an Application Load Balancer (ALB), the getConnInfo() function incorrectly selected the first value from the X-Forwarded-For header. Because AWS ALB appends the real client IP address to the end of the X-Forwarded-For header, the first value can be attacker-controlled.
Published Feb 25, 2026 · Updated Feb 27, 2026
Affected packages
hono
- Ecosystem
- npm
- Affected
- >= 4.12.0, < 4.12.2
- Fixed in
- 4.12.2
- Check
npm ls hono
Advisory details
From the GitHub Advisory Database (CC BY 4.0).
Summary
When using the AWS Lambda adapter (hono/aws-lambda) behind an Application Load Balancer (ALB), the getConnInfo() function incorrectly selected the first value from the X-Forwarded-For header.
Because AWS ALB appends the real client IP address to the end of the X-Forwarded-For header, the first value can be attacker-controlled.
This could allow IP-based access control mechanisms (such as the ipRestriction middleware) to be bypassed.
Details
In ALB environments, AWS appends the actual client IP address to the end of any existing X-Forwarded-For header value. However, the previous implementation of getConnInfo() extracted the leftmost IP address:
address = xff.split(',')[0].trim()If a client sent:
X-Forwarded-For: <spoofed-ip>ALB would forward:
X-Forwarded-For: <spoofed-ip>, <real-client-ip>Since the implementation selected the first value, the spoofed IP address was trusted. This affected applications using:
ipRestriction(getConnInfo, { allowList: [...] })or any custom middleware relying on getConnInfo(c).remote.address for authorization decisions.
The issue only affects deployments using the AWS Lambda adapter behind an ALB. API Gateway (v1/v2) and Lambda Function URLs are not affected, as they use AWS-provided source IP values from requestContext.
Impact
An unauthenticated remote attacker could bypass IP-based access restrictions by supplying a crafted X-Forwarded-For header. This may allow access to resources that were intended to be restricted by IP address.
Only applications deployed behind an ALB and relying on getConnInfo() for IP-based authorization are affected.
Credited to EdamAme-x.
References
How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. No analysis has been written for this entry yet. Methodology
More npm vulnerabilities
All npm entriesCVE-2026-126355
Hono: `csrf()` does not check requests sent by hyperlink auditing (`text/ping`)
medium5.3Nov 12, 2026CVE-2026-126356
Hono: `validator('form')` skips validation for `multipart/form-data` requests with extra parameters
medium5.3Nov 12, 2026CVE-2026-126357
Hono: `mount()` and `app.mount()` can forward a path that bypasses middleware scoped inside the mount prefix
medium5.3Nov 12, 2026CVE-2026-126358
Hono: RegExpRouter skips wildcard middleware for some route sets and for paths with an encoded line terminator
medium5.3Nov 12, 2026CVE-2026-126359
Hono: `css` helper does not escape a closing tag split between the template and an interpolated value, allowing HTML injection
low3.4Nov 12, 2026CVE-2026-111757
Hono: `serveStatic` decodes the request path a second time, leading to bypass of middleware on static paths
medium5.3Oct 20, 2026
