NewApp Monitoring is liveSign up free
AgentbeamBeta
AI agent vulnerability · Other MCP servers and tools

CVE-2026-73846: CKAN MCP Server: Cache-key canonicalization collision enables cache confusion / poisoning

mediumCVSS 3.1 6.5GHSA-78x9-fhhx-v2g6

The CKAN MCP Server (npm `@aborruso/ckan-mcp-server`) builds its response-cache key from an ambiguous string, so different tool queries can share one cache entry. On a shared instance, an attacker can prime an entry and a victim's different query gets the attacker's response. Versions below 0.4.112 are affected. Fixed in 0.4.112.

Published Sep 3, 2026 · Analysis Nov 1, 2026

What an attacker can do

In src/utils/cache.ts, canonicalizeParams joins sorted key=value pairs with & without escaping &, = or the | that buildCacheKey uses between the server URL, action and parameters. Two different parameter sets then hash to the same key. The advisory confirms two collisions:

  • { q: "budget", rows: 10 } and { q: "budget&rows=10" } both become q=budget&rows=10.
  • { filters: { a: "b" } } and { filters: '{"a":"b"}' } both become filters={"a":"b"}.

Because an attacker can put any target string into the alphabetically first parameter, the collision is general. Caching is on by default. A Node HTTP instance shares one in-process LRU across clients, and the Cloudflare Workers deployment shares caches.default.

The attacker primes the key first, then the victim's genuine query for the same portal returns the attacker's cached result. The PoC shows a victim expecting results for two parameters and receiving the single-parameter result. The damage is mostly integrity (CVSS 6.5, high complexity because it needs caching, a shared instance and priming first).

The advisory also chains this with prompt injection: the attacker's request can return a dataset with malicious notes or title text, which the victim's AI agent then reads from the cache without ever querying that dataset.

Who is affected

@aborruso/ckan-mcp-server below 0.4.112. Exposure is highest when one server instance, over HTTP or on Cloudflare Workers, serves several clients, because that is where a cache is shared. A single-user stdio setup has no second party to poison. Check the installed version:

npm ls @aborruso/ckan-mcp-server

@aborruso/ckan-mcp-server

Ecosystem
npm
Affected
< 0.4.112
Fixed in
0.4.112
Check
npm ls @aborruso/ckan-mcp-server

How to fix it

Upgrade to @aborruso/ckan-mcp-server 0.4.112.

npm install @aborruso/[email protected]

The release notes describe typed, injection-proof cache keys that remove collisions between different parameter sets. The same release also hardens SSRF redirects, caps response size, binds the HTTP transport to 127.0.0.1 by default and wraps portal free text in an untrusted-content block. The advisory suggests partitioning the cache per client on shared deployments.

How to tell if you were hit

The advisory gives no log signature. Look in HTTP request logs for tool calls whose parameter values contain &, = or | characters, such as a q value like budget&rows=10, or an object parameter sent as a JSON string. Compare results returned to a client with what the same query returns with caching off. If your AI agents use this server, their recorded MCP tool calls in Beam show which queries and datasets they received, which helps you trace poisoned content.

Original advisory

From the GitHub Advisory Database (CC BY 4.0).

Summary

The response cache derives its key from an ambiguous string serialization of the request parameters. canonicalizeParams joins sorted ${key}=${value} pairs with & and does not escape &, =, or the | field separators used in buildCacheKey. Two different logical parameter sets can therefore serialize to the same key and share one cache entry. Because the cached value is whatever the upstream returned for whichever request populated the entry first, an attacker can prime a colliding key so a victim's distinct query (same server_url) is served the attacker's cached response.

Affected code

// src/utils/cache.ts
export function canonicalizeParams(params) {
  const keys = Object.keys(params).sort();
  const pairs = [];
  for (const key of keys) {
    const value = params[key];
    if (value === undefined || value === null) continue;
    const serialized = typeof value === "object" ? JSON.stringify(value) : String(value);
    pairs.push(`${key}=${serialized}`);        // value not escaped
  }
  return pairs.join("&");                        // '&' delimiter, injectable
}

export async function buildCacheKey(serverUrl, action, params) {
  const raw = `${serverUrl}|${action}|${canonicalizeParams(params)}`;  // '|' also unescaped
  return sha1Hex(raw);
}

Confirmed collisions (identical key):

  • { q: "budget", rows: 10 } ≡ { q: "budget&rows=10" } → both canonicalize to q=budget&rows=10
  • { filters: { a: "b" } } ≡ { filters: '{"a":"b"}' } → both canonicalize to filters={"a":"b"} (object-vs-string ambiguity)

An attacker can reproduce any target canonical string by injecting it into the alphabetically-first parameter, so the collision is general, not incidental.

Impact

  • Cache poisoning / confusion. On a shared cache (caching is enabled by default; the Cloudflare Workers deployment uses the shared caches.default, and a Node HTTP instance shares one in-process LRU across all clients), an attacker primes a colliding entry so that another client's genuinely different query receives the attacker-chosen response for the same portal.
  • Integrity of results. Victims receive data for a query they did not make (wrong dataset list, wrong record set), undermining trust in tool output.
  • Chains with indirect prompt injection (advisory #07). The attacker's colliding request can be one whose upstream response surfaces an attacker-controlled dataset (with malicious notes/title); the victim's benign query then serves that poisoned content to the model — delivering prompt injection via the cache, without the victim ever querying the malicious dataset.

Confidentiality impact is low (same-portal public data); the primary damage is integrity. AC:H reflects the need for caching to be enabled and a shared instance plus priming before the victim's request populates the entry.

Proof of concept

poc/cache-collision-poc.mjs primes a single-param request and shows a victim's distinct two-param request being served the attacker-primed entry:

attacker canonical : q=budget&rows=10
victim   canonical : q=budget&rows=10
same cache key      : true
victim served from cache: true
victim RECEIVED    : RESULT_FOR({"q":"budget&rows=10"})
victim EXPECTED    : RESULT_FOR({"q":"budget","rows":10})

Remediation

  • Build the cache key from an unambiguous, injection-proof encoding: hash a structured, canonical JSON (with typed values) or percent-encode/escape each key and value before joining, and use a separator that cannot appear in the encoded fields. Include a type tag so {a:{...}} (object) and {a:"..."} (string) never coincide.
  • Consider partitioning the cache per client/tenant on shared deployments so one client cannot influence another's entries.

Credited to Gal3m, mrostamipoor.

Questions

Is CKAN MCP Server 0.4.111 affected by CVE-2026-73846?

Yes. Everything below 0.4.112 uses the ambiguous key. Version 0.4.112 is the fixed release.

Does this need user interaction or credentials?

No privileges or interaction are needed. The attack is rated high complexity because caching must be on, the instance shared, and the attacker must populate the entry before the victim asks.

Can it lead to prompt injection?

The advisory says yes: an attacker-primed entry can carry a dataset with malicious notes or title text, which the victim's model then receives from the cache.

Is it exploited in the wild?

No source reports it, and it is not in CISA's KEV catalog.

References

How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. The analysis is written by an AI model from the sources listed above and checked by automated rules before it is published. Check versions against the vendor's advisory before you act. Methodology

More Other MCP servers and tools vulnerabilities

All Other MCP servers and tools entries