A booby-trapped `mcp.json` is the new `.git/hooks` — clone the repo, lose the cloud account
Amazon Q's Language Server auto-loaded Model Context Protocol configuration from a workspace file (.amazonq/mcp.json) the instant a developer opened the folder in VS Code, JetBrains, Eclipse, or Visual Studio. No consent prompt, no workspace-trust check, no signature verification. The MCP processes that got spawned inherited the developer's full process environment — AWS access keys, STS tokens, GitHub PATs, SSH agent sockets, kubeconfig — and could exfiltrate them or pivot directly into the cloud account. Affected: Language Servers for AWS < 1.65.0 across all platforms; Amazon's own bulletin pushes customers to 1.69.0.
Vendor scored this HIGH (7.8) with AV:L/UI:R. That's defensible but slightly understates reality: 'user interaction' here is *opening a repo*, which is the literal job description of a developer using an AI coding assistant. The CVSS vector treats it like a local exploit, but the attack vector is effectively any public Git repo, malicious npm dependency, or repo embedded in a tutorial. We agree with HIGH — not CRITICAL, because the chain still requires the dev to clone-and-open and the patch auto-deploys when the IDE restarts on a non-air-gapped network.
4 steps from start to impact.
Plant .amazonq/mcp.json in a public/internal repo
.amazonq/mcp.json file at the workspace root. The file declares an MCP server whose command is bash -c '<exfil payload>' or any binary already on the dev box (curl, node, python). No exotic tooling required — Wiz's PoC is a few-line JSON.- Ability to publish or contribute to a repo a target dev will clone
- Repo has to actually get opened by an Amazon Q user
- Some shops mandate code review before cloning third-party repos (rare in practice)
.amazonq/mcp.json but no tool ships a default rule yet.Victim opens the folder in an Amazon Q-enabled IDE
.amazonq/mcp.json during activation. Vulnerable versions skip the workspace-trust check entirely.- Amazon Q extension installed and signed in
- Language Server version < 1.65.0
- Workspace opened (not just file-preview)
- VS Code Workspace Trust prompt is shown for the *folder* but does not gate the MCP load on vuln versions
- Some enterprises disable AI assistants for IP/legal reasons
MCP server auto-spawns with full env inheritance
command as a child of the IDE process. The child inherits every env var in the developer's session: AWS_ACCESS_KEY_ID, AWS_SESSION_TOKEN, AWS_PROFILE, GITHUB_TOKEN, NPM_TOKEN, SSH_AUTH_SOCK, KUBECONFIG. No sandbox, no seccomp, no env scrub.- Developer has live AWS creds in env or
~/.aws/credentials
- Devs using short-lived SSO/
aws sso logincreds limit the window - Hardware-bound keys (YubiKey, TPM-wrapped) cannot be exfiltrated as raw material
Exfiltrate creds and pivot to AWS control plane
~/.aws/credentials, env tokens, and SSH agent material, then POSTs to attacker C2. With long-lived IAM user keys or unrevoked STS tokens, attacker calls sts:GetCallerIdentity, enumerates with iam:ListAttachedUserPolicies, and pivots into S3/Secrets Manager/CodeBuild — often with AdministratorAccess because devs over-permission their own roles.- Stolen creds are still valid
- No CloudTrail-driven anomaly detection on source-IP change
- IAM Access Analyzer + GuardDuty
UnauthorizedAccess:IAMUser/AnomalousBehaviorwill flag a session token used from a new ASN within minutes - MFA-enforced STS reduces window to one IDE session
The supporting signals.
| In-the-wild exploitation | None reported. CISA ADP entry shows no known exploitation as of 2026-06-28. |
|---|---|
| Public PoC | Yes — Wiz Research write-up (Jun 26, 2026) includes the full mcp.json shape and exploitation walkthrough. |
| EPSS | 0.00118 (~0.12%) — low automated-scan/wormability signal, consistent with a social-delivery vuln. |
| KEV status | Not listed as of 2026-06-28. |
| CVSS vector | AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H — vendor framed as local with user interaction; we read 'UI:R' as *opening a repo*, which is functionally near-zero friction for the target population. |
| Affected versions | Language Servers for AWS < 1.65.0 across VS Code, JetBrains, Eclipse, Visual Studio. |
| Fixed version | 1.65.0 introduces a consent prompt before MCP load; AWS bulletin recommends 1.69.0. Auto-update happens on IDE restart unless egress is blocked. |
| Disclosure timeline | Reported by Wiz 2026-04-20, fixed 2026-05-12, public disclosure 2026-06-23 (CVE), Wiz blog 2026-06-26. |
| Researcher | Wiz Research (coordinated disclosure with AWS Security). |
| Exposure population | Amazon Q has >1M VS Code Marketplace installs; effective exposure is any developer who opens an untrusted repo. Treat the dev laptop fleet as the asset surface, not servers. |
noisgate verdict.
The decisive factor is role multiplier: the affected component runs on developer endpoints that hold long-lived cloud admin credentials, so a successful chain ends in AWS account compromise, not just a single workstation. Friction (clone-and-open social step, auto-updating client) keeps this off the CRITICAL tier, but the credential-theft-to-cloud-pivot outcome locks the floor at HIGH.
Why this verdict
- Role multiplier — developer endpoints are cloud-admin proxies: the chain ends in AWS credential theft, not a localhost compromise. In any org with >10 cloud devs, this is functionally a path to the cloud control plane → floor is HIGH.
- Friction — UI:R is real but cheap: the attacker still needs the victim to clone-and-open a repo. That's one social step, not zero, and that's the only thing keeping this off CRITICAL.
- Patch propagation is fast: Language Server auto-updates on IDE restart; most non-air-gapped fleets will be on ≥1.65.0 within a week of any restart, narrowing the exposure window organically.
- No KEV, low EPSS, no observed campaigns — we are not in active-exploitation territory; the upgrade pressure (KEV / mass scanning) is absent.
- Credential blast radius depends on IAM hygiene — orgs running short-lived SSO + MFA-enforced STS see the chain truncate at the IDE session; orgs with long-lived IAM user keys hit full account takeover.
Why not higher?
No active exploitation, no KEV listing, and the attack requires a target developer to actively clone and open a malicious repo in an Amazon Q-enabled IDE — that's a real, if low, friction point. CRITICAL is reserved for chains that fire without user choice or for components whose role guarantees fleet compromise on every install (hypervisors, DCs, kernel agents).
Why not lower?
Downgrading to MEDIUM would ignore the role multiplier: this lands on developer endpoints holding cloud admin credentials, with no env scrub and no sandbox on spawned MCP processes. A weaponized public PoC exists. Anything below HIGH undersells the credential-theft-to-cloud-pivot outcome.
What to do — in priority order.
- Force Language Server upgrade to ≥ 1.65.0 (AWS recommends 1.69.0) fleet-wide — Push via MDM (Jamf, Intune, Workspace ONE) by restarting IDEs or pinning the extension version through VS Code enterprise policies. Deploy within 30 days per noisgate mitigation SLA for HIGH — but given a public PoC, treat as 7 days.
- Block
.amazonq/mcp.jsonat the source-control gateway — Add a GitHub/GitLab pre-receive hook or Semgrep rule that rejects commits containing.amazonq/mcp.jsonunless on an allowlisted repo. Stops accidental introduction via internal forks within 30 days. - Move all developers to short-lived SSO credentials via
aws sso login/ IAM Identity Center — Eliminates long-livedAWS_ACCESS_KEY_ID/AWS_SECRET_ACCESS_KEYmaterial in dev env vars. STS session tokens with MFA and 1–4 hr TTL truncate the credential theft window. Rollout: 30 days. - GuardDuty + CloudTrail anomaly detection on dev IAM principals — Enable
UnauthorizedAccess:IAMUser/AnomalousBehaviorand source-IP/ASN anomaly rules with paging on dev admin roles. Catches use of stolen creds from attacker infra within minutes. Immediate. - Strip secrets from IDE child-process env via wrapper — On macOS/Linux, replace developer shell init so AWS/GitHub/NPM tokens load only into named subshells, not the IDE process tree. Defense in depth in case another extension repeats this mistake.
- VS Code Workspace Trust prompt — vulnerable Language Server versions ignore it for MCP config loading.
- EDR alone — IDE spawning bash/node/python looks identical to legitimate task runners; without env-egress correlation, EDR is blind.
- WAF / network IPS — this is client-side code execution out of a Git clone; perimeter controls don't see it.
- Disabling Amazon Q for a subset of devs — the same MCP pattern is supported by other AI assistants; this is a class of bug. Solve the env inheritance / consent problem, not the brand.
Crowdsourced verification payload.
Run on each developer workstation (Windows shown; mirror on macOS/Linux). Requires user-context only — no admin. Invoke: powershell -ExecutionPolicy Bypass -File Check-AmazonQLS.ps1. Exits 0 = PATCHED, 1 = VULNERABLE, 2 = UNKNOWN/not installed.
# Check-AmazonQLS.ps1
# noisgate verifier for CVE-2026-12957 (Language Servers for AWS < 1.65.0)
# Exit codes: 0 PATCHED, 1 VULNERABLE, 2 UNKNOWN
$ErrorActionPreference = 'SilentlyContinue'
$MinFixed = [version]'1.65.0'
$found = $false
$vulnerable = $false
# Candidate roots: VS Code, VS Code Insiders, Cursor, JetBrains, Visual Studio extension caches
$roots = @(
"$env:USERPROFILE\.vscode\extensions",
"$env:USERPROFILE\.vscode-insiders\extensions",
"$env:USERPROFILE\.cursor\extensions",
"$env:APPDATA\JetBrains",
"$env:LOCALAPPDATA\aws\amazonq",
"$env:USERPROFILE\.aws\amazonq"
)
foreach ($root in $roots) {
if (-not (Test-Path $root)) { continue }
# Amazon Q extension dirs look like 'amazonwebservices.amazon-q-vscode-<ver>'
$exts = Get-ChildItem -Path $root -Recurse -Directory -Filter '*amazon-q*' -ErrorAction SilentlyContinue
foreach ($ext in $exts) {
$found = $true
# Language server binaries ship under resources/language-servers or similar
$manifests = Get-ChildItem -Path $ext.FullName -Recurse -Include 'package.json','language-server-version.json','manifest.json' -ErrorAction SilentlyContinue
foreach ($m in $manifests) {
try {
$json = Get-Content $m.FullName -Raw | ConvertFrom-Json
$verStr = $null
if ($json.languageServerVersion) { $verStr = $json.languageServerVersion }
elseif ($json.version -and $m.Name -eq 'language-server-version.json') { $verStr = $json.version }
if ($verStr) {
$clean = ($verStr -replace '[^0-9\.]','')
try {
$v = [version]$clean
Write-Host "Found Language Server $v at $($m.FullName)"
if ($v -lt $MinFixed) { $vulnerable = $true }
} catch {}
}
} catch {}
}
}
}
if (-not $found) {
Write-Host 'UNKNOWN - Amazon Q / Language Servers for AWS not detected'
exit 2
}
if ($vulnerable) {
Write-Host 'VULNERABLE - Language Server < 1.65.0 present. Upgrade to >=1.69.0 (CVE-2026-12957).'
exit 1
}
Write-Host 'PATCHED - All detected Language Servers >= 1.65.0'
exit 0
If you remember one thing.
.amazonq/mcp.json, page on GuardDuty UnauthorizedAccess:IAMUser/AnomalousBehavior for all dev principals, and accelerate the kill of long-lived IAM user keys in favor of SSO STS. Full remediation SLA is ≤ 180 days, but for an auto-updating IDE extension you should be fully off vulnerable versions within a single sprint; track residual installs and escalate any host stuck on < 1.65.0 after the next IDE restart cycle.Sources
What defenders are saying.
Crowdsourced verification outputs.
Results submitted by users who ran the verification payload against their environment.