CVE-2026-5058: Command Injection RCE in aws-mcp-server
CVE-2026-5058 is an unauthenticated command injection vulnerability in aws-mcp-server. The flaw exists in the handling of the allowed commands list, where a user-supplied string is not properly validated before being used in a system call. Because attacker-controlled input can reach OS command execution logic without sufficient sanitization, a remote attacker can trigger arbitrary command execution on affected installations. Successful exploitation results in code execution in the security context of the MCP server process. The issue is tracked by the Zero Day Initiative as ZDI-26-246 and was previously tracked as ZDI-CAN-27968.
Impact, mitigation & remediation
What it means and what to do now: patch path, interim mitigations, and the assume-compromise checklist.
Impact
What an attacker gets, and what they’ve been doing with it.
Successful exploitation allows a remote, unauthenticated attacker to execute arbitrary operating system commands in the context of the aws-mcp-server process. Given the reported CVSS vector AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H, the expected impact includes full compromise of confidentiality, integrity, and availability of the affected host within the privileges of the server process. This can enable host takeover, data theft, tampering, service disruption, and use of the compromised server as a pivot point for further intrusion.
Mitigation
If you can’t patch tonight, do this now.
Until a patch is available, do not expose aws-mcp-server to untrusted networks. Restrict access to trusted clients only using network segmentation, firewall rules, reverse-proxy ACLs, or bind the service only to localhost where feasible. Disable or avoid deployments that permit remote network access if operationally possible. Run the service with the minimum necessary OS and cloud privileges, isolate it in a hardened container or sandbox, and monitor for anomalous command execution from the server process. Because exploitation is unauthenticated, reducing reachability is the most important immediate mitigation.
Remediation
Patch, then assume compromise.
Apply a vendor fix when one becomes available. The underlying issue must be corrected by enforcing strict validation and sanitization of user-controlled input associated with the allowed commands list before any system call is made, and by avoiding shell-mediated command execution where possible. If maintaining the software internally, refactor command execution to use parameterized process invocation with a fixed command/argument allowlist rather than passing user-influenced strings to the shell. The provided content does not identify a patched version.
Exploits
No public exploits tracked yet. Mallory keeps watching.
Frequently asked questions
- Is CVE-2026-5058 exploited in the wild?
- As of Sep 25, 2026, Mallory has no reports of CVE-2026-5058 being exploited in the wild. It is not listed in CISA KEV.
- Is there a public exploit for CVE-2026-5058?
- As of Sep 25, 2026, Mallory has found no public exploit for CVE-2026-5058.
- Is there a patch for CVE-2026-5058?
- Apply a vendor fix when one becomes available. The underlying issue must be corrected by enforcing strict validation and sanitization of user-controlled input associated with the allowed commands list before any system call is made, and by avoiding shell-mediated command execution where possible.
- How severe is CVE-2026-5058?
- CVE-2026-5058 has a CVSS v3 score of 9.8 (Critical) and an EPSS score of 2.4% (85th percentile) as of Sep 25, 2026.
Recent activity
8 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.