8.2high
Hono is Vulnerable to Authentication Bypass by IP Spoofing in AWS Lambda ALB conninfo
- Severity
- 8.2high CVSS:3.1 by GitHub_M
- Exploit likelihood
- 0.41% (higher than 27% of CVEs)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- GHSA-xh87-mx6m-69f3
Description
Hono is a Web application framework that provides support for any JavaScript runtime. In versions 4.12.0 and 4.12.1, 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. Version 4.12.2 patches the issue.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| honojs hono | >= 4.12.0, < 4.12.2 | CVE List |
| hono (npm) | from 4.12.0 before 4.12.2 | GitHub Advisory Database |
| hono hono | from 4.12.0 before 4.12.2 | NVD |
All scores
| GitHub_M | 8.2high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:L/A:N |
| GitHub | 8.2high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:L/A:N |
| NVD | 7.5high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N |
Classification
What each source says
CVE List
Hono is a Web application framework that provides support for any JavaScript runtime. In versions 4.12.0 and 4.12.1, 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. Version 4.12.2 patches the issue.
GitHub Advisory Database
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.
NVD (es)
Hono es un framework de aplicación web que proporciona soporte para cualquier entorno de ejecución de JavaScript. En las versiones 4.12.0 y 4.12.1, al usar el adaptador de AWS Lambda ('hono/aws-lambda') detrás de un Application Load Balancer (ALB), la función 'getConnInfo()' seleccionó incorrectamente el primer valor del encabezado 'X-Forwarded-For'. Debido a que AWS ALB añade la dirección IP del cliente real al final del encabezado 'X-Forwarded-For', el primer valor puede ser controlado por el atacante. Esto podría permitir que los mecanismos de control de acceso basados en IP (como el middleware 'ipRestriction') fueran eludidos. La versión 4.12.2 corrige el problema.
References
| https://github.com/honojs/hono/security/advisories/GHSA-xh87-mx6m-69f3 | vendor-advisory, web | |
| https://github.com/honojs/hono/commit/41adbf56e252c04611f8972364ac0887ae07a4c7 | patch, web | |
| https://github.com/honojs/hono/releases/tag/v4.12.2 | product, release-notes, web | |
| https://nvd.nist.gov/vuln/detail/CVE-2026-27700 | advisory | |
| https://github.com/honojs/hono | package | |
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2026-27700 changed 2026-02-27 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-xh87-mx6m-69f3 changed 2026-09-10 | CC-BY-4.0 |
| NVD | CVE-2026-27700 changed 2026-06-17 | Public domain |