CVE-2026-22818CWE-347

JWT algorithm confusion in Hono JWK Auth Middleware when JWK lacks "alg" (untrusted header.alg fallback)

High · published January 13, 2026

CVSS v3.1
8.2
EPSS
0%
Percentile
2.9
In the wild
Unconfirmed
What it is

⚡ A sneaky algorithm confusion vulnerability lurks in Hono's JWT verification! Before version 4.11.4, the middleware let JWT headers dictate verification in a way that could lead to forged tokens slipping through unnoticed. 😱 Think of it like a restaurant that allows diners to order meals with any ingredient, but if the cook doesn’t check the menu, they might end up serving a dish that’s not on the list. This is akin to JWT validation where untrusted headers can dictate the cooking method—recipe chaos! An attacker could forge tokens that the system trusts, leading to unauthorized access. This could allow them to impersonate legitimate users or perform actions without proper authentication—definitely not the kind of recipe you want for your web application!

Put simply

Think of it like a restaurant that allows diners to order meals with any ingredient, but if the cook doesn’t check the menu, they might end up serving a dish that’s not on the list. This is akin to JWT validation where untrusted headers can dictate the cooking method—recipe chaos! This flaw in Hono's JWK/JWKS JWT verification lets attackers exploit algorithm confusion when the selected JWK lacks a defined algorithm, compromising token verification and allowing potentially malicious tokens to be accepted.

What to do

An attacker could forge tokens that the system trusts, leading to unauthorized access. This could allow them to impersonate legitimate users or perform actions without proper authentication—definitely not the kind of recipe you want for your web application! Upgrade Hono to version 4.11.4 immediately to implement an explicit allowlist for asymmetric algorithms. Review your current configurations to ensure that only trusted algorithms are being used for token verification. You've got this! By following these steps, you'll bolster your defenses and keep your application secure. 🛡️

The record
Technical detail
CVSS v3.1
8.2 · HIGH
Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:H/A:N
CVSS v4.0
Not supplied
EPSS
0.00138 · 2.9th percentile
Weakness
CWE-347 · Improper Verification of Cryptographic Signature
Published
2026-01-13T19:49Z
EPSS history
Timeline
  • 13 JAN 19:49Z
    JWT algorithm confusion in Hono JWK Auth Middleware when JWK lacks "alg" (untrusted header.alg fallback)
    cvelistv5