AI and data stack advisories

Severe, 6 weeks1496Projects326

1496 severe, 6 weeks · 326 projects

agentsGHSA-r7x9-8ph7-w8cg

Cloudflare Agents SDK has Insecure Direct Object Reference (IDOR) via Header-Based Email Routing

agents

CVE-2026-1664 · Published Feb 3, 2026 · updated Feb 22, 2026

Medium
Fix: upgrade to 0.3.7 or later
GitHub advisory

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.

Affected versions

PackageAffectedFixed in
agents
npm
< 0.3.70.3.7
Details and references
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 agents advisories

All agents