CVE-2025-59956: AgentAPI exposed user chat history via a DNS rebinding attack
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.
Other sources
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.
— MITRE
Affected Software
Remediation
Patch Available
Event History
Frequently Asked Questions
What is the severity of CVE-2025-59956?
CVE-2025-59956 is considered a high severity vulnerability due to the potential for unauthorized access to sensitive endpoints.
How do I fix CVE-2025-59956?
To fix CVE-2025-59956, update the AgentAPI to version 0.4.0 or later.
What does CVE-2025-59956 exploit?
CVE-2025-59956 exploits a client-side DNS rebinding attack when the AgentAPI is hosted over plain HTTP on localhost.
What is the impact of CVE-2025-59956?
The impact of CVE-2025-59956 allows an attacker to access the /messages endpoint of the Agent API.
Which versions of AgentAPI are affected by CVE-2025-59956?
Versions of AgentAPI prior to 0.4.0 are affected by CVE-2025-59956.