Vulnerability high
CVSS
high
8.2/10

CVE-2026-97662: A Crafted Git Ref Turns the AWS Security Agent MCP Server's Diff Scan Into a File Write Outside the Workspace (CVSS 8.2)

CVE-2026-97662 is a high-severity security issue (CVSS 8.2) in awslabs.security-agent-mcp-server, a MCP server. Affected: >=0.1.1 <0.2.0.

Is awslabs.security-agent-mcp-server running on your developers' machines? Anomity finds every device with this MCP server installed, shows the version, and can block it by policy. Detect this across your developers' devices with Anomity →

Key facts

ID
CVE-2026-97662
Aliases
GHSA-8g28-rj54-p5p2
Severity
high
CVSS score
8.2
Attack type
Other
Component
awslabs.security-agent-mcp-server · MCP server
Package
awslabs.security-agent-mcp-server
Known exploited
No known exploitation
Published
Last verified

What is CVE-2026-97662?

AWS Security Bulletin 2026-121-AWS (1 October 2026, with GHSA-8g28-rj54-p5p2; NVD published the same day) covers an argument injection in awslabs.security-agent-mcp-server, the MCP server in the awslabs/mcp repository that lets AI assistants run AWS Security Agent scans over local source code. The diff scan operation passed a caller-influenced base reference into git so that a value starting with a dash was read as a command-line option rather than a revision, and the server's workspace-confinement check did not cover that argument. An actor who can influence the reference, for example through content in the repository being scanned, can create, overwrite or truncate any file the server process can write, including shell startup files, SSH authorized_keys and credential files, with content partly controlled by the scanned repository, which can lead to code execution. The operation reports that no diff was found, so the write leaves no signal for the operator. AWS scores it CVSS 3.1 8.2 (AV:L/AC:L/PR:N/UI:R/S:C/C:N/I:H/A:H) and CVSS 4.0 6.9. The fix rejects empty or dash-prefixed refs; it shipped in 0.2.0 on PyPI on 26 August, five weeks before the bulletin. Credited to Mario Guzman (yud4s).

Affected versions

AffectedFixed in
>=0.1.1 <0.2.0No fixed version listed

Am I affected by CVE-2026-97662?

You are affected if you run awslabs.security-agent-mcp-server >=0.1.1 <0.2.0.

How do I fix CVE-2026-97662?

Upgrade awslabs.security-agent-mcp-server to 0.2.0 or later, and check `uvx`/`pipx` caches and pinned MCP configs, which can keep launching an old version after the package is updated. AWS lists no workaround: until upgraded, run diff scans only on trusted repositories and run the server as a low-privilege user in an isolated environment. Because the vulnerable write produces no error, hosts that diff-scanned untrusted repositories on an affected version should have ~/.bashrc, ~/.zshrc, ~/.profile, ~/.ssh/authorized_keys and credential files checked for unexpected changes. Patch forks and derivative code that copied the diff-scan handler.

How do I find every machine running awslabs.security-agent-mcp-server?

Anomity inventories the AI agents, MCP servers, IDE extensions and skills on each developer device, so you can see which machines run awslabs.security-agent-mcp-server and which version, then enforce a policy on it.

References