Miggo Logo

CVE-2025-62610: Hono Improper Authorization vulnerability

8.1

CVSS Score
3.1

Basic Information

EPSS Score
-
Published
10/22/2025
Updated
10/22/2025
KEV Status
No
Technology
TechnologyJavaScript

Technical Details

CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N
Package NameEcosystemVulnerable VersionsFirst Patched Version
hononpm>= 1.1.0, < 4.10.24.10.2

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The vulnerability lies in Hono's JWT authentication middleware, which failed to validate the aud (Audience) claim in JWTs by default. This could lead to a 'confused-deputy' or 'token mix-up' problem, where a service accepts a token intended for a different audience, potentially allowing unauthorized access.

The analysis of the provided patch commit 45ba3bf9e3dff8e4bd85d6b47d4b71c8d6c66bef reveals that the core of the vulnerability was in the verify function located in src/utils/jwt/jwt.ts. The patch adds explicit logic to this function to validate the aud claim against a newly introduced aud option in the verification settings. Before this change, the function would successfully validate a token even if the aud claim did not match the service, as long as the other claims (like signature, expiration, etc.) were valid. Therefore, the verify function is identified as the vulnerable function because it was the component that lacked the necessary security check. The reporter also suggested that verifyWithJwks might be affected, but the provided patch only modifies the verify function, which is likely called by other middleware functions.

Vulnerable functions

verify
src/utils/jwt/jwt.ts
The `verify` function in `src/utils/jwt/jwt.ts` is responsible for JWT validation. Before the patch, it lacked validation for the `aud` (Audience) claim. This omission meant that the function would not check if the token was intended for the service that was validating it. An attacker could abuse this by using a valid token issued for a different service to gain unauthorized access. The patch introduces logic to verify the `aud` claim against the expected audience, thus mitigating the vulnerability.

WAF Protection Rules

WAF Rule

### Improp*r *ut*oriz*tion in *ono (JWT *u*i*n** V*li**tion) *ono’s JWT *ut**nti**tion mi**l*w*r* *i* not v*li**t* t** `*u*` (*u*i*n**) *l*im *y ****ult. *s * r*sult, *ppli**tions usin* t** mi**l*w*r* wit*out *n *xpli*it *u*i*n** ****k *oul* ****pt

Reasoning

T** vuln*r**ility li*s in *ono's JWT *ut**nti**tion mi**l*w*r*, w*i** **il** to v*li**t* t** `*u*` (*u*i*n**) *l*im in JWTs *y ****ult. T*is *oul* l*** to * '*on*us**-**puty' or 'tok*n mix-up' pro*l*m, w**r* * s*rvi** ****pts * tok*n int*n*** *or * *