Hono JWT Audience Validation Vulnerability Allowing Cross-Service Access

Vulnerability

A vulnerability exists in Hono's JWT authentication middleware in versions 1.1.0 prior to 4.10.2, where the 'aud' (Audience) claim is not validated by default. This omission can lead to 'confused-deputy' issues, allowing an API to accept tokens intended for different audiences, potentially causing unauthorized access to services. The lack of audience verification can be exploited in scenarios where multiple services share the same issuer and keys, such as with Google Identity tokens.

Impact

This vulnerability creates an authentication and authorization weakness by allowing tokens from one service to be accepted by another, leading to unintended cross-service access and the mixing of different types of tokens or audiences.

Reproduction

To reproduce this vulnerability, use Hono's JWT middleware without specifying the 'aud' option. Obtain a valid JWT for one audience (e.g., through 'Sign in with Google') and use it to access an API that does not verify the 'aud' claim, thereby gaining unauthorized access.

Remediation

Update to Hono version 4.10.2 or later, and configure the JWT middleware to validate the 'aud' claim according to RFC 7519 requirements.

Added: Oct 22, 2025, 8:18 PM
Updated: Oct 22, 2025, 9:14 PM

Vulnerability Rating

Custom Algorithm
spread
2.2
impact
5.0
exploitability
7.6
remediation
8.3
relevance
0.7
threat
4.8
urgency
2.9
incentive
1.7

Our algorithm analyzes dozens of metrics to generate these 8 key vulnerability categories, which are then combined to calculate the overall risk score.