GHSA-647h-p824-99w7: @grackle ai/mcp @grackle-ai/mcp Has A Workspace Authorization Vulnerability

HIGH
CWE-284
Published
Advisory Summary

GHSA-647h-p824-99w7 is a HIGH @grackle-ai/mcp has a workspace authorization vulnerability (CWE-284: Improper Access Control) affecting @grackle ai/mcp libraries in the npm ecosystem. The issue involves @grackle-ai/mcp has a workspace authorization bypass in its knowledge_search mcp tool. Remediation is available by upgrading affected packages to version 0.70.2.

GHSA-647h-p824-99w7 at a Glance

CVE Identifier N/A
GHSA Identifier GHSA-647h-p824-99w7
Severity HIGH
CVSS v3.1 Base Score N/A
CWE Classification CWE-284: Improper Access Control
Affected Product @grackle ai/mcp
Package Ecosystem npm
Published Date
Last Updated

How to Fix GHSA-647h-p824-99w7

To remediate this vulnerability, upgrade all affected @grackle ai/mcp dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

@grackle-ai/mcp fixed: 0.70.2
npm install @grackle-ai/mcp@0.70.2
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

npm ls @grackle-ai/mcp

How to Check if You Are Affected

To determine whether your Node.js application is affected by GHSA-647h-p824-99w7, inspect your project dependencies using npm:

npm ls @grackle-ai/mcp

Analyze the terminal output to locate any version of @grackle ai/mcp in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.70.2), your application is affected.

Note: The npm ls @grackle-ai/mcp command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-284: Improper Access Control, where the product does not restrict or incorrectly restricts access to a resource from an unauthorized actor. In @grackle ai/mcp, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### Impact The `knowledge_search` and `knowledge_get_node` MCP tools are included in `SCOPED_TOOLS` (visible to scoped agents) but their handlers do not receive `authContext` and do not enforce workspace scoping. A scoped agent in Workspace A can supply an arbitrary `workspaceId` parameter to search or retrieve knowledge graph nodes from Workspace B, bypassing workspace isolation boundaries. This is a **cross-workspace data leakage** vulnerability affecting any deployment where multiple workspaces contain sensitive knowledge graph data and scoped agents are used. **Affected code:** - `packages/mcp/src/tools/knowledge.ts:146-169` (knowledge_search handler) - `packages/mcp/src/tools/knowledge.ts:244-283` (knowledge_get_node handler) - `packages/mcp/src/tool-scoping.ts:11` (both tools listed in SCOPED_TOOLS) **Contrast with correct implementation:** `knowledge_create_node` (same file, lines 334-357) properly receives `authContext` and overrides the user-supplied `workspaceId` for scoped callers. ### Design Note Cross-workspace knowledge sharing is a legitimate future feature — agents working across different repos may need to collaborate and share knowledge. However, this access should be **opt-in with explicit grants**, not an implicit bypass. The immediate fix locks scoped agents to their own workspace. A future design could introduce: - Workspace-level "share knowledge with" settings - A `cross_workspace` scope on scoped tokens - Explicit `workspaceIds` (plural) in the auth context ### Patches **Fix:** Add `authContext` parameter to `knowledge_search` and `knowledge_get_node` handlers and enforce workspace scoping, matching the pattern in `knowledge_create_node`: ```typescript const resolvedWorkspaceId = authContext?.type === "scoped" ? authContext.workspaceId ?? "" : workspaceId ?? ""; ``` When cross-workspace collaboration is designed, this check can be relaxed intentionally with proper access controls. ### Workarounds Do not use scoped agent tokens in multi-workspace deployments until patched. Alternatively, remove `knowledge_search` and `knowledge_get_node` from the `SCOPED_TOOLS` set in `tool-scoping.ts`. ### References - CWE-284: Improper Access Control - File: `packages/mcp/src/tools/knowledge.ts` - File: `packages/mcp/src/tool-scoping.ts`

GHSA-647h-p824-99w7 Affected @grackle ai/mcp Versions

1 component(s)
Fixed Versions:
0.70.2
Product / Package Ecosystem Affected Versions Fixed Version
@grackle-ai/mcp
npm
< 0.70.2
0.70.2

References

Frequently Asked Questions

What is GHSA-647h-p824-99w7?
GHSA-647h-p824-99w7 is a security vulnerability in @grackle ai/mcp involving @grackle-ai/mcp has a workspace authorization bypass in its knowledge_search MCP tool under CWE-284: Improper Access Control.
Which @grackle ai/mcp versions are affected?
Affected versions include releases prior to 0.70.2 across affected packages: @grackle-ai/mcp.
What version fixes GHSA-647h-p824-99w7?
Upgrading to 0.70.2 (or the latest patched release for your respective branch) resolves the vulnerability.
Is @grackle-ai/mcp affected?
Yes, @grackle-ai/mcp is affected in releases prior to 0.70.2. Upgrade your dependency to 0.70.2 or later.
What CWE is associated with GHSA-647h-p824-99w7?
GHSA-647h-p824-99w7 is classified under CWE-284: Improper Access Control (The product does not restrict or incorrectly restricts access to a resource from an unauthorized actor.).
How can I check npm dependencies for GHSA-647h-p824-99w7?
Run the dependency tree command: 'npm ls @grackle-ai/mcp'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-647h-p824-99w7",
  "modified" : "2026-03-25T17:23:11Z",
  "published" : "2026-03-25T17:23:11Z",
  "aliases" : [ ],
  "summary" : "@grackle-ai/mcp has a workspace authorization bypass in its knowledge_search MCP tool",
  "details" : "### Impact\n\nThe `knowledge_search` and `knowledge_get_node` MCP tools are included in `SCOPED_TOOLS` (visible to scoped agents) but their handlers do not receive `authContext` and do not enforce workspace scoping. A scoped agent in Workspace A can supply an arbitrary `workspaceId` parameter to search or retrieve knowledge graph nodes from Workspace B, bypassing workspace isolation boundaries.\n\nThis is a **cross-workspace data leakage** vulnerability affecting any deployment where multiple workspaces contain sensitive knowledge graph data and scoped agents are used.\n\n**Affected code:**\n- `packages/mcp/src/tools/knowledge.ts:146-169` (knowledge_search handler)\n- `packages/mcp/src/tools/knowledge.ts:244-283` (knowledge_get_node handler)\n- `packages/mcp/src/tool-scoping.ts:11` (both tools listed in SCOPED_TOOLS)\n\n**Contrast with correct implementation:** `knowledge_create_node` (same file, lines 334-357) properly receives `authContext` and overrides the user-supplied `workspaceId` for scoped callers.\n\n### Design Note\n\nCross-workspace knowledge sharing is a legitimate future feature — agents working across different repos may need to collaborate and share knowledge. However, this access should be **opt-in with explicit grants**, not an implicit bypass. The immediate fix locks scoped agents to their own workspace. A future design could introduce:\n- Workspace-level \"share knowledge with\" settings\n- A `cross_workspace` scope on scoped tokens\n- Explicit `workspaceIds` (plural) in the auth context\n\n### Patches\n\n**Fix:** Add `authContext` parameter to `knowledge_search` and `knowledge_get_node` handlers and enforce workspace scoping, matching the pattern in `knowledge_create_node`:\n```typescript\nconst resolvedWorkspaceId =\n  authContext?.type === \"scoped\"\n    ? authContext.workspaceId ?? \"\"\n    : workspaceId ?? \"\";\n```\n\nWhen cross-workspace collaboration is designed, this check can be relaxed intentionally with proper access controls.\n\n### Workarounds\n\nDo not use scoped agent tokens in multi-workspace deployments until patched. Alternatively, remove `knowledge_search` and `knowledge_get_node` from the `SCOPED_TOOLS` set in `tool-scoping.ts`.\n\n### References\n\n- CWE-284: Improper Access Control\n- File: `packages/mcp/src/tools/knowledge.ts`\n- File: `packages/mcp/src/tool-scoping.ts`",
  "severity" : [ {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:N/SC:L/SI:L/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "@grackle-ai/mcp"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "0.70.2"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 0.70.1"
    }
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/nick-pape/grackle/security/advisories/GHSA-647h-p824-99w7"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/nick-pape/grackle"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-284" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-03-25T17:23:11Z",
    "nvd_published_at" : null
  }
}