CVE-2026-76894 / GHSA-vqff-r82h-9crc affects the inline DataStore table UI shipped by the MCP server (@aborruso/ckan-mcp-server), served as an MCP Apps resource from src/resources/datastore-table-ui.ts. The fix commit 3b827af (tag v0.4.112) modifies that file's inlined HTML script. Two separate defects are present, matching CWE-940 (improper verification of source of a communication channel) and CWE-345 (insufficient verification of data authenticity):
-
Outbound: the two messaging primitives mcpReq (request) and mcpNot (notification) both called window.parent.postMessage({...}, ''), so the UI's JSON-RPC traffic (including the ui/initialize request/response and tool-result handling) was delivered to whatever origin embedded the frame. The patch introduces target() (returning the pinned _hostOrigin) and replaces '' with target() in both functions — the exact lines removed/added prove these two functions held the wildcard-target bug.
-
Inbound: the anonymous window.addEventListener('message', ...) handler read event.data and, with no event.origin check, (a) resolved/rejected any pending MCP request whose id matched — allowing an attacker frame to spoof the ui/initialize handshake — and (b) passed attacker-supplied fields/records to initTable(), rendering fabricated rows/links (display spoofing, HTML-escaped so not XSS). The patch adds if(_hostOrigin===null||event.origin!==_hostOrigin) return; before the data-bearing path, i.e. the validation the vulnerable handler lacked. The handler is an unnamed inline callback, so it has no stable profiler name (it would surface as '(anonymous)'); the named functions that carry the bug and were modified are mcpReq and mcpNot.
The other files touched in the same commit (src/utils/http.ts makeCkanRequest, src/worker.ts catch-all, src/tools/group.ts / organization.ts renderers) belong to different advisories (GHSA-6f9w error reflection/SSRF read channel, GHSA-c499 prompt-injection containment) and are NOT part of this postMessage-origin CVE, so they are excluded. The mitigation helper target() was ADDED by the fix and is therefore not a vulnerable function.