Advisory

GHSA-r7x9-8ph7-w8cg

Also known as: CVE-2026-1664

Summary

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

Details

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 [email protected].
PR: https://github.com/cloudflare/agents/pull/811
This documentation provides the necessary architectural context for coding agents to mitigate the issue by refactoring the resolver to enforce strict identity boundaries.

Severity

Medium Basis: The source's own band: MODERATE

Dates

Published
2026-02-03 18:42 UTC
Modified
2026-02-22 23:26 UTC

Affected packages and fixes

agents

npm · All systems

Affected

  • introduced 0, fixed 0.3.7 (semver)

Fixed versions

0.3.7

Fix

Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.

Check your own computer: guard packages check

View this record on OSV.dev

Source

Source: GitHub Advisory Database (reviewed advisories) · CC BY 4.0

Sources & licences