6.5medium
AgentAPI exposed user chat history via a DNS rebinding attack
- Severity
- 6.5medium CVSS:3.1 by GitHub_M
- Exploit likelihood
- 0.44% (higher than 40% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- GHSA-w64r-2g3w-w8w4GO-2025-3991
Description
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.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| coder agentapi | < 0.4.0, before 0.4.0 | CVE List, NVD |
| github.com/coder/agentapi (Go) | before 0.4.0 | GitHub Advisory Database, Go Vulnerability Database |
All scores
| GitHub_M | 6.5medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N |
| GitHub | 6.5medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N |
Classification
What each source says
CVE List
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.
GitHub Advisory Database
Summary
AgentAPI prior to version 0.4.0 was susceptible to a client-side DNS rebinding attack when hosted over plain HTTP on localhost.
Impact
An attacker could have gained access to the /messages endpoint served by the Agent API. This allowed for the unauthorized exfiltration of sensitive user data, specifically local message history, which could've included secret keys, file system contents, and intellectual property the user was working on locally.
Remediation
We've implemented an Origin and Host header validating middleware and set a secure by default configuration.
Please upgrade to version 0.4.0 or later.
Credits
We'd like to thank Evan Harris from mcpsec.dev for reporting this issue and following the coordinated disclosure policy.
Go Vulnerability Database
Coder AgentAPI exposed user chat history via a DNS rebinding attack in github.com/coder/agentapi
NVD (es)
AgentAPI es una API HTTP para Claude Code, Goose, Aider, Gemini, Amp y Codex. Las versiones 0.3.3 e inferiores son susceptibles a un ataque de reencuadernación de DNS del lado del cliente cuando se alojan a través de HTTP simple en localhost. Un atacante puede obtener acceso al endpoint /messages servido por la API de Agent. Esto permite la exfiltración no autorizada de datos sensibles del usuario, específicamente el historial de mensajes local, que puede incluir claves secretas, contenido del sistema de archivos y propiedad intelectual en la que el usuario estaba trabajando localmente. Este problema está solucionado en la versión 0.4.0.
References
| https://github.com/coder/agentapi/security/advisories/GHSA-w64r-2g3w-w8w4 | advisory, patch, vendor-advisory, web | |
| https://github.com/coder/agentapi/pull/49 | fix, issue-tracking, patch, web | |
| https://github.com/coder/agentapi/commit/5c425c62447b8a9eac19e9fc5a2eae7f0803f149 | fix, patch, web | |
| https://github.blog/security/application-security/localhost-dangers-cors-and-dns-rebinding | technical-description, web | |
| https://github.com/coder/agentapi/releases/tag/v0.4.0 | release-notes, web | |
| https://mcpsec.dev/advisories/2025-09-19-coder-chat-exfiltration | exploit, third-party-advisory, web | |
| https://mcpsec.dev/advisories/2025-09-19-coder-chat-exfiltration/ | exploit, third-party-advisory | |
| https://nvd.nist.gov/vuln/detail/CVE-2025-59956 | advisory | |
| https://github.com/coder/agentapi | package | |
| https://pkg.go.dev/vuln/GO-2025-3991 | web | |
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2025-59956 changed 2025-09-30 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-w64r-2g3w-w8w4 changed 2025-10-23 | CC-BY-4.0 |
| Go Vulnerability Database | GO-2025-3991 changed 2026-03-03 | CC-BY-4.0 |
| NVD | CVE-2025-59956 changed 2026-06-17 | Public domain |