CVEReports
CVEReports

Automated vulnerability intelligence platform. Comprehensive reports for high-severity CVEs generated by AI.

Product

  • Home
  • Sitemap
  • RSS Feed

Company

  • About
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 CVEReports. All rights reserved.

Made with love by Amit Schendel & Alon Barad



CVE-2026-22817

Trust Issues: Hono JWT Algorithm Confusion (CVE-2026-22817)

Alon Barad
Alon Barad
Software Engineer

Feb 20, 2026·7 min read·64 visits

Executive Summary (TL;DR)

Hono's JWT middleware implicitly trusted the algorithm specified in the incoming token header. Attackers can force the server to verify a token using 'HS256' with the server's own public key as the secret, effectively bypassing authentication. Fixed in version 4.11.4.

A critical authentication bypass in the Hono web framework allows attackers to forge JSON Web Tokens (JWTs) by confusing the verification middleware. By swapping the cryptographic algorithm from asymmetric (RS256) to symmetric (HS256) and signing the token with the victim's public key, an attacker can gain administrative access without a valid private key.

The Hook: A Classic Resurrection

In the world of web security, some vulnerabilities are like zombies—they just refuse to stay dead. Enter CVE-2026-22817, a classic 'Algorithm Confusion' attack targeting the Hono web framework. If you thought we left this class of bugs back in 2015 along with non-responsive layouts and Flash players, I have bad news for you.

Hono has been gaining massive traction in the JavaScript/TypeScript ecosystem for its speed and standards-based approach. It runs everywhere—Cloudflare Workers, Bun, Node.js, Deno. It is the darling of the edge computing world. But in version 4.11.3 and earlier, its JWT (JSON Web Token) middleware harbored a flaw that is almost nostalgic in its simplicity.

The vulnerability allows an attacker to look at your application, which is securely configured to use high-end asymmetric cryptography (RSA), and politely ask it to downgrade to a simple symmetric check using a key the attacker already possesses. It’s the cryptographic equivalent of a bank vault that opens if you just scribble 'I am the manager' on a sticky note and paste it to the door.

The Flaw: Symmetric-Asymmetric Confusion

To understand this exploit, you have to understand how JWT libraries decide how to verify a signature. A JWT header contains an alg field, which tells the recipient which mathematical operation was used to sign the token. Common values are RS256 (Asymmetric) and HS256 (Symmetric).

In an RS256 setup, the server holds a Private Key (secret) to sign tokens and distributes a Public Key (open to the world) so anyone can verify them. In an HS256 setup, the server uses a single shared secret to both sign and verify.

The flaw in Hono's middleware was a lack of conviction. If the developer didn't strictly enforce a specific algorithm in their configuration, the middleware looked at the incoming token's header to decide what to do. This is a fatal mistake.

When an attacker changes the header to alg: HS256, the middleware switches logic. Instead of treating the configured key as an RSA Public Key (for verification only), it treats the binary data of that Public Key as a shared HMAC secret. Since the Public Key is public, the attacker has it. They can then sign their own forged admin token using HMAC-SHA256 with the Public Key as the password. The server, seeing HS256 in the header and holding the Public Key, performs the same math, gets a match, and grants access.

The Code: Trusting the Untrustworthy

Let's look at the logic that caused this mess. The vulnerability existed because the middleware prioritized flexibility over security, allowing the incoming packet to dictate the terms of engagement.

In the vulnerable versions, the code logic (simplified) looked something like this:

// Vulnerable Logic Pseudocode
const algorithmToUse = config.alg || tokenHeader.alg;
 
if (algorithmToUse === 'HS256') {
  verifyHmac(token, key);
} else if (algorithmToUse === 'RS256') {
  verifyRsa(token, key);
}

Do you see the issue? If config.alg wasn't explicitly set by the developer (which was optional), the variable algorithmToUse fell back to tokenHeader.alg—a value controlled entirely by the attacker.

The fix in v4.11.4 introduces a strict mismatch check. It basically says, "I don't care what the token claims to be; if it doesn't match what I expect, throw it in the trash."

// The Fix in Hono v4.11.4
if (header.alg !== alg) {
  throw new JwtAlgorithmMismatch(alg, header.alg);
}
 
// Specific hardening for JWK (JSON Web Keys)
if (symmetricAlgorithms.includes(header.alg)) {
  throw new JwtSymmetricAlgorithmNotAllowed(header.alg);
}

This simple check kills the attack dead. Even if the attacker sends a validly signed HS256 token, the server checks its config, sees it expects RS256, and throws a JwtAlgorithmMismatch error before even attempting the crypto math.

The Exploit: Forging the Golden Ticket

Let's walk through a practical attack scenario. Imagine a target application running on Cloudflare Workers using Hono. It uses Auth0 or a similar provider, so it exposes a .well-known/jwks.json endpoint containing its RSA public keys.

Step 1: Reconnaissance

The attacker browses to https://target-app.com/.well-known/jwks.json and downloads the RSA Public Key. It looks like a standard JSON object containing a modulus (n) and exponent (e).

Step 2: The Setup

The attacker captures a valid JWT from the application. It looks like this: eyJhbGciOiJSUzI1NiJ9.eyJzdWIiOiJ1c2VyIiwiYWRtaW4iOmZhbHNlfQ.Signature...

Step 3: Modification

The attacker decodes the token and changes the payload to give themselves superpowers:

{
  "sub": "hacker",
  "admin": true
}

Crucially, they change the header to lie about the algorithm:

{
  "alg": "HS256",
  "typ": "JWT"
}

Step 4: The Signature

Here is the magic trick. The attacker takes the RSA Public Key they downloaded in Step 1. They convert it to a string format (usually PEM) and use that string as the secret key for an HMAC-SHA256 signature.

// Attacker's script
const forgedToken = jwt.sign(
  { sub: 'hacker', admin: true },
  publicKeyPEM, // Using the PUBLIC key as a SECRET
  { algorithm: 'HS256' }
);

Step 5: Execution

The attacker sends this forged token to the Hono app. The app receives the header HS256. It looks at its config, sees the Public Key. It thinks, "Okay, I'll verify this HMAC using the key I have." The math aligns perfectly. The attacker is logged in as Admin.

The Impact: Why This Matters

The CVSS score of 8.2 implies high severity, but the practical impact is often total system compromise. Because JWTs are typically used for stateless authentication, bypassing the signature check allows an attacker to become anyone.

  • Identity Spoofing: Log in as the CEO, the administrator, or a support agent.
  • Privilege Escalation: Access endpoints restricted to specific roles (e.g., /admin/delete_user).
  • Data Exfiltration: If the JWT contains scopes or permissions for accessing other microservices, the attacker can pivot laterally through the infrastructure.

This isn't just a "theoretical" crypto bug. It works reliably against any system where the developer relied on defaults and didn't hardcode the expected algorithm. In the fast-moving world of JS frameworks, developers often copy-paste middleware configs without second-guessing the optional parameters.

The Fix: Closing the Loophole

If you are running Hono, stop reading and run npm update hono. The fix was released in version 4.11.4 on January 13, 2026.

Beyond just updating, this is a lesson in explicit configuration. Never rely on the "magic" of a library to guess your cryptographic intent. Explicit is better than implicit.

Remediation Steps:

  1. Update Hono: Ensure you are on v4.11.4 or higher.
  2. Enforce Algorithms: In your code, specifically tell the JWT middleware which algorithm you expect. Do not leave it undefined.
// BAD: Vulnerable to confusion if defaults are loose
app.use('/api/*', jwt({ secret: publicKey }))
 
// GOOD: Explicitly locks the algorithm
app.use('/api/*', jwt({ secret: publicKey, alg: 'RS256' }))

If you are using JWKs (JSON Web Key Sets), the new version forces you to provide an allowedAlgorithms whitelist or strictly rejects symmetric algorithms when fetching keys from a remote source. This prevents the library from ever attempting an HMAC verification when it should be doing RSA.

Official Patches

HonoOfficial GitHub Advisory and Fix Details

Fix Analysis (1)

Technical Appendix

CVSS Score
8.2/ 10
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:H/A:N
EPSS Probability
0.02%
Top 96% most exploited

Affected Systems

Hono Web Framework (Node.js)Hono Web Framework (Bun)Hono Web Framework (Cloudflare Workers)Hono Web Framework (Deno)

Affected Versions Detail

Product
Affected Versions
Fixed Version
hono
honojs
< 4.11.44.11.4
AttributeDetail
CWE IDCWE-347
Attack VectorNetwork (Remote)
CVSS Score8.2 (Critical)
Exploit StatusPoC Available
ImpactAuthentication Bypass
EPSS Score0.017%

MITRE ATT&CK Mapping

T1550.004Use Alternate Authentication Material: Web Cookies
Defense Evasion
T1078Valid Accounts
Defense Evasion
CWE-347
Improper Verification of Cryptographic Signature

Improper Verification of Cryptographic Signature

Known Exploits & Detection

Hono GitHub RepositoryTest case demonstrating the algorithm confusion attack included in the fix commit.

Vulnerability Timeline

Vulnerability identified
2026-01-12
Patch released in v4.11.4
2026-01-13
Public disclosure via GHSA
2026-01-13

References & Sources

  • [1]GHSA-f67f-6cw9-8mq4: JWT Algorithm Confusion in Hono
  • [2]Understanding JWT Algorithm Confusion Attacks

Attack Flow Diagram

Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.
Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.

More Reports

•1 day ago•GHSA-G72G-R7M4-9X4G
6.3

GHSA-G72G-R7M4-9X4G: Insufficient Session Expiration of OAuth Tokens in NocoDB

NocoDB is subject to an insufficient session expiration vulnerability where OAuth access and refresh tokens are not invalidated or revoked during security-sensitive actions such as password changes, forgot-password requests, or password resets. This allows an attacker possessing an active OAuth token to maintain unauthorized persistence.

Amit Schendel
Amit Schendel
7 views•6 min read
•1 day ago•GHSA-FGMC-2HQJ-86V4
6.9

GHSA-FGMC-2HQJ-86V4: Default Administrative Credentials in vantage6-server

A vulnerability in the vantage6 federated learning framework allows unauthenticated remote attackers to gain administrative control of the server via hardcoded default credentials (root/root) when deployed under default configurations in versions 4.2.3 and below.

Amit Schendel
Amit Schendel
8 views•5 min read
•1 day ago•GHSA-X9F6-9RVM-MMRG
6.9

GHSA-X9F6-9RVM-MMRG: Improper Access Control and Volume Mount Isolation Bypass in vantage6 Node

An improper access control vulnerability in the vantage6 node component allows concurrently running algorithm containers to read and modify sensitive input and output files of other tasks. The lack of strict workspace directory isolation exposes a significant attack surface in multi-tenant or federated environments where untrusted algorithms are executed.

Amit Schendel
Amit Schendel
3 views•4 min read
•1 day ago•CVE-2026-47760
8.7

CVE-2026-47760: Cross-Site Scripting (XSS) via SVG Namespace Sanitizer Bypass in TinyMCE

TinyMCE versions 6.8.0 through 7.0.1 contain a high-severity Cross-Site Scripting (XSS) vulnerability. The flaw exists in the custom HTML parser and sanitizer module, which incorrectly manages SVG namespace scopes when parsing nested elements. A low-privileged or unauthenticated attacker can submit a crafted HTML payload containing nested SVG structures to bypass sanitization filters, leading to arbitrary JavaScript execution in the context of the victim's browser session.

Alon Barad
Alon Barad
14 views•7 min read
•1 day ago•CVE-2026-47759
8.7

CVE-2026-47759: Stored Cross-Site Scripting (XSS) via Unsanitized data-mce-* Serialization Bypass in TinyMCE

CVE-2026-47759 is a critical stored Cross-Site Scripting (XSS) vulnerability affecting multiple active branches of the TinyMCE rich text editor. The flaw resides in the editor's handling of user-controlled, prefixed internal attributes, such as data-mce-href, data-mce-src, and data-mce-style. When processing raw HTML inputs, TinyMCE's internal validation schema neglects to inspect these custom prefixed attributes. During HTML serialization, the editor's engine extracts these unsanitized values and copies them back into standard executable attributes, overwriting any previously sanitized standard values and leading to execution of arbitrary code.

Amit Schendel
Amit Schendel
8 views•7 min read
•1 day ago•CVE-2026-47762
8.7

CVE-2026-47762: Stored Cross-Site Scripting (XSS) in TinyMCE Protect Pattern Restoration

A high-severity stored Cross-Site Scripting (XSS) vulnerability was identified in the TinyMCE rich text editor. The flaw exists in the handling of the 'protect' configuration option, where forged placeholder comments containing malicious payloads bypass the editor's sanitization routines and execute arbitrary JavaScript during serialization and content restoration.

Amit Schendel
Amit Schendel
7 views•8 min read