CVE-2026-1664
MEDIUM 6.9CVSS 4.0Cloudflare Agents SDK has Insecure Direct Object Reference (IDOR) via Header-Based Email Routing
Summary
An Insecure Direct Object Reference 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.
Mitigation:
- PR: 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.
- Agents-sdk users should upgrade to agents@0.3.7
- Published
- 3 Feb 2026
- Last modified
- 17 Jun 2026
- Assigned by
- cna@cloudflare.com
- NVD status
- Deferred
- Weakness
- CWE-639
- Also known as
- GHSA-r7x9-8ph7-w8cg
- Sources
- NVDJSONOSV GHSA-r7x9-8ph7-w8cgJSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| NVD | cna@cloudflare.com (Secondary) | CVSS 4.0 | MEDIUM 6.9 | 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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X |
| OSV | GitHub | 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 |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| OSV | npm | agents | < 0.3.7 | 0.3.7 |
References
- https://github.com/cloudflare/agents · PACKAGE
- https://github.com/cloudflare/agents/security/advisories/GHSA-r7x9-8ph7-w8cg · WEB
- https://nvd.nist.gov/vuln/detail/CVE-2026-1664 · ADVISORY
- https://github.com/cloudflare/agents/blob/main/docs/email.md · WEB
History
- 25 Nov 2026 21:01 UTC · NVD: first stored (published 3 Feb 2026)
- 25 Nov 2026 20:11 UTC · OSV: first stored (published 3 Feb 2026)