GHSA-6JX8-RCJX-VMWF
Vulnerability from github – Published: 2025-07-15 17:06 – Updated: 2025-07-15 17:06The MCP Server at https://github.com/Sunwood-ai-labs/github-kanban-mcp-server/ is written in a way that is vulnerable to command injection vulnerability attacks as part of some of its MCP Server tool definition and implementation.
Vulnerable tool
The MCP Server exposes the tool add_comment which relies on Node.js child process API exec to execute the GitHub (gh) command, is an unsafe and vulnerable API if concatenated with untrusted user input.
Data flows from the tool definition here which takes in args.issue_number and calls handleAddComment() in this definitino that uses exec in an insecure way.
Vulnerable line of code: https://github.com/Sunwood-ai-labs/github-kanban-mcp-server/blob/main/src/handlers/comment-handlers.ts#L8-L23
export async function handleAddComment(args: {
repo: string;
issue_number: string;
body: string;
state?: 'open' | 'closed';
}): Promise<ToolResponse> {
const tempFile = 'comment_body.md';
try {
// ステータスの変更が指定されている場合は先に処理
if (args.state) {
try {
const command = args.state === 'closed' ? 'close' : 'reopen';
await execAsync(
`gh issue ${command} ${args.issue_number} --repo ${args.repo}`
);
Exploitation Proof of Concept
When LLMs are tricked through prompt injection (and other techniques and attack vectors) to call the tool with input that uses special shell characters such as ; rm -rf /tmp;# (be careful actually executing this payload) and other payload variations, the full command-line text will be interepted by the shell and result in other commands except of ps executing on the host running the MCP Server.
Reference example from prior security research on this topic, demonstrating how a similarly vulnerable MCP Server connected to Cursor is abused with prompt injection to bypass the developer's intended command:

Impact
User initiated and remote command injection on a running MCP Server.
Recommendation
- Don't use
exec. UseexecFileinstead, which pins the command and provides the arguments as array elements. - If the user input is not a command-line flag, use the
--notation to terminate command and command-line flag, and indicate that the text after the--double dash notation is benign value.
References and Prior work
- Exploiting MCP Servers Vulnerable to Command Injection
- Liran's Node.js Secure Coding: Defending Against Command Injection Vulnerabilities
Credit
Disclosed by Liran Tal
{
"affected": [
{
"package": {
"ecosystem": "npm",
"name": "@sunwood-ai-labs/github-kanban-mcp-server"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"last_affected": "0.3.0"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2025-53818"
],
"database_specific": {
"cwe_ids": [
"CWE-78"
],
"github_reviewed": true,
"github_reviewed_at": "2025-07-15T17:06:32Z",
"nvd_published_at": "2025-07-14T21:15:27Z",
"severity": "HIGH"
},
"details": "The MCP Server at https://github.com/Sunwood-ai-labs/github-kanban-mcp-server/ is written in a way that is vulnerable to command injection vulnerability attacks as part of some of its MCP Server tool definition and implementation.\n\n## Vulnerable tool\n\nThe MCP Server exposes the tool `add_comment` which relies on Node.js child process API `exec` to execute the GitHub (`gh`) command, is an unsafe and vulnerable API if concatenated with untrusted user input.\n\nData flows from the tool definition [here](https://github.com/Sunwood-ai-labs/github-kanban-mcp-server/blob/main/src/handlers/tool-handlers.ts#L79) which takes in `args.issue_number` and calls `handleAddComment()` in [this definitino](https://github.com/Sunwood-ai-labs/github-kanban-mcp-server/blob/main/src/handlers/comment-handlers.ts#L8) that uses `exec` in an insecure way.\n\nVulnerable line of code: https://github.com/Sunwood-ai-labs/github-kanban-mcp-server/blob/main/src/handlers/comment-handlers.ts#L8-L23\n\n```js\nexport async function handleAddComment(args: {\n repo: string;\n issue_number: string;\n body: string;\n state?: \u0027open\u0027 | \u0027closed\u0027;\n}): Promise\u003cToolResponse\u003e {\n const tempFile = \u0027comment_body.md\u0027;\n\n try {\n // \u30b9\u30c6\u30fc\u30bf\u30b9\u306e\u5909\u66f4\u304c\u6307\u5b9a\u3055\u308c\u3066\u3044\u308b\u5834\u5408\u306f\u5148\u306b\u51e6\u7406\n if (args.state) {\n try {\n const command = args.state === \u0027closed\u0027 ? \u0027close\u0027 : \u0027reopen\u0027;\n await execAsync(\n `gh issue ${command} ${args.issue_number} --repo ${args.repo}`\n );\n```\n\n## Exploitation Proof of Concept\n\nWhen LLMs are tricked through prompt injection (and other techniques and attack vectors) to call the tool with input that uses special shell characters such as `; rm -rf /tmp;#` (be careful actually executing this payload) and other payload variations, the full command-line text will be interepted by the shell and result in other commands except of `ps` executing on the host running the MCP Server.\n\nReference example from prior security research on this topic, demonstrating how a similarly vulnerable MCP Server connected to Cursor is abused with prompt injection to bypass the developer\u0027s intended command:\n\n\n\n## Impact\n\nUser initiated and remote command injection on a running MCP Server.\n\n## Recommendation\n\n- Don\u0027t use `exec`. Use `execFile` instead, which pins the command and provides the arguments as array elements.\n- If the user input is not a command-line flag, use the `--` notation to terminate command and command-line flag, and indicate that the text after the `--` double dash notation is benign value.\n\n## References and Prior work\n\n1. [Exploiting MCP Servers Vulnerable to Command Injection](https://snyk.io/articles/exploiting-mcp-servers-vulnerable-to-command-injection/)\n2. Liran\u0027s [Node.js Secure Coding: Defending Against Command Injection Vulnerabilities](https://www.nodejs-security.com/book/command-injection)\n\n## Credit\n\nDisclosed by [Liran Tal](https://lirantal.com)",
"id": "GHSA-6jx8-rcjx-vmwf",
"modified": "2025-07-15T17:06:32Z",
"published": "2025-07-15T17:06:32Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/Sunwood-ai-labs/github-kanban-mcp-server/security/advisories/GHSA-6jx8-rcjx-vmwf"
},
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2025-53818"
},
{
"type": "PACKAGE",
"url": "https://github.com/Sunwood-ai-labs/github-kanban-mcp-server"
},
{
"type": "WEB",
"url": "https://github.com/Sunwood-ai-labs/github-kanban-mcp-server/blob/main/src/handlers/comment-handlers.ts#L8"
},
{
"type": "WEB",
"url": "https://github.com/Sunwood-ai-labs/github-kanban-mcp-server/blob/main/src/handlers/tool-handlers.ts#L79"
},
{
"type": "WEB",
"url": "https://github.com/Sunwood-ai-labs/github-kanban-mcp-server/blob/v0.4.0/src/handlers/comment-handlers.ts#L8-L23"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:P/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X",
"type": "CVSS_V4"
}
],
"summary": "GitHub Kanban MCP Server vulnerable to Command Injection"
}
Sightings
| Author | Source | Type | Date |
|---|
Nomenclature
- Seen: The vulnerability was mentioned, discussed, or observed by the user.
- Confirmed: The vulnerability has been validated from an analyst's perspective.
- Published Proof of Concept: A public proof of concept is available for this vulnerability.
- Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
- Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
- Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
- Not confirmed: The user expressed doubt about the validity of the vulnerability.
- Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.