mcp-cve-project

CVE-2025-59956 | Coder agentapi (DNS rebinding / chat history exfiltration) | Medium |

CVE Information

Field Value
CVE / NVD CVE-2025-59956
EPSS score 0.000680000 (FIRST EPSS, 2026-05-29)
Date (index) 2025-09-30
Affected product (index) Coder agentapi (HTTP API for Claude Code, Goose, Aider, Gemini, Amp, Codex)
GHSA ID GHSA-w64r-2g3w-w8w4
OWASP MCP Top 10 (2025) MCP10 — Context Injection & Over-Sharing
Published / disclosed 2025-09-30
Ecosystem Go module (github.com/coder/agentapi)
Component Coder AgentAPI
CVSS score Medium — 6.5 — CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N (GitHub CNA)
CWE CWE-350 (GitHub CNA); CWE-290 (NIST)
Affected versions <= 0.3.3 (per NVD CPE: cpe:2.3:a:coder:agentapi:*:*:*:*:*:*:*:* versions up to excluding 0.4.0)
Fixed versions 0.4.0 and later (release)
Fix status Patched (per NVD and GitHub advisory)
Exploit status Public CVE record; third-party MCP security write-up (mcpsec.dev)
Notes Details below are aligned to the English NVD description at indexing time; re-check NVD for CNA updates.

CVE Breakdown


What is the vulnerability?

AgentAPI is an HTTP API for Claude Code, Goose, Aider, Gemini, Amp, and Codex. Versions 0.3.3 and below are susceptible to a client-side DNS rebinding attack when hosted over plain HTTP on localhost. An attacker can gain access to the /messages endpoint served by the Agent API. This allows for the unauthorized exfiltration of sensitive user data, specifically local message history, which can include secret keys, file system contents, and intellectual property the user was working on locally. This issue is fixed in version 0.4.0.

Attack prerequisites / exposure

Depends on deployment: treat developer workstations and shared environments running agent tooling as high-value targets when local HTTP APIs back MCP-shaped workflows.

CVE is because of what bug?

Insufficient protection against DNS rebinding and spoofing for a security-critical localhost HTTP service. NVD maps CWE-290 (authentication bypass by spoofing); GitHub CNA maps CWE-350 (reliance on reverse DNS resolution for a security-critical action).

MCP-specific impact / why it matters

Coder and related agent stacks integrate local HTTP APIs with MCP-enabled development flows. Exposed /messages history can contain API keys, repository context, filesystem paths, and proprietary code discussed with the agent—higher value than isolated file reads for targeted follow-on attacks.

Where was the bug? (source + snippet)

Add a minimal vulnerable code snippet here after reviewing the linked upstream commit / tag diff (do not paste weaponized payloads).

Fix / Remediation

Upgrade to agentapi v0.4.0 or later. Apply DNS rebinding mitigations documented by GitHub Security Lab for localhost services.

Upstream fix (open source)

Workarounds / mitigations

Exploit / PoC

See mcpsec.dev: Coder chat exfiltration for defensive context; do not host weaponized exploit code in this repository.

Detection / verification

Patch

Upgrade to agentapi v0.4.0