CVE-2026-5058 aws-mcp-server Command Injection Remote Code Execution Vulnerability

Critical 9.8 Published Updated

Remote attackers can execute arbitrary code on aws-mcp-server via command injection in allowed commands handling without authentication.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
None listed

What is CVE-2026-5058?

CVE-2026-5058 is a critical command injection vulnerability in aws-mcp-server, published on 11 Apr 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

aws-mcp-server 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-27968.

Weakness: CWE-78

Which versions are affected by CVE-2026-5058?

How do I fix CVE-2026-5058?

No fix has been published for CVE-2026-5058 yet. Limit exposure of the affected software until one is available.

Upgrade, and pass arguments to programs as a list instead of through a shell. More about Command injection.

Is CVE-2026-5058 being exploited?

There is no known exploitation of CVE-2026-5058 in the wild and no public exploit code.

Sources

Also known as GHSA-fjwc-hc62-p8h9.

Is CVE-2026-5058 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free