Skip to content
cloudflare-agentsGHSA-r7x9-8ph7-w8cg

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

GitHub advisory

Affected versions

PackageAffectedFixed in
agents
npm
< 0.3.70.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
DateAdvisory
Feb 13Cloudflare Agents is Vulnerable to Reflected Cross-Site Scripting in the AI Playground's OAuth callback handler
CVE-2026-1721Mediumfixed in 0.3.10
Feb 13Cloudflare Agents has a Reflected Cross-Site Scripting (XSS) vulnerability in AI Playground site
GHSA-w5cr-2qhr-jqc5Mediumfixed in 0.3.10

Critical advisories by email

Wednesdays: the week’s critical and high advisories in the AI and data stack, with the fixed versions. Only in weeks that have some.

Double opt-in. Unsubscribe any time.