{"id":"CVE-2026-73846","aliases":["EUVD-2026-58728","GHSA-78x9-fhhx-v2g6"],"status":"published","title":"CKAN MCP Server: Cache-key canonicalization collision enables cache confusion / poisoning","description":"CKAN MCP Server is a tool for querying CKAN open data portals. Prior to 0.4.112, canonicalizeParams in src/utils/cache.ts serializes request parameters with unescaped ampersand, equals-sign, and vertical-bar delimiters, allowing different logical parameter sets used by buildCacheKey to collide and an attacker to prime a shared cache with a response for a victim's distinct query. This issue is fixed in version 0.4.112.","severity":{"version":"3.1","score":6.5,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:H/A:N","level":"medium","assessor":"cna","from":"cve"},"epss":{"day":"2026-11-11","score":0.00194,"percentile":0.09246,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-345","CWE-436"],"published":"2026-08-14T16:56:23Z","modified":"2026-10-28T02:31:03Z","fixes":[{"ecosystem":"npm","package":"@aborruso/ckan-mcp-server","fixed_in":["0.4.112"],"sources":["ghsa","osv"]}],"affected":[{"source":"ghsa","ecosystem":"npm","package":"@aborruso/ckan-mcp-server","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.4.112"}]}]},{"source":"osv","ecosystem":"npm","package":"@aborruso/ckan-mcp-server","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"0.4.112"}]}]}],"products":[{"vendor":"ondata","product":"ckan-mcp-server"}],"references":[{"url":"https://github.com/ondata/ckan-mcp-server/security/advisories/GHSA-78x9-fhhx-v2g6","tags":["x_refsource_CONFIRM","exploit","advisory","web"]},{"url":"https://github.com/ondata/ckan-mcp-server/commit/8e1522f9bbfa1f3b21550f17887f60f133e24151","tags":["x_refsource_MISC","fix","web"]},{"url":"https://github.com/ondata/ckan-mcp-server/releases/tag/v0.4.112","tags":["x_refsource_MISC","web"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-73846","tags":["advisory"]},{"url":"https://github.com/advisories/GHSA-78x9-fhhx-v2g6"},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/73xxx/CVE-2026-73846.json","tags":["advisory"]},{"url":"https://github.com/ondata/ckan-mcp-server","tags":["package"]}],"sources":{"cve":[{"id":"CVE-2026-73846","title":"CKAN MCP Server: Cache-key canonicalization collision enables cache confusion / poisoning","description":"CKAN MCP Server is a tool for querying CKAN open data portals. Prior to 0.4.112, canonicalizeParams in src/utils/cache.ts serializes request parameters with unescaped ampersand, equals-sign, and vertical-bar delimiters, allowing different logical parameter sets used by buildCacheKey to collide and an attacker to prime a shared cache with a response for a victim's distinct query. This issue is fixed in version 0.4.112.","status":"published","published":"2026-08-14T16:56:23.752Z","modified":"2026-08-17T19:32:41.058Z","cvss":[{"version":"3.1","score":6.5,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:H/A:N","level":"medium","assessor":"cna"}],"cwes":["CWE-345","CWE-436"],"updated_at":"2026-11-02T13:43:33.766176Z"}],"euvd":[{"id":"EUVD-2026-58728","description":"CKAN MCP Server is a tool for querying CKAN open data portals. Prior to 0.4.112, canonicalizeParams in src/utils/cache.ts serializes request parameters with unescaped ampersand, equals-sign, and vertical-bar delimiters, allowing different logical parameter sets used by buildCacheKey to collide and an attacker to prime a shared cache with a response for a victim's distinct query. This issue is fixed in version 0.4.112.","status":"published","published":"2026-08-14T16:56:23Z","modified":"2026-08-17T19:32:41Z","cvss":[{"version":"3.1","score":6.5,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:H/A:N","level":"medium"}],"updated_at":"2026-11-02T18:01:48.395378Z"}],"ghsa":[{"id":"GHSA-78x9-fhhx-v2g6","title":"CKAN MCP Server: Cache-key canonicalization collision enables cache confusion / poisoning","description":"## Summary\n\nThe response cache derives its key from an ambiguous string serialization of the request parameters. `canonicalizeParams` joins sorted `${key}=${value}` pairs with `\u0026` and does not escape `\u0026`, `=`, 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.\n\n## Affected code\n\n```js\n// src/utils/cache.ts\nexport function canonicalizeParams(params) {\n  const keys = Object.keys(params).sort();\n  const pairs = [];\n  for (const key of keys) {\n    const value = params[key];\n    if (value === undefined || value === null) continue;\n    const serialized = typeof value === \"object\" ? JSON.stringify(value) : String(value);\n    pairs.push(`${key}=${serialized}`);        // value not escaped\n  }\n  return pairs.join(\"\u0026\");                        // '\u0026' delimiter, injectable\n}\n\nexport async function buildCacheKey(serverUrl, action, params) {\n  const raw = `${serverUrl}|${action}|${canonicalizeParams(params)}`;  // '|' also unescaped\n  return sha1Hex(raw);\n}\n```\n\nConfirmed collisions (identical key):\n\n- `{ q: \"budget\", rows: 10 }`  ≡  `{ q: \"budget\u0026rows=10\" }`  → both canonicalize to `q=budget\u0026rows=10`\n- `{ filters: { a: \"b\" } }`  ≡  `{ filters: '{\"a\":\"b\"}' }`  → both canonicalize to `filters={\"a\":\"b\"}` (object-vs-string ambiguity)\n\nAn attacker can reproduce **any** target canonical string by injecting it into the alphabetically-first parameter, so the collision is general, not incidental.\n\n## Impact\n\n- **Cache poisoning / confusion.** On a shared cache (caching is enabled by\n  default; the Cloudflare Workers deployment uses the shared `caches.default`, and\n  a Node HTTP instance shares one in-process LRU across all clients), an attacker\n  primes a colliding entry so that another client's genuinely different query\n  receives the attacker-chosen response for the same portal.\n- **Integrity of results.** Victims receive data for a query they did not make\n  (wrong dataset list, wrong record set), undermining trust in tool output.\n- **Chains with indirect prompt injection (advisory #07).** The attacker's\n  colliding request can be one whose upstream response surfaces an\n  attacker-controlled dataset (with malicious `notes`/`title`); the victim's\n  benign query then serves that poisoned content to the model — delivering prompt\n  injection via the cache, without the victim ever querying the malicious dataset.\n\nConfidentiality impact is low (same-portal public data); the primary damage is\nintegrity. `AC:H` reflects the need for caching to be enabled and a shared\ninstance plus priming before the victim's request populates the entry.\n\n## Proof of concept\n\n`poc/cache-collision-poc.mjs` primes a single-param request and shows a victim's\ndistinct two-param request being served the attacker-primed entry:\n\n```\nattacker canonical : q=budget\u0026rows=10\nvictim   canonical : q=budget\u0026rows=10\nsame cache key      : true\nvictim served from cache: true\nvictim RECEIVED    : RESULT_FOR({\"q\":\"budget\u0026rows=10\"})\nvictim EXPECTED    : RESULT_FOR({\"q\":\"budget\",\"rows\":10})\n```\n\n## Remediation\n\n- Build the cache key from an unambiguous, injection-proof encoding: hash a\n  structured, canonical JSON (with typed values) or percent-encode/escape each key\n  and value before joining, and use a separator that cannot appear in the encoded\n  fields. Include a type tag so `{a:{...}}` (object) and `{a:\"...\"}` (string)\n  never coincide.\n- Consider partitioning the cache per client/tenant on shared deployments so one\n  client cannot influence another's entries.","status":"published","published":"2026-09-03T14:49:22Z","modified":"2026-09-03T14:49:23Z","cvss":[{"version":"3.1","score":6.5,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:H/A:N","level":"medium"}],"cwes":["CWE-345","CWE-436"],"updated_at":"2026-11-02T14:41:11.621873Z"}],"nvd":[{"id":"CVE-2026-73846","description":"CKAN MCP Server is a tool for querying CKAN open data portals. Prior to 0.4.112, canonicalizeParams in src/utils/cache.ts serializes request parameters with unescaped ampersand, equals-sign, and vertical-bar delimiters, allowing different logical parameter sets used by buildCacheKey to collide and an attacker to prime a shared cache with a response for a victim's distinct query. This issue is fixed in version 0.4.112.","status":"published","published":"2026-08-14T17:20:36.953Z","modified":"2026-09-18T20:09:01.757Z","cvss":[{"version":"3.1","score":6.5,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:H/A:N","level":"medium","assessor":"secondary"}],"cwes":["CWE-345","CWE-436"],"updated_at":"2026-11-02T14:12:37.557758Z"}],"osv":[{"id":"CVE-2026-73846","title":"CKAN MCP Server: Cache-key canonicalization collision enables cache confusion / poisoning","description":"CKAN MCP Server is a tool for querying CKAN open data portals. Prior to 0.4.112, canonicalizeParams in src/utils/cache.ts serializes request parameters with unescaped ampersand, equals-sign, and vertical-bar delimiters, allowing different logical parameter sets used by buildCacheKey to collide and an attacker to prime a shared cache with a response for a victim's distinct query. This issue is fixed in version 0.4.112.","status":"published","published":"2026-08-14T16:56:23.752Z","modified":"2026-10-28T02:31:03.467467682Z","cvss":[{"version":"3.1","score":6.5,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:H/A:N","level":"medium"}],"cwes":["CWE-345","CWE-436"],"updated_at":"2026-11-02T15:45:16.365946Z"},{"id":"GHSA-78x9-fhhx-v2g6","title":"CKAN MCP Server: Cache-key canonicalization collision enables cache confusion / poisoning","description":"## Summary\n\nThe response cache derives its key from an ambiguous string serialization of the request parameters. `canonicalizeParams` joins sorted `${key}=${value}` pairs with `\u0026` and does not escape `\u0026`, `=`, 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.\n\n## Affected code\n\n```js\n// src/utils/cache.ts\nexport function canonicalizeParams(params) {\n  const keys = Object.keys(params).sort();\n  const pairs = [];\n  for (const key of keys) {\n    const value = params[key];\n    if (value === undefined || value === null) continue;\n    const serialized = typeof value === \"object\" ? JSON.stringify(value) : String(value);\n    pairs.push(`${key}=${serialized}`);        // value not escaped\n  }\n  return pairs.join(\"\u0026\");                        // '\u0026' delimiter, injectable\n}\n\nexport async function buildCacheKey(serverUrl, action, params) {\n  const raw = `${serverUrl}|${action}|${canonicalizeParams(params)}`;  // '|' also unescaped\n  return sha1Hex(raw);\n}\n```\n\nConfirmed collisions (identical key):\n\n- `{ q: \"budget\", rows: 10 }`  ≡  `{ q: \"budget\u0026rows=10\" }`  → both canonicalize to `q=budget\u0026rows=10`\n- `{ filters: { a: \"b\" } }`  ≡  `{ filters: '{\"a\":\"b\"}' }`  → both canonicalize to `filters={\"a\":\"b\"}` (object-vs-string ambiguity)\n\nAn attacker can reproduce **any** target canonical string by injecting it into the alphabetically-first parameter, so the collision is general, not incidental.\n\n## Impact\n\n- **Cache poisoning / confusion.** On a shared cache (caching is enabled by\n  default; the Cloudflare Workers deployment uses the shared `caches.default`, and\n  a Node HTTP instance shares one in-process LRU across all clients), an attacker\n  primes a colliding entry so that another client's genuinely different query\n  receives the attacker-chosen response for the same portal.\n- **Integrity of results.** Victims receive data for a query they did not make\n  (wrong dataset list, wrong record set), undermining trust in tool output.\n- **Chains with indirect prompt injection (advisory #07).** The attacker's\n  colliding request can be one whose upstream response surfaces an\n  attacker-controlled dataset (with malicious `notes`/`title`); the victim's\n  benign query then serves that poisoned content to the model — delivering prompt\n  injection via the cache, without the victim ever querying the malicious dataset.\n\nConfidentiality impact is low (same-portal public data); the primary damage is\nintegrity. `AC:H` reflects the need for caching to be enabled and a shared\ninstance plus priming before the victim's request populates the entry.\n\n## Proof of concept\n\n`poc/cache-collision-poc.mjs` primes a single-param request and shows a victim's\ndistinct two-param request being served the attacker-primed entry:\n\n```\nattacker canonical : q=budget\u0026rows=10\nvictim   canonical : q=budget\u0026rows=10\nsame cache key      : true\nvictim served from cache: true\nvictim RECEIVED    : RESULT_FOR({\"q\":\"budget\u0026rows=10\"})\nvictim EXPECTED    : RESULT_FOR({\"q\":\"budget\",\"rows\":10})\n```\n\n## Remediation\n\n- Build the cache key from an unambiguous, injection-proof encoding: hash a\n  structured, canonical JSON (with typed values) or percent-encode/escape each key\n  and value before joining, and use a separator that cannot appear in the encoded\n  fields. Include a type tag so `{a:{...}}` (object) and `{a:\"...\"}` (string)\n  never coincide.\n- Consider partitioning the cache per client/tenant on shared deployments so one\n  client cannot influence another's entries.","status":"published","published":"2026-09-03T14:49:22Z","modified":"2026-09-03T15:00:09.620554195Z","cvss":[{"version":"3.1","score":6.5,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:H/A:N","level":"medium"}],"cwes":["CWE-345","CWE-436"],"updated_at":"2026-11-02T15:46:40.657155Z"}]}}
