Cloudflare Agents SDK has Insecure Direct Object Reference (IDOR) via Header-Based Email Routing
MediumCVE-2026-1664 · Published Feb 3, 2026 · updated Feb 22, 2026
Affected versions
| Package | Affected | Fixed in |
|---|---|---|
| agents npm | < 0.3.7 | 0.3.7 |
Details and references
### Summary An Insecure Direct Object Reference (CWE-639) has been found to exist in createHeaderBasedEmailResolver() function within the Cloudflare Agents SDK. The issue occurs because the Message-ID and References headers are parsed to derive the target agentName and agentId without proper validation or origin checks, allowing an external attacker with control of these headers to route inbound mail to arbitrary Durable Object instances and namespaces. ### Root cause The createHeaderBasedEmailResolver() function lacks cryptographic verification or origin validation for the headers used in the routing logic, effectively allowing external input to dictate internal object routing. ### Impact Insecure Direct Object Reference (IDOR) in email routing lets an attacker steer inbound mail to arbitrary Agent instances via spoofed Message-ID. ### Patches Agents-sdk users should upgrade to agents@0.3.7. PR: https://github.com/cloudflare/agents/pull/811 This [documentation](https://github.com/cloudflare/agents/blob/main/docs/email.md) provides the necessary architectural context for coding agents to mitigate the issue by refactoring the resolver to enforce strict identity boundaries.
- CVSS 4.0
- CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:L/VA:N/SC:L/SI:L/SA:N
- Severity from
- GitHub (reviewed advisory)
- Weakness
- CWE-639
- Also known as
- CVE-2026-1664
More cloudflare-agents advisories
All| Date | Advisory | Severity | Fixed in |
|---|---|---|---|
| Feb 13 | Cloudflare Agents is Vulnerable to Reflected Cross-Site Scripting in the AI Playground's OAuth callback handler CVE-2026-1721Mediumfixed in 0.3.10 | Medium | 0.3.10 |
| Feb 13 | Cloudflare Agents has a Reflected Cross-Site Scripting (XSS) vulnerability in AI Playground site GHSA-w5cr-2qhr-jqc5Mediumfixed in 0.3.10 | Medium | 0.3.10 |