Mar 18, 2026·5 min read·82 visits
A path traversal vulnerability in the AWS API MCP Server allows attackers to bypass workdir restrictions and read arbitrary local files. Upgrading to version 1.3.9 remediates the issue.
CVE-2026-4270 is a medium-severity vulnerability in the AWS API MCP Server (awslabs.aws-api-mcp-server) that allows attackers to bypass local file system restrictions. Due to improper protection of alternate paths, an attacker can read arbitrary local files within the context of the Model Context Protocol (MCP) client application.
The AWS API MCP Server provides an interface for AI models and assistants to interact with AWS services using the Model Context Protocol (MCP). To maintain security boundaries, the server implements no-access and workdir features designed to restrict the AI model's access to the local file system. The workdir feature restricts file operations to a designated directory, which defaults to /tmp/aws-api-mcp/workdir when unspecified.
CVE-2026-4270 is a vulnerability categorized under CWE-424 (Improper Protection of Alternate Path) that breaks these security boundaries. The flaw allows an attacker to bypass intended directory restrictions and access arbitrary files on the host filesystem. This access occurs within the execution context and permission boundaries of the MCP client application running the server.
The vulnerability specifically impacts versions 0.2.14 through 1.3.8 of the awslabs.aws-api-mcp-server package. The issue manifests when the server processes file path arguments during command execution, failing to properly validate whether the resolved paths remain within the authorized workspace.
The root cause of CVE-2026-4270 lies in the inadequate validation and normalization of file paths within the MCP server's security controls. The application attempts to confine file operations to the designated workdir but fails to account for alternate path representations. This logic flaw permits inputs that resolve to locations outside the intended directory structure.
Path resolution logic, specifically within the get_abs_path function located in the application's file handler modules, converts user-supplied relative paths into absolute paths. However, this function lacks a subsequent verification step to ensure the resulting absolute path remains a strict subdirectory of the authorized workdir.
Attackers exploit this oversight by supplying inputs containing path traversal sequences, such as ../, or by referencing symbolic links that point to external directories. Furthermore, if the server accepts an absolute path directly without converting and validating it against the workdir base path, the directory restriction is entirely bypassed.
The vulnerability centers on the get_abs_path implementation used to sanitize inputs before passing them to the operating system's filesystem APIs. In the vulnerable versions, the function relies on standard path joining techniques without enforcing a strict directory jail boundary.
A vulnerable implementation typical of this bug class joins the base directory and the user-provided path, then resolves it. If the user provides a path like ../../etc/passwd, the resolution functions process the traversal characters, resulting in a path outside the intended root environment.
The patched version addresses this by implementing strict path normalization and boundary checking. After resolving the absolute path of the user input, the software verifies that the target path begins with the absolute path of the designated workdir.
# Vulnerable Pattern
def get_abs_path(workdir, user_path):
# Fails to check if the final path is within workdir
return os.path.abspath(os.path.join(workdir, user_path))
# Patched Pattern
def get_abs_path(workdir, user_path):
base = os.path.abspath(workdir)
target = os.path.abspath(os.path.join(base, user_path))
# Strict boundary enforcement
if not target.startswith(base + os.sep):
raise ValueError("Path access denied: outside working directory")
return targetExploitation of CVE-2026-4270 requires a local attack vector where the adversary can influence the input provided to the MCP client. This influence typically occurs via a maliciously crafted prompt or a compromised model context that instructs the AI assistant to perform specific file operations. The attack complexity remains low, requiring no specialized privileges on the host operating system.
To execute the attack, the adversary crafts a prompt that forces the MCP server to evaluate a command requiring a file path argument. The attacker supplies a path containing directory traversal sequences, such as ../../../, or an absolute path pointing to sensitive local files that exist outside the authorized workdir.
User interaction is required for successful exploitation. The user must interact with the AI assistant in a manner that triggers the evaluation of the malicious prompt. Once triggered, the MCP server resolves the traversed path and returns the contents of the requested file back to the model or user interface.
The successful exploitation of this vulnerability results in a high impact on confidentiality. An attacker gains the ability to read arbitrary files on the local filesystem, constrained only by the operating system permissions granted to the user running the MCP client application.
This read access exposes highly sensitive information stored on the host machine. Attackers can target configuration files, SSH keys, environment variable files, and specifically AWS credentials stored in standard locations such as ~/.aws/credentials. Exposing these credentials can lead to broader cloud environment compromise.
While the vulnerability allows data exfiltration, it does not impact the integrity or availability of the system. The CVSS v3.1 vector is evaluated as CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N, reflecting the local attack vector, the requirement for user interaction, and the severe confidentiality impact. The EPSS score remains low at 0.00013, indicating limited real-world exploitation observed to date.
The vendor remediated CVE-2026-4270 in version 1.3.9 of the awslabs.aws-api-mcp-server package, released on February 12, 2026. Security teams must ensure that all deployments using the affected package are updated to this version or later to eliminate the vulnerability.
System administrators and developers apply the patch by upgrading the Python package via their package manager. The recommended command is pip install --upgrade awslabs.aws-api-mcp-server. Organizations should also verify their dependencies in requirements.txt or Pipfile to prevent regressions in automated deployment pipelines.
In environments where immediate patching is not feasible, administrators enforce strict operating system-level controls. Running the MCP client within an isolated container, a virtual machine, or a highly restricted user account minimizes the impact of a successful path traversal attack by limiting the available sensitive files on the host system.
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N| Product | Affected Versions | Fixed Version |
|---|---|---|
awslabs.aws-api-mcp-server AWS | 0.2.14 <= Version < 1.3.9 | 1.3.9 |
| Attribute | Detail |
|---|---|
| CWE ID | CWE-424 |
| Attack Vector | Local |
| CVSS Base Score | 5.5 |
| EPSS Percentile | 1.76% |
| Impact | High Confidentiality (Arbitrary File Read) |
| Exploit Status | Unexploited / No Public PoC |
| CISA KEV | Not Listed |
Improper Protection of Alternate Path
CVE-2026-62361 (GHSA-xgjr-7j9q-2h4r) is an authenticated SQL injection and authorization bypass vulnerability in listmonk, an open-source, self-hosted newsletter and mailing list manager written in Go. In versions prior to 6.2.0, the subscriber export endpoint (GET /api/subscribers/export) directly interpolates user-supplied SQL filter expressions into a PostgreSQL query without invoking the table allowlist validation function (validateQueryTables). Consequently, authenticated users possessing the subscribers:sql_query and subscribers:get_all permissions can bypass relational access controls, execute arbitrary subqueries against restricted tables such as users and settings, and modify database state via writable Common Table Expressions (CTEs).
CVE-2026-28385 (GHSA-3gq2-x4qg-p4g6) is a Server-Side Request Forgery (SSRF) vulnerability in Canonical LXD versions 4.12 through 6.9. An authenticated user possessing the can_create_images entitlement can force the LXD daemon to execute arbitrary outbound HTTP and HTTPS requests via the /1.0/images API endpoint. Due to the absence of egress destination validation, an attacker can probe host loopback services, RFC 1918 private network segments, and cloud Instance Metadata Services (IMDS) from the network position of the privileged LXD daemon.
Canonical LXD and LXC Incus contain an arbitrary file write vulnerability (CWE-73 / CWE-59) in the `/1.0/instances/<name>/exec` REST API endpoint. When an instance is unpacked from an image archive, top-level symbolic links are extracted directly onto the host filesystem within the instance storage directory. If a crafted image includes a symbolic link named `exec-output` pointing to an arbitrary host path, invoking the execution endpoint with `record-output: true` causes the privileged host daemon to follow the symlink and write command output files directly to the target host directory. An authenticated attacker with permissions to import images and execute commands can exploit this flaw to write controlled content to sensitive host directories such as `/etc/cron.d`, resulting in arbitrary code execution on the host as `root`.
CVE-2026-48749 (tracked as GHSA-vghh-5rfx-xhq8 for LXD and GHSA-2q3f-q5pq-g8wv for Incus) is a critical container escape vulnerability in the Canonical LXD and Linux Containers Incus system container managers. By importing a specially crafted container image archive containing duplicate tar member headers, an authenticated attacker can replace the instance rootfs directory with a symbolic link pointing to the underlying host root filesystem. When performing file operations on a stopped container, the privileged forkfile helper binary resolves the symbolic link without confinement and chroots directly into the host filesystem, granting arbitrary root-level file read and write access.
GHSA-fmc8-p6q7-75cc (associated with CVE-2026-48755) is a critical argument injection vulnerability in Canonical LXD (github.com/canonical/lxd). The vulnerability occurs during instance and storage volume backup operations when processing the user-supplied compression_algorithm configuration parameter. While LXD validates the primary executable token against an allowlist of supported compression binaries, it fails to sanitize or restrict subsequent tokens parsed via shellquote.Split. These additional arguments are passed directly to exec.Command. An authenticated attacker with privileges to trigger backups can inject command-line flags for utilities like zstd to read staged files from a container filesystem and write them to arbitrary paths on the underlying host filesystem, such as /etc/cron.d/, achieving root-level arbitrary code execution on the host.
A critical path traversal vulnerability caused by improper input validation (CWE-20) exists in the direct image download handler of Canonical LXD and Linux Containers Incus. When an authenticated user requests an image import using the URL source type, the daemon reads the image fingerprint from an untrusted HTTP response header (`Incus-Image-Hash` or `LXD-Image-Hash`) without validating that it conforms to a SHA-256 format. This unvalidated string is concatenated directly into a filesystem path via `filepath.Join` prior to file creation and cryptographic verification, allowing directory traversal sequences to write arbitrary files on the host filesystem as root.