CVE-2025-59956: coder agentapi · Reliance on Reverse DNS Resolution for a Security-Critical Action
Affects coder agentapiSource CVE Database V5
Not known to be exploited · CVSS 6.5 Medium : upgrade to 0.4.0 when convenient.
Data as of 26 Oct 2026, 14:05 UTC
- EPSS
- 0.4% chance of exploitation in 30 days – higher than 36% of CVEsExploit Prediction Scoring System: the likelihood attackers will use this flaw soon.
- Patch
- Available – fixed in 0.4.0
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:NExploitation evidence
Disclosed: evidence found.
CVE published 29 Sep 2025
Detectable: no evidence on record.
No public nuclei template indexed
Weaponised: no evidence on record.
No public exploit code indexed in Metasploit or Exploit-DB
Exploited in the wildExploited: no evidence on record.
Not in CISA KEV and no source reports exploitation
Observed by OffSeq MirageSeen by Mirage: no evidence on record.
No attack traffic recorded by OffSeq Mirage sensors
A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), the Metasploit, Exploit-DB and nuclei-templates index as of 26 Oct 2026.
What to do
Upgrade coder agentapi to 0.4.0.
Affected software
| Product | Affected | Fixed in |
|---|---|---|
| coder agentapi | Affected
| Fixed in
|
AI-suggested
- Upgrade all AgentAPI deployments to version 0.4.0 or later immediately to apply the official fix.
- Enforce HTTPS for all localhost API communications to prevent interception and manipulation of DNS responses.
- Disable reliance on reverse DNS resolution for security decisions within the API or implement strict validation of DNS responses.
- Implement strict origin and referer header checks to ensure requests to the /messages endpoint originate from trusted sources.
- Restrict access to the AgentAPI localhost endpoints using firewall rules or local network policies to prevent unauthorized external access.
- Educate users about the risks of visiting untrusted websites that could trigger DNS rebinding attacks.
- Monitor network traffic for suspicious DNS rebinding patterns or unexpected localhost API requests.
- Consider implementing authentication and authorization mechanisms on localhost APIs to prevent unauthorized access.
- Conduct regular security audits and penetration testing focused on localhost API exposures and DNS-related attack vectors.
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.
References
- github.com/coder/agentapi/security/advisories/GHSA-w64r-2g3w-w8w4 (opens in a new tab)
- github.com/coder/agentapi/pull/49 (opens in a new tab)
- github.com/coder/agentapi/commit/5c425c62447b8a9eac19e9fc5a2eae7f0803f149 (opens in a new tab)
- github.blog/security/application-security/localhost-dangers-cors-and-dns-rebinding (opens in a new tab)
- github.com/coder/agentapi/releases/tag/v0.4.0 (opens in a new tab)
- mcpsec.dev/advisories/2025-09-19-coder-chat-exfiltration (opens in a new tab)
- mcpsec.dev/advisories/2025-09-19-coder-chat-exfiltration/ (opens in a new tab)