CVE-2025-59956
JSON

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 packageVersionsReported by
coder agentapi< 0.4.0, before 0.4.0CVE List, NVD
github.com/coder/agentapi (Go)before 0.4.0GitHub Advisory Database, Go Vulnerability Database

All scores

GitHub_M6.5medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N
GitHub6.5medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N

Classification

CWE-290CWE-350

SSVC (CISA-ADP): exploitation poc, automatable no, technical impact partial.

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

Sources

SourceRecordLicence
CVE ListCVE-2025-59956 changed 2025-09-30CVE Terms of Use
GitHub Advisory DatabaseGHSA-w64r-2g3w-w8w4 changed 2025-10-23CC-BY-4.0
Go Vulnerability DatabaseGO-2025-3991 changed 2026-03-03CC-BY-4.0
NVDCVE-2025-59956 changed 2026-06-17Public domain