CVE-2026-1664

N/A Unknown

📋 TL;DR

This CVE describes an Insecure Direct Object Reference vulnerability in Cloudflare Agents SDK's email routing function. Attackers can spoof email headers to redirect inbound mail to arbitrary Durable Object instances, potentially accessing unauthorized data or functionality. Users of the Cloudflare Agents SDK with email routing enabled are affected.

💻 Affected Systems

Products:
  • Cloudflare Agents SDK
Versions: Versions before 0.3.7
Operating Systems: All
Default Config Vulnerable: ⚠️ Yes
Notes: Only affects implementations using the createHeaderBasedEmailResolver() function for email routing.

⚠️ Manual Verification Required

This CVE does not have specific version information in our database, so automatic vulnerability detection cannot determine if your system is affected.

Why? The CVE database entry doesn't specify which versions are vulnerable (no version ranges provided by the vendor/NVD).

🔒 Custom verification scripts are available for registered users. Sign up free to download automated test scripts.

Recommended Actions:
  1. Review the CVE details at NVD
  2. Check vendor security advisories for your specific version
  3. Test if the vulnerability is exploitable in your environment
  4. Consider updating to the latest version as a precaution

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete compromise of email routing logic allowing attackers to intercept, redirect, or manipulate all inbound email traffic to unauthorized Durable Object instances, potentially leading to data exfiltration or service disruption.

🟠

Likely Case

Targeted attacks where attackers redirect specific inbound emails to malicious or unauthorized endpoints, potentially accessing sensitive information or disrupting business workflows.

🟢

If Mitigated

Proper validation and cryptographic verification prevent header spoofing, ensuring emails only route to intended, authorized Durable Object instances.

🌐 Internet-Facing: HIGH
🏢 Internal Only: LOW

🎯 Exploit Status

Public PoC: ✅ No
Weaponized: UNKNOWN
Unauthenticated Exploit: ⚠️ Yes
Complexity: LOW

Exploitation requires sending emails with spoofed headers to vulnerable endpoints.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: agents@0.3.7

Vendor Advisory: https://github.com/cloudflare/agents

Restart Required: Yes

Instructions:

1. Update package.json to specify agents@0.3.7 or higher
2. Run npm update agents
3. Restart all services using the Agents SDK
4. Verify the update with npm list agents

🔧 Temporary Workarounds

Disable Header-Based Email Routing

all

Temporarily disable or remove the createHeaderBasedEmailResolver() function until patching is possible.

Comment out or remove createHeaderBasedEmailResolver() calls in your code

🧯 If You Can't Patch

  • Implement additional validation layer to verify email header integrity before routing
  • Monitor email routing logs for suspicious header patterns or unexpected destinations

🔍 How to Verify

Check if Vulnerable:

Check if your code uses createHeaderBasedEmailResolver() and verify the agents SDK version is below 0.3.7

Check Version:

npm list agents

Verify Fix Applied:

Confirm agents SDK version is 0.3.7 or higher and test email routing with various header inputs to ensure proper validation

📡 Detection & Monitoring

Log Indicators:

  • Unusual email routing patterns
  • Emails routed to unexpected Durable Object instances
  • Suspicious Message-ID or References header patterns

Network Indicators:

  • Unexpected email traffic to non-standard endpoints
  • Email routing to unauthorized namespaces

SIEM Query:

Search for email routing events where Message-ID or References headers contain unexpected patterns or route to unauthorized agentName/agentId values

🔗 References

📤 Share & Export