Answers · MCP security
We let an assistant use the AWS Labs Pricing MCP server for cost estimates, and our client auto-approves tools marked read-only. What is CVE-2026-126816, which version fixes it, and how can a tool labelled read-only end up writing files?
Last updated
TL;DR: Yes, if the label is wrong, and that is what happened here. CVE-2026-126816 (GHSA-mqm3-w68j-75mw and AWS bulletin 2026-184-AWS, both published November 16, 2026) affects awslabs.aws-pricing-mcp-server before 1.0.31 and the deprecated awslabs.cost-analysis-mcp-server 1.0.5 and earlier. Its generate_cost_report tool took an output_file path and wrote there without confining it, so absolute paths or ../ segments could create or overwrite files anywhere the server process can write, with a report that embeds field values someone else supplied. The tool was also annotated read-only, so a client set to auto-approve read-only tools could run it with no prompt. Exploitation needs a locally installed server and an agent that reads content an attacker can influence, and AWS says no managed AWS service is affected. Version 1.0.31 confines output_file to a base directory (AWS_PRICING_MCP_OUTPUT_DIR) and corrects readOnlyHint to false. The deprecated package gets no fix: move to aws-pricing-mcp-server 1.0.31 or later. The broader lesson: readOnlyHint is the server author's own description, so never let it alone decide what runs unprompted.
What should I check, step by step?
1. Check the installed package: awslabs.aws-pricing-mcp-server before 1.0.31 is affected, and so is every release of the deprecated awslabs.cost-analysis-mcp-server up to 1.0.5. PyPI listed 1.1.2 as the newest aws-pricing release on November 20, 2026.
- If you still run awslabs.cost-analysis-mcp-server, replace it. AWS says no patched release of that package will be published.
- If a client launches the server through uvx with @latest, restart it so it pulls a new build; a pinned or cached copy stays where it was.
- Set AWS_PRICING_MCP_OUTPUT_DIR to a dedicated reports folder. If it's unset, 1.0.31 and later confine reports to the server process's working directory, which may be somewhere you'd rather not have files appear.
- Until you upgrade, take generate_cost_report out of any auto-approve list and read the output_file argument in each prompt, as AWS advises.
- Review your client's auto-approve rules more widely: approving a tool because the server calls it read-only trusts the server's own annotation, and this advisory is a case where that annotation was wrong.
- If an affected version ran with auto-approval while the agent read outside content (web pages, tickets, documents), look for report files outside your working folders and for changed shell profiles, startup scripts or config files the server's user can write.
What is CVE-2026-126816 in the AWS Pricing MCP server?
AWS's advisory GHSA-mqm3-w68j-75mw (CVE-2026-126816, moderate, CVSS 3.1 5.5, AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N, published November 16, 2026) concerns the cost report generator. Before 1.0.31, someone who can influence the MCP agent, for example by placing text the agent reads, could make it create or overwrite files outside the intended output directory, with a cost report that embeds field values they supplied. AWS's bulletin 2026-184-AWS, published the same day, names absolute paths and directory traversal sequences in the report output path as the route.
- The advisory lists two weaknesses: CWE-22, a path that escapes its restricted directory, and CWE-357, insufficient warning of a dangerous operation. The second is the annotation: the tool was marked read-only, so MCP clients configured to auto-approve read-only tools could run it without asking.
- The limits AWS states: the server has to be installed locally, the agent has to process content the attacker influences, the impact is confined to files the server process can write on that machine, and no managed AWS service is affected. The server itself only reads public AWS pricing data; its README asks for pricing:* permissions and says it retrieves no user-specific data.
How does AWS Pricing MCP server 1.0.31 fix CVE-2026-126816?
According to the advisory, output_file is now resolved and confined to a base directory set by the AWS_PRICING_MCP_OUTPUT_DIR environment variable, or the server process's working directory if that isn't set. Absolute paths outside the base, .. traversal segments and symlinks that escape it are rejected, and the tool's readOnlyHint annotation is corrected to false. The server's README documents the same variable under "Cost report output directory".
- PyPI shows 1.0.31 uploaded on June 9, 2026, months before the advisory went out on November 16, so anyone who updated over the summer already has the fix. Installs pinned to 1.0.30 or earlier, and every copy of the deprecated cost-analysis package, do not.
- AWS also asks anyone maintaining a fork or derivative of this code to carry the same fix.
Should an MCP client auto-approve tools marked readOnlyHint?
readOnlyHint is something a server says about its own tool. The MCP specification (2025-11-25) says clients must treat tool annotations as untrusted unless they come from trusted servers, and that a person should always be able to deny a tool call. This advisory shows the label can be wrong even on a server from a well-known publisher: a tool that writes files carried readOnlyHint until 1.0.31 corrected it.
- A safer auto-approve rule names specific tools you have reviewed on a specific pinned version, rather than every tool whose annotation says read-only. Re-check that list whenever the server updates, since tools and annotations change between releases.
- If you build MCP servers: any argument that names a file path is a write target the model can choose. Resolve it against a fixed base directory, reject anything that escapes, and mark the tool readOnlyHint: false if it can create a file at all.
How do I ask Rightshold about this (free, no key)?
Add the MCP server https://www.rightshold.com/mcp to Claude, Cursor, ChatGPT, Grok or VS Code, then ask: “Before my assistant runs generate_cost_report on the AWS Pricing MCP server, ask me to approve that exact call, with the output_file path in the request, so a report can't be written somewhere I didn't choose.”
{
"tool": "request_human_approval",
"arguments": {
"action": {
"tool": "generate_cost_report",
"mcp_server": "awslabs.aws-pricing-mcp-server",
"server_version": "1.1.2",
"output_file": "reports/<report name>.md"
},
"summary": "Save an AWS cost report from the Pricing MCP server to the reports folder",
"expires_in_minutes": 30
}
}- Needs a key for your account. It hashes the action details and returns an approval id and a one-time token for the owner. Only the account owner can decide it, with an account key; delegated agent keys are refused, so the assistant can't approve its own request. Anyone can check the signed decision free with verify_human_approval, including that the action matches what was approved.
- It doesn't check your server version, resolve file paths or stop a call your client sends straight to the Pricing MCP server. It only covers calls your agent or harness routes through it first, so upgrade and set AWS_PRICING_MCP_OUTPUT_DIR as well.
Rightshold isn't affiliated with AWS. It doesn't scan MCP server code or client settings, and an approval record isn't a finding that a call is safe. Advisory details are as published by AWS in GitHub's advisory database (GHSA-mqm3-w68j-75mw) and AWS security bulletin 2026-184-AWS, the output directory setting as described in the server's README in the awslabs/mcp repository, and release dates as listed on PyPI, all read November 20, 2026; advisories get updated, so confirm fixed versions on the linked pages.
What are the sources?
- GitHub Advisory: GHSA-mqm3-w68j-75mw / CVE-2026-126816, path traversal and arbitrary file write in the cost report generator of aws-pricing-mcp-server
- AWS Security Bulletin 2026-184-AWS: CVE-2026-126816, AWS Pricing MCP Server
- awslabs/mcp: AWS Pricing MCP server README (cost report output directory)
- PyPI: awslabs.aws-pricing-mcp-server release history
- MCP specification 2025-11-25: Tools (annotations are untrusted; human in the loop)
Related
- Are MCP tool annotations like readOnlyHint a security guarantee?
- Blocking SSRF and path traversal in MCP tool URL arguments and resource templates
- Require human confirmation before MCP write tools run
- Pinning MCP server versions and reviewing changes before you upgrade
Not legal advice. JSON · Markdown · All answers
Get a free API key in one call
No card and no email needed. 100 free credits; the license and policy checks stay free without a key.
curl -s -X POST https://www.rightshold.com/v1/accounts/signup -H "Content-Type: application/json" -d '{"accept_terms":true}'
export RIGHTSHOLD_API_KEY=rs_... # the api_key from the reply (shown once)
curl -s https://www.rightshold.com/v1/licenses/check -H "Authorization: Bearer $RIGHTSHOLD_API_KEY" \
-H "Content-Type: application/json" -d '{"license":"MIT","intended_use":{"commercial_use":true}}'
