CVE-2026-1664: Agents Cloudflare Agents SDK Has Insecure Vulnerability
MODERATECVE-2026-1664 is a MODERATE cloudflare agents sdk has insecure vulnerability (CWE-639: Authorization Bypass Through User-Controlled Key) affecting Agents libraries in the npm ecosystem. The issue involves cloudflare agents sdk has insecure direct object reference (idor) via header-based email routing. Remediation is available by upgrading affected packages to version 0.3.7.
CVE-2026-1664 at a Glance
How to Fix CVE-2026-1664
To remediate this vulnerability, upgrade all affected Agents dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
npm install agents@0.3.7
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls agents
How to Check if You Are Affected
To determine whether your Node.js application is affected by CVE-2026-1664, inspect your project dependencies using npm:
npm ls agents
Analyze the terminal output to locate any version of Agents in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.3.7), your application is affected.
Note: The npm ls agents command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-639: Authorization Bypass Through User-Controlled Key, where the system's authorization functionality does not prevent one user from gaining access to another user's data or record by modifying the key value identifying the data. In Agents, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2026-1664 Affected Agents Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
agents
|
npm |
< 0.3.7
|
0.3.7
|
References
Frequently Asked Questions
What is CVE-2026-1664?
Which Agents versions are affected?
What version fixes CVE-2026-1664?
Is agents affected?
What CWE is associated with CVE-2026-1664?
How can I check npm dependencies for CVE-2026-1664?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-r7x9-8ph7-w8cg",
"modified" : "2026-02-03T18:42:01Z",
"published" : "2026-02-03T18:42:01Z",
"aliases" : [ "CVE-2026-1664" ],
"summary" : "Cloudflare Agents SDK has Insecure Direct Object Reference (IDOR) via Header-Based Email Routing",
"details" : "### Summary\nAn 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.\n\n### Root cause\nThe 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.\n\n### Impact\nInsecure Direct Object Reference (IDOR) in email routing lets an attacker steer inbound mail to arbitrary Agent instances via spoofed Message-ID.\n\n\n\n### Patches\nAgents-sdk users should upgrade to agents@0.3.7. \nPR: https://github.com/cloudflare/agents/pull/811\nThis [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.",
"severity" : [ {
"type" : "CVSS_V4",
"score" : "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" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "agents"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "0.3.7"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/cloudflare/agents/security/advisories/GHSA-r7x9-8ph7-w8cg"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-1664"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/cloudflare/agents"
}, {
"type" : "WEB",
"url" : "https://github.com/cloudflare/agents/blob/main/docs/email.md"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-639" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2026-02-03T18:42:01Z",
"nvd_published_at" : "2026-02-03T12:16:11Z"
}
}