Skip to content
Ai Sdlc Issues 1970

Ai Sdlc Issues 1970

github.com • October 28, 2026

The MCP server tools check_issue and check_pr_status in the ai-sdlc plugin are vulnerable to OS command injection (CWE-78). The repo parameter is interpolated directly into execSync() shell commands without sanitization, allowing arbitrary command execution on the host.

CVSS 3.1: 9.8 Critical — AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Vulnerability Details

ai-sdlc-plugin/mcp-server/src/tools/check-issue.ts

ai-sdlc-plugin/mcp-server/src/tools/check-pr-status.ts

Both tools accept a repo parameter of type z.string().optional() and interpolate it directly into execSync() calls without any input validation or shell escaping.

Attack 1: Shell command separator

Resulting shell command:

The ; separates commands. The first part ( gh issue view ... ) runs and fails/succeeds, then curl runs with the output of whoami in the URL.

Attack 2: Subshell expansion

Resulting shell command:

The $() causes the shell to execute cat /etc/passwd > /tmp/pwned before the gh command runs.

Attack 3: Pipe and redirect

This establishes a reverse shell to the attacker's server.

Replace execSync string interpolation with execFileSync using argument arrays:

execFileSync with argument arrays never invokes a shell, so shell metacharacters in repo are treated as literal strings.

Additionally, add input validation:

An attacker who can influence MCP tool calls (via prompt injection, a compromised AI agent, or a malicious MCP client) can:

Execute arbitrary OS commands with the privileges of the Node.js process

Exfiltrate sensitive data (source code, environment variables, credentials, SSH keys)

Read/write/delete files on the host system

Establish reverse shells for persistent access

Access the gh CLI's authenticated GitHub session for lateral movement

Note: The issueNumber and prNumber parameters use z.number() which provides type-level protection against injection. Only the repo parameter (type z.string() ) is vulnerable.

CWE-78: Improper Neutralization of Special Elements used in an OS Command

Node.js child_process security

github-actions added status:needs-clarification on Oct 23, 2026

deefactorial closed this as completed in #1982 on Oct 23, 2026