CVEReports
CVEReports

Automated vulnerability intelligence platform. Comprehensive reports for high-severity CVEs generated by AI.

Product

  • Home
  • Sitemap
  • RSS Feed

Company

  • About
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 CVEReports. All rights reserved.

Made with love by Amit Schendel & Alon Barad



GHSA-VCV2-R9JH-99M5

GHSA-VCV2-R9JH-99M5: OS Command Injection in agentic-flow MCP Server Tools

Alon Barad
Alon Barad
Software Engineer

Jun 19, 2026·5 min read·11 visits

Executive Summary (TL;DR)

Unsanitized parameters passed to agentic-flow MCP tools are executed directly in system shells via Node.js execSync, enabling remote attackers to run arbitrary OS commands when an AI agent processes malicious external content.

An OS command injection vulnerability (CWE-78) exists in agentic-flow versions 2.0.13 and prior. The package's Model Context Protocol (MCP) server tools directly interpolate user-controlled parameters into shell command strings executed via child_process.execSync without validation. If an AI agent processes untrusted external input and forwards it as parameters to any affected tool, an attacker can break out of the shell argument quotes and execute arbitrary OS commands on the host machine.

Vulnerability Overview

The vulnerability, tracked as GHSA-vcv2-r9jh-99m5, is an OS command injection flaw (CWE-78) in the agentic-flow npm package at versions 2.0.13 and earlier.

This library exposes Model Context Protocol (MCP) servers and tools designed to facilitate direct actions by artificial intelligence (AI) agents, such as executing local system commands, interacting with databases, and editing codebases.

The attack surface is highly significant because LLM-driven agents are designed to autonomously read and parse untrusted data sources (such as public GitHub repositories, scraped web pages, or incoming emails) and pass summarized arguments to these tools.

If an attacker can manipulate the input that an AI agent parses, they can trigger command execution on the host machine hosting the MCP server. This bypasses the typical boundaries established for AI agent sandboxing and compromises the underlying operating system.

Root Cause Analysis

The root cause of this vulnerability lies in the unsafe use of Node.js's native child_process.execSync() function paired with template string interpolation.

When execSync(commandString) is called in Node.js, the runtime spawns a shell (such as /bin/sh on Unix systems or cmd.exe on Windows) to parse and run the complete string. Because the codebase directly interpolated user-controlled variables into the command string within double quotes, system shells treated metacharacters as active shell directives.

An attacker can supply payloads containing double quotes to break out of the string literal, followed by shell control characters such as semicolons, logical AND operators, or pipes. This terminates the legitimate command and causes the shell to execute arbitrary appended commands under the security context of the parent Node.js process.

Code Analysis

Below is a comparison of the vulnerable and patched implementations within the MCP server codebase.

Vulnerable Code Path

In src/mcp/standalone-stdio.ts, parameters were concatenated dynamically without sanitization:

// Unsafe shell interpolation inside agentic_flow_agent tool
let cmd = `npx --yes agentic-flow --agent \"${agent}\" --task \"${task}\"`;
const result = execSync(cmd, { encoding: 'utf-8' });

Patched Implementation

The remediated code replaces the shell execution wrapper with execFileSync and disables the shell interpreter globally:

// Safe direct process execution
const NPX_EXEC_OPTS = { shell: false as const };
 
const result = execFileSync(
  'npx',
  ['--yes', 'agentic-flow', '--agent', agent, '--task', task],
  { ...NPX_EXEC_OPTS, encoding: 'utf-8' }
);

Using execFileSync with shell: false passes arguments directly to the OS kernel via the execve system call. The operating system treats each element of the arguments array as a literal string payload, preventing shell parsing engines from executing special control characters.

Exploitation & Attack Vectors

Exploitation of this vulnerability relies on feeding an LLM agent structured malicious input that is subsequently passed down to the MCP server's active tools.

Attack Vector Details

An attacker can place a weaponized payload inside a public repository, web page, or PDF document that they know an agent is scheduled to read. For example, the payload might read: x\"; touch /tmp/INJECTED; id > /tmp/rce.txt; echo \".

When the agent processes this text, it invokes the agentic_flow_agent tool and transmits the payload as the task argument. The resulting string is passed directly to the shell as:

npx --yes agentic-flow --agent \"coder\" --task \"x\"; touch /tmp/INJECTED; id > /tmp/rce.txt; echo \"\"

The shell splits this command sequence on the semicolon, successfully running the initial command, followed by the execution of touch /tmp/INJECTED and id > /tmp/rce.txt on the host operating system.

Impact Assessment

This vulnerability presents a high-risk security threat, receiving a CVSS v3.1 score of 8.8.

Because MCP servers typically run locally on developers' machines or inside centralized internal deployment environments, successful exploitation yields arbitrary shell command execution with the permissions of the underlying system user. An attacker can perform actions such as exfiltrating environment variables, reading private codebases, stealing SSH and API keys, or establishing persistent reverse shells.

The impact is compounded because the attack vector bypasses traditional network defense systems, using the AI agent as an interactive proxy to perform the exploit delivery phase.

Remediation & Detection

To secure affected systems, immediate software updates and robust monitoring are required.

Security Regression Tests

The development team implemented automated regression security tests to block future occurrences of this flaw. The test suite, located in tests/security/cwe-78-mcp-execsync.test.ts, parses the codebase to verify that execSync is never imported or invoked without explicit inclusion in an exempt list:

import { describe, it, expect } from 'vitest';
import { readFileSync, readdirSync, statSync } from 'node:fs';
import { join, resolve } from 'node:path';
 
const MCP_ROOT = resolve(__dirname, '../../src/mcp');
const EXEMPT_FILES = new Set<string>([
  'fastmcp/tools/hooks/pretrain.ts'
]);

Organizations should also deploy static analysis configurations (such as ESLint rules) to restrict the use of raw shell execution sinks across all Node.js development projects.

Fix Analysis (1)

Technical Appendix

CVSS Score
8.8/ 10
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H

Affected Systems

agentic-flow <= 2.0.13ruflo < 3.12.4claude-flow < 3.12.4@claude-flow/cli < 3.12.4

Affected Versions Detail

Product
Affected Versions
Fixed Version
agentic-flow
ruvnet
<= 2.0.132.0.14
AttributeDetail
CWE IDCWE-78
Attack VectorNetwork (Unauthenticated) / User Interaction Required (AI processing untrusted input)
CVSS Severity8.8 (High)
Exploit StatusPoC Available / Verified
KEV StatusNot Listed

MITRE ATT&CK Mapping

T1203Exploitation for Client Execution
Execution
T1059Command and Scripting Interpreter
Execution
CWE-78
OS Command Injection

Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')

References & Sources

  • [1]GHSA-VCV2-R9JH-99M5 Advisory
  • [2]Vulnerability Issue Discussion
  • [3]Remediation Pull Request

Attack Flow Diagram

Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.
Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.

More Reports

•2 days ago•CVE-2026-58263
7.2

CVE-2026-58263: Mutation Cross-Site Scripting (mXSS) in Jodit Editor clean-html Sanitizer

CVE-2026-58263 is a high-severity Mutation Cross-Site Scripting (mXSS) vulnerability affecting Jodit Editor prior to version 4.12.28. The flaw exists in Jodit's built-in clean-html sanitizer plugin, which fails to securely parse and sanitize nested elements containing foreign namespaces like MathML and SVG. Attackers can bypass sanitization by smuggling malicious payload elements inside rawtext container tags like style inside a MathML node, leading to DOM mutation and unauthenticated arbitrary script execution in the context of the user's browser session.

Amit Schendel
Amit Schendel
10 views•6 min read
•2 days ago•CVE-2026-65841
5.3

CVE-2026-65841: Client-Side Cross-Site Scripting (XSS) via Foreign Namespace Sanitization Bypass in Jodit Editor

Jodit Editor versions prior to 4.13.6 are vulnerable to client-side Cross-Site Scripting (XSS). The clean-html plugin's sanitization routine performs case-sensitive lookups against uppercase-only element blacklists. When processing XML-based foreign namespaces such as SVG or MathML, DOM engines preserve the lowercase format of tags. Because Jodit's denyTags check fails to normalize tag casing, malicious script blocks nested inside foreign namespace elements completely bypass validation and serialize directly into the editor output.

Amit Schendel
Amit Schendel
7 views•6 min read
•2 days ago•CVE-2026-53510
8.1

CVE-2026-53510: Remote Code Execution via Dynamic WSDL Parsing in Savon Ruby SOAP Client

A critical code injection vulnerability exists in Savon, a widely used SOAP client library for Ruby, prior to version 2.17.2. The vulnerability resides within the Savon::Model.all_operations module, where operation names fetched from a target Web Services Description Language (WSDL) document are dynamically evaluated via module_eval without sanitization. An attacker capable of manipulating the target WSDL document (e.g., through Man-in-the-Middle attacks, DNS hijacking, or Server-Side Request Forgery) can execute arbitrary Ruby code in the context of the parent application process.

Alon Barad
Alon Barad
12 views•6 min read
•2 days ago•CVE-2026-53466
6.5

CVE-2026-53466: Integer Conversion Overflow in ImageMagick XCF Decoder

An integer conversion overflow vulnerability exists in the XCF decoder of ImageMagick before version 6.9.13-51 and 7.1.2-26. The issue arises from mixed-type arithmetic that promotes calculation results to floating-point representations, causing an undefined cast back to integer. Under optimizing compilers, this undefined behavior results in bounds checks being bypassed, allowing out-of-bounds heap reads.

Amit Schendel
Amit Schendel
6 views•6 min read
•2 days ago•CVE-2026-53599
7.5

CVE-2026-53599: Authenticated Remote Code Execution in REDAXO CMS via Mediapool File Upload Validation Bypass

An authenticated file upload validation bypass vulnerability exists in the REDAXO CMS Mediapool addon in versions 5.18.2 through 5.21.0. Under permissive web server configurations, this allows authenticated users with media upload privileges to achieve remote code execution via multi-segment extension file uploads.

Alon Barad
Alon Barad
9 views•7 min read
•2 days ago•CVE-2026-52887
10.0

CVE-2026-52887: Critical SQL Injection and Remote Code Execution in NocoBase

A critical SQL injection vulnerability exists in the @nocobase/plugin-notification-in-app-message plugin of NocoBase prior to version 2.0.61. The flaw is caused by direct string interpolation of user-controlled input into a Sequelize.literal() query, allowing authenticated users to execute stacked PostgreSQL queries and achieve remote code execution on the underlying database server.

Amit Schendel
Amit Schendel
14 views•7 min read