---
id: "CVE-2026-5059"
kind: "vulnerability"
aliases: ["CVE-2026-5059", "GHSA-fgmx-xfp3-w28p"]
title: "aws-mcp has a Command Injection Remote Code Execution Vulnerability"
severity: "critical"
cvss: 9.8
epss: 0.01908
exploited: false
status: "open"
category: "ai-tooling"
products: [{"name": "aws-mcp", "fixed": [], "affected": "<= 1.7.0", "ecosystem": "pypi"}]
ecosystems: ["pypi"]
tags: ["ai-tooling", "aws", "aws-mcp", "cwe-78", "mcp", "python", "self-hosted"]
not_affected_if: ["fixed-version", "not-installed"]
published_at: "2026-04-11T01:16:18+00:00"
first_seen_at: "2026-10-27T15:23:43+00:00"
updated_at: "2026-10-27T15:32:59+00:00"
sources: [{"source": "ghsa", "url": "https://github.com/advisories/GHSA-fgmx-xfp3-w28p", "first_seen_at": "2026-10-27T15:23:43+00:00"}, {"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-5059", "first_seen_at": "2026-10-27T15:32:59+00:00"}]
---

# aws-mcp has a Command Injection Remote Code Execution Vulnerability

The aws-mcp MCP server fails to validate a user-supplied string in its allowed-commands handling before passing it to a system call. A remote attacker without credentials can execute arbitrary code in the context of the MCP server.

_Summary, check and fix written by a model from the sources; labelled as such._

## Affected

- pypi:aws-mcp affected <= 1.7.0 fixed ?

## How to check

- Run `pip show aws-mcp` and check whether the installed version is `1.7.0` or lower
- Check whether the MCP server is reachable from untrusted networks, since the sources say no authentication is required

## Fix

- Upgrade `aws-mcp` to a version later than `1.7.0`; the fixed version is unknown from the sources
- Until patched, restrict network access to the MCP server and do not expose it to the internet

## Timeline

- 2026-10-27T15:23:43+00:00 ghsa https://github.com/advisories/GHSA-fgmx-xfp3-w28p
- 2026-10-27T15:32:59+00:00 nvd https://nvd.nist.gov/vuln/detail/CVE-2026-5059

## From the sources

aws-mcp-server AWS CLI Command Injection Remote Code Execution Vulnerability. This vulnerability allows remote attackers to execute arbitrary code on affected installations of aws-mcp-server. Authentication is not required to exploit this vulnerability.

The specific flaw exists within the handling of the allowed commands list. The issue results from the lack of proper validation of a user-supplied string before using it to execute a system call. An attacker can leverage this vulnerability to execute code in the context of the MCP server. Was ZDI-CAN-27969.

---

_Free to read at a human pace. An API with keys and an MCP server are in preparation; early access: hello@infrastack.ai_
