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-24472

Total Recall: Hono Middleware's Unintentional Session Sharing

Alon Barad
Alon Barad
Software Engineer

Jan 27, 2026·6 min read·47 visits

Executive Summary (TL;DR)

Hono < 4.11.7 contains a critical flaw in its `hono/cache` middleware. By failing to respect RFC 9111 directives (specifically `Cache-Control: private` and `Set-Cookie`), the middleware caches sensitive, user-specific responses. This allows attackers to perform Web Cache Deception attacks, potentially hijacking sessions or viewing private data simply by requesting the same resource after a victim.

The Hono framework's cache middleware was a little too eager to help, ignoring standard HTTP caching headers like `private` and `no-store`. This resulted in a shared cache implementation that cheerfully stored and served sensitive user sessions and cookies to unauthenticated attackers.

The Hook: Speed at the Cost of Secrets

In the modern JavaScript ecosystem, speed is the religion, and Hono is one of its high priests. Marketed as an "Ultrafast" web framework for the Edges (Cloudflare Workers, Deno, Bun), it promises low latency and high throughput. And how do we achieve speed? Caching. Caching is the magic pixie dust that turns database-heavy slogs into instant HTTP 200 responses.

But here is the thing about magic: if you don't control it, it burns your house down. The hono/cache middleware is designed to be a shared cache—a mechanism that sits between your users and your logic, storing responses so the next person asking for the same thing gets it faster. Ideally, a shared cache is supposed to act like a neutral librarian, handing out public books but refusing to let strangers read your personal diary.

Prior to version 4.11.7, Hono’s librarian was functionally illiterate regarding privacy labels. It didn't care if the book was stamped "TOP SECRET" or "PRIVATE DIARY." If the status code was 200 OK, Hono made a copy and put it on the public shelf. This vulnerability is a textbook example of Web Cache Deception (WCD), where the application logic does everything right (setting private headers), but the infrastructure layer (the middleware) ignores them completely.

The Flaw: RFC 9111? Never Heard of Her

The root of this vulnerability lies in a blatant disregard for RFC 9111, the sacred text governing HTTP Caching. In a compliant HTTP stack, a shared cache must look for specific signals before storing a response. The most critical of these are Cache-Control: private, Cache-Control: no-store, and the presence of a Set-Cookie header. These are the universal signs for "Do Not Clone."

Developers using Hono likely wrote their endpoints correctly. They might have explicitly set c.header('Cache-Control', 'private') on a user profile endpoint. In a sane world, this tells downstream caches to back off. However, the vulnerable hono/cache middleware had a very simple decision tree: Is it a successful response? If yes, cache it.

This created a massive dissonance between developer intent and runtime behavior. The application code was shouting "Private!", but the middleware was functionally deaf. Because this runs at the application layer (especially in runtimes like Node.js, Bun, or Deno where the middleware is the cache), there is no upstream safety net. If Alice logs in and the response includes a Set-Cookie header with her session ID, the middleware caches that specific response. When Bob comes along five seconds later and requests the same login page or profile endpoint, the middleware sees a cache hit and serves him Alice’s session cookie. Bob is now Alice. Congratulations on the unexpected identity theft.

The Code: The Smoking Gun

Let's look at the crime scene. The vulnerability existed because the logic for determining cacheability was practically non-existent. It defaulted to "yes." The fix introduced in version 4.11.7 adds a new function, shouldSkipCache, which actually performs the necessary due diligence.

Here is the logic that was missing, now implemented in the patch (Commit 12c511745b3f1e7a3f863a23ce5f921c7fa805d1):

// The new sheriff in town
const shouldSkipCache = (res: Response) => {
  const vary = res.headers.get('Vary')
  // 1. If the response varies on EVERYTHING, don't cache it.
  if (vary && vary.includes('*')) {
    return true
  }
 
  const cacheControl = res.headers.get('Cache-Control')
  // 2. The Regex of Redemption
  // It looks for 'private', 'no-store', or 'no-cache'
  if (
    cacheControl &&
    /(?:^|,Ps*)(?:private|no-(?:store|cache))(?:Ps*(?:=|,|$))/i.test(cacheControl)
  ) {
    return true
  }
 
  // 3. The Cookie Guard
  // If we are setting a session, we are definitely not sharing this.
  if (res.headers.has('Set-Cookie')) {
    return true
  }
 
  return false
}

The previous version essentially lacked this entire block. It is startlingly simple: if the response sets a cookie, or if the header says private, return true (skip caching). The use of a case-insensitive regex (/i) to parse the Cache-Control header is robust enough to catch variations like Private or no-STORE, protecting developers who might not be consistent with their casing.

The Exploit: Session Hijacking for Dummies

Exploiting this does not require complex buffer overflows or heap spraying. It just requires timing. This is a standard Web Cache Deception attack, but strictly internal to the application server.

The Scenario:

  1. Target: A Hono application using cache() middleware on the /api/user endpoint.
  2. Victim (Alice): Authenticates and requests /api/user. The server generates a JSON response containing her PII and potentially refreshes her session via Set-Cookie.
  3. The Middleware: Ignores the private header and Set-Cookie. It keys the cache entry by the URL /api/user and stores the full response body and headers.
  4. Attacker (Bob): Requests /api/user from his own machine, without any authentication headers.
  5. The Leak: The middleware finds the cache hit for /api/user. It serves Alice's JSON and, crucially, her Set-Cookie header to Bob.

The beauty (and horror) of this exploit is that the attacker doesn't even need to be authenticated. They just need to request the resource while the cache entry is "hot."

The Fix: A Lesson in RFC Compliance

The mitigation is straightforward: Update Hono to version 4.11.7 or later. The patch forces the middleware to respect the boundaries of HTTP caching protocols.

However, this incident serves as a critical lesson for developers building on top of "middleware" ecosystems. Middleware often abstracts away complexity, but when it abstracts away security controls (like header validation), it becomes a liability.

If you cannot update immediately, you must disable the cache middleware on any route that serves personalized content or sets cookies. There is no config-based workaround for the vulnerable versions; the code simply does not check the headers. You either patch it, or you turn it off.

> [!ALERT] > If you are running Hono on Node.js, Bun, or Deno, you are at higher risk. Cloudflare Workers might mitigate some of this if you are relying on Cloudflare's edge caching rules on top of Hono, but internal memory caching within the worker instance is still vulnerable.

Official Patches

HonoHono v4.11.7 Release Notes

Fix Analysis (1)

Technical Appendix

CVSS Score
5.3/ 10
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N

Affected Systems

Hono Web Framework (JavaScript/TypeScript)Hono Middleware (cache)

Affected Versions Detail

Product
Affected Versions
Fixed Version
Hono
HonoJS
< 4.11.74.11.7
AttributeDetail
CWE IDCWE-524 (Information Exposure Through Caching)
CVSS v3.15.3 (Medium)
Attack VectorNetwork (AV:N)
ImpactConfidentiality Loss (Session Hijacking / PII)
PlatformNode.js, Deno, Bun, Cloudflare Workers
Patch Commit12c511745b3f1e7a3f863a23ce5f921c7fa805d1

MITRE ATT&CK Mapping

T1557Adversary-in-the-Middle
Credential Access
T1040Network Sniffing (Logical equivalent via Cache)
Credential Access
CWE-524
Information Exposure Through Caching

The software uses a web cache that does not verify the sensitivity of the data before storing it, potentially exposing private information to unauthorized actors.

Known Exploits & Detection

ScenarioWeb Cache Deception via standard HTTP requests to cached endpoints.

Vulnerability Timeline

Vulnerability Disclosed
2026-01-27
Patch Released (v4.11.7)
2026-01-27

References & Sources

  • [1]GHSA-6wqw-2p9w-4vw4
  • [2]NVD - CVE-2026-24472

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•CVE-2026-58254
6.5

CVE-2026-58254: Authorization Bypass in NATS Server Message Tracing for Leaf Node Connections

NATS Server prior to versions 2.12.8 and 2.14.3 contains an incorrect authorization vulnerability (CWE-863) in its message tracing subsystem. When evaluating whether a connection is permitted to publish trace events to a destination subject specified in the Nats-Trace-Dest header, the server only checks standard client permissions and omits permission checks for leaf node connections. This allows a connected leaf node operator with restricted publishing privileges to emit internal trace events to unauthorized subjects and suppress standard message delivery using the Nats-Trace-Only header.

Alon Barad
Alon Barad
6 views•10 min read
•1 day ago•CVE-2026-63341
7.5

CVE-2026-63341: Unauthenticated Denial of Service via Unbounded Topic Depth in Aedes MQTT Broker

CVE-2026-63341 is a high-severity Denial of Service (DoS) vulnerability in the Aedes MQTT broker for Node.js affecting all versions prior to 1.1.1. The flaw stems from missing input validation on the hierarchical depth of incoming MQTT topic strings before they are passed to the underlying topic-matching engine, qlobber. Because qlobber enforces a hardcoded limit of 100 topic levels and throws a synchronous exception when this threshold is exceeded, an attacker can send a single MQTT packet containing 101 or more forward-slash-separated levels to trigger an uncaught exception that immediately terminates the Node.js broker process.

Alon Barad
Alon Barad
12 views•12 min read
•1 day ago•CVE-2026-61725
6.1

CVE-2026-61725: Path Traversal and Arbitrary File Overwrite in sevenz-rust2

CVE-2026-61725 is a path traversal vulnerability (CWE-22) in the sevenz-rust2 Cargo package prior to version 0.21.1. The vulnerability occurs because the decompression utility fails to validate or sanitize archive entry filenames before joining them with the destination directory path via std::path::Path::join. An attacker who supplies a crafted 7z archive containing parent directory traversal sequences or absolute paths can write or overwrite arbitrary files on the host filesystem with the privileges of the extracting process.

Alon Barad
Alon Barad
6 views•12 min read
•1 day ago•CVE-2026-77309
8.8

CVE-2026-77309: Unauthenticated Remote Code Execution in NASA-AMMOS AIT-GUI via Incomplete File Cleanup and Path Traversal

CVE-2026-77309 (GHSA-jrjx-9jjw-747m) is a high-severity unauthenticated remote code execution vulnerability affecting NASA-AMMOS AIT-GUI versions 1.0.0 through 2.5.0. The flaw results from chaining an incomplete file cleanup error in the telemetry query endpoint (/tlm/query) with a directory traversal flaw in the script execution endpoint (/script/run). An attacker on an adjacent network can stage arbitrary Python statements into a static file on disk and execute that file under the privileges of the AIT-GUI web server process.

Amit Schendel
Amit Schendel
13 views•10 min read
•1 day ago•CVE-2026-77332
2.3

CVE-2026-77332: Surfaced-Memory Envelope Injection and Stored Prompt Injection in memtomem-stm

A vulnerability classified under CWE-116 (Improper Encoding or Escaping of Output) exists in memtomem-stm versions 0.1.0 through 0.1.33. The software acts as a Model Context Protocol (MCP) short-term memory proxy gateway for AI agent architectures. When surfacing retrieved memories and scratchpad items into downstream Large Language Model (LLM) context envelopes, the SurfacingFormatter component fails to properly sanitize untrusted memory attributes. An attacker with the ability to plant untrusted content into the agent's long-term or working memory store can inject arbitrary structural delimiters, close the <surfaced-memories> XML boundary prematurely, visually obscure instructions using Unicode bidirectional overrides, and execute stored prompt injection attacks against downstream LLM agents.

Alon Barad
Alon Barad
14 views•10 min read
•1 day ago•CVE-2026-77331
2.0

CVE-2026-77331: Race Condition and Session State Corruption in memtomem-stm

CVE-2026-77331 (GHSA-72jh-722p-rqr3) is a concurrency and session-state synchronization vulnerability in memtomem-stm, a short-term memory proxy gateway for AI agents. In versions 0.1.2 prior to 0.1.34, concurrent Model Context Protocol (MCP) Remote Procedure Call (RPC) failures or mid-flight task cancellations can initiate duplicate reconnect loops and permit dirty or cancelled transport sessions to be reused. This deficiency results in session-state integrity loss and local service degradation.

Amit Schendel
Amit Schendel
6 views•9 min read