Skip to content

← Actionable
High, CVSS 8.8amended

Agentic-Flow: OS Command Injection in agentic-flow MCP server tools via unsanitized tool-parameter interpolation into execSync

CVE-2026-58195GHSA-vcv2-r9jh-99m5

What to do

Vendor fix available. Upgrade each affected package to the fixed version on its release line (agentic-flow 2.0.14), redeploy, then verify what is actually installed.

This page has no inventory attached, so it cannot say whether you are affected. A vendor fix is not proof that your deployment is fixed.

Affected packages

Sources

Severity and exploitation
Exploitation
No confirmed exploitation recorded. Patch Next marks exploitation only from CISA KEV.
CVSS
8.8 · CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
EPSS
  • CVE-2026-58195: 0.56% estimated exploitation activity in the next 30 days; percentile 46.78 (FIRST EPSS, 2026-11-03). This is a model estimate, not proof of exploitation or customer exposure.
Source description

As published by the source; long descriptions are shortened.

Summary agentic-flow versions <= 2.0.13 MCP server tools interpolated attacker-influenceable tool parameters (e.g. agent, task, name, language, agentdb arguments) directly into shell command strings passed to execSync(). A malicious value reaching any of the affected MCP tools could break out of the surrounding double-quoted argument and execute arbitrary OS commands with the privileges of the user running the MCP server. This was a partial-fix gap: prior commit 6a06854 (#158) fixed CWE-78 elsewhere in the project but missed the MCP server files entirely. Impact Any MCP tool argument that the AI agent treats as data but the implementation interpolates into a shell command string becomes a command-injection vector. In MCP deployments where untrusted content (web pages, files, third-party tool output) is processed by the agent, this is reachable without direct attacker access to the host. The HTTP/SSE transports (http-sse.ts, http-streaming-updated.ts) expose the same sinks without…

Dates and revisions
Published by the source
Last modified by the source
Source last checked
  1. Revision 2 · amended ·

    Amended from ghsa record GHSA-vcv2-r9jh-99m5

  2. Revision 1 · created ·

    Published from osv record GHSA-vcv2-r9jh-99m5

Agent brief

Preview the exact text before you copy it. Commands are read-only suggestions; review them before running anything.

# Patch Next advisory brief: CVE-2026-58195

Advisory: Agentic-Flow: OS Command Injection in agentic-flow MCP server tools via unsanitized tool-parameter interpolation into execSync
IDs: CVE-2026-58195, GHSA-vcv2-r9jh-99m5
Record: https://patchnext.com/advisories/cve-2026-58195 (revision 2, source checked 26 Oct 2026, 12:56 UTC)
Inventory: none attached. This brief comes from a public page and does not say whether any deployment is affected.
Severity: High (CVSS 8.8)
Exploitation: no confirmed exploitation recorded. Patch Next confirms exploitation only from CISA KEV.
Vendor response: Vendor fix available; fixed versions by package: agentic-flow 2.0.14. A vendor fix does not mean a deployment is fixed.

## Affected components
- npm agentic-flow: affected <= 2.0.13; fixed in 2.0.14

## Suggested inspection (read-only)
- `npm ls agentic-flow --all`: lists every installed copy and version, including transitive ones. Run in the project root after `npm ci`.

## Supported action
Upgrade each affected component to a fixed version on its release line. For a transitive dependency, upgrade the parent package or add an override or constraint, then regenerate the lockfile. Redeploy every environment that ran an affected version.

## Required regression checks
- Run the test suite and a production build.
- Exercise the features that depend on agentic-flow.
- Repeat the inspection and confirm that only fixed versions remain installed.

## Rollback considerations
- Keep the previous lockfile and deployment artifact. Rolling back reinstates the vulnerable version, so apply any documented mitigation while you fix forward.

## Unresolved questions
- Which deployments run an affected version?
- Exploitation status can change. Check again before lowering the priority.
- Mark the work resolved only after the fixed version is verified in production.

## Sources
- Verified: https://osv.dev/vulnerability/GHSA-vcv2-r9jh-99m5 (OSV record GHSA-vcv2-r9jh-99m5 lists affected ranges: npm agentic-flow >=0 <2.0.14 (fixed))
- Verified: https://github.com/advisories/GHSA-vcv2-r9jh-99m5 (GitHub-reviewed advisory GHSA-vcv2-r9jh-99m5 lists affected ranges: npm agentic-flow >=0 <=2.0.13)

Commands are suggestions: review each one before running it.

Loading voting…