Skip to main content
Vulnerability Database/CVE-2026-97662

CVE-2026-97662: AWS Security Agent Path Traversal Flaw

CVE-2026-97662 is a path traversal vulnerability in AWS security-agent-mcp-server that enables attackers to manipulate files outside intended directories. This article covers technical details, affected versions, and remediation.

Published:

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

CVE-2026-97662 Overview

CVE-2026-97662 is an argument injection vulnerability in the AWS security-agent-mcp-server package before version 0.2.0. The flaw resides in the diff scan operation, which fails to properly validate the reference value supplied by callers. A context-dependent attacker can leverage a crafted reference value to create, overwrite, or truncate arbitrary files on the host outside the intended workspace directory. The issue is tracked under CWE-73: External Control of File Name or Path. AWS has published remediation guidance in AWS Security Bulletin 2026-121 and released a fixed build via the awslabs.security-agent-mcp-server 0.2.0 PyPI package.

Critical Impact

Attackers who can influence the diff scan reference input can write to arbitrary files on the host, enabling tampering, destruction of data, or follow-on code execution via overwritten configuration or startup files.

Affected Products

  • AWS awslabs.security-agent-mcp-server versions prior to 0.2.0
  • Model Context Protocol (MCP) server deployments that expose the diff scan operation
  • Developer workstations and CI/CD runners hosting the vulnerable package

Discovery Timeline

  • 2026-10-01 - CVE-2026-97662 published to NVD
  • 2026-10-01 - Last updated in NVD database
  • AWS Security Bulletin 2026-121 - AWS publishes advisory and releases security-agent-mcp-server version 0.2.0

Technical Details for CVE-2026-97662

Vulnerability Analysis

The security-agent-mcp-server package exposes a diff scan operation that accepts a reference value from the caller. The server passes that value into a downstream command or file-handling routine without sufficient sanitization. Because the reference is treated as part of a command argument list, an attacker can inject additional flags or path components. The outcome is that write operations escape the intended workspace directory and target arbitrary filesystem locations under the privileges of the server process.

Root Cause

The root cause is improper neutralization of argument-controlling characters in a user-influenced reference value, consistent with CWE-73. The diff scan logic treats the reference as trusted path or option data. It does not enforce a canonicalized path confined to the workspace, nor does it reject argument-like tokens such as leading dashes or path traversal sequences. As a result, option flags that redirect output or path strings that resolve outside the workspace are honored by the underlying operation.

Attack Vector

Exploitation requires a context-dependent threat actor who can supply the reference value to the diff scan operation. This typically means a local user, a repository with attacker-controlled metadata, or an upstream agent that forwards untrusted input into the MCP server. User interaction is required, consistent with the CVSS vector. Successful exploitation lets the attacker create a new file, overwrite an existing file, or truncate it to zero bytes outside the configured workspace directory. There is no direct confidentiality impact, but integrity and availability of host files are affected.

No verified proof-of-concept code is published. Refer to the AWS Security Bulletin 2026-121 for vendor-authored technical context.

Detection Methods for CVE-2026-97662

Indicators of Compromise

  • Files created, truncated, or modified by the security-agent-mcp-server process outside its configured workspace directory
  • Diff scan invocations containing suspicious reference values with leading dashes, shell metacharacters, or .. traversal sequences
  • Unexpected changes to shell profiles, cron files, systemd units, or SSH authorized_keys on hosts running the MCP server

Detection Strategies

  • Audit application logs from awslabs.security-agent-mcp-server for diff scan calls and capture the reference argument for review
  • Enable filesystem auditing (for example, Linux auditd PATH rules) on directories outside the workspace that the MCP service should never touch
  • Alert on process lineage where the MCP server spawns writes to sensitive system paths such as /etc, /root, or user home directories

Monitoring Recommendations

  • Inventory hosts and container images that ship awslabs.security-agent-mcp-server and record the installed version
  • Forward MCP server stdout, stderr, and audit logs to a centralized log platform for correlation with filesystem change events
  • Baseline normal diff scan reference values and alert on inputs that deviate from expected branch, tag, or commit formats

How to Mitigate CVE-2026-97662

Immediate Actions Required

  • Upgrade awslabs.security-agent-mcp-server to version 0.2.0 or later on every host and container image
  • Restrict the privileges of the account running the MCP server so writes outside the workspace are blocked at the OS layer
  • Review recent diff scan invocations and filesystem changes for signs of exploitation prior to patching

Patch Information

AWS has published the fix in awslabs.security-agent-mcp-server version 0.2.0, available from the PyPI release page. Deployment guidance and vendor acknowledgment are documented in AWS Security Bulletin 2026-121. Rebuild downstream container images and redeploy any agent harnesses that embed the package.

Workarounds

  • Disable or gate the diff scan operation until the upgrade to 0.2.0 is completed across the fleet
  • Run the MCP server inside a sandbox such as a container with a read-only root filesystem and a bind-mounted workspace
  • Validate and canonicalize any caller-supplied reference values upstream, rejecting inputs that contain path traversal or argument-flag characters
bash
# Upgrade to the fixed release from PyPI
pip install --upgrade "awslabs.security-agent-mcp-server>=0.2.0"

# Verify the installed version
pip show awslabs.security-agent-mcp-server | grep -i version

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.