Executive brief
Hono is a web application framework used to build JavaScript-based websites and services. A security flaw in its cross-origin resource sharing (CORS) settings allows malicious websites to bypass security protections and access sensitive data from a user's session. If a user visits a malicious site while logged into a Hono-based application, the attacker could read private information or perform actions on the user's behalf using their existing login cookies.
Technical details
A vulnerability exists in Hono's CORS middleware when 'credentials: true' is enabled without a specific 'origin' defined. In this configuration, the middleware incorrectly reflects the 'Origin' header from the incoming request and responds with 'Access-Control-Allow-Credentials: true'. This behavior bypasses the browser's standard security restriction that prevents the use of wildcards with credentialed requests. An attacker can exploit this by hosting a malicious page that makes cross-origin requests to the vulnerable application; if a victim is authenticated via cookies, the attacker's script can read the response data. The issue is resolved in version 4.12.25 by ensuring the middleware does not reflect arbitrary origins when credentials are required.
Affected products
- honojs Hono < 4.12.25
Timeline
- 2026-06-09: advisory: GitHub Security Advisory published by maintainers
- 2026-06-22: disclosed: CVE published to NVD
- 2026-06-22: patched: Fix released in version 4.12.25