CVE-2026-1721: Agents Cross-Site Scripting Vulnerability
MODERATECVE-2026-1721 is a MODERATE cross-site scripting vulnerability (CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')) affecting Agents libraries in the npm ecosystem. The issue involves cloudflare agents is vulnerable to reflected cross-site scripting in the ai playground's oauth callback handler. Remediation is available by upgrading affected packages to version 0.3.10.
CVE-2026-1721 at a Glance
How to Fix CVE-2026-1721
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.10
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-1721, 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.10), 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-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting'), where the product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users. 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-1721 Affected Agents Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
agents
|
npm |
< 0.3.10
|
0.3.10
|
References
Frequently Asked Questions
What is CVE-2026-1721?
Which Agents versions are affected?
What version fixes CVE-2026-1721?
Is agents affected?
What CWE is associated with CVE-2026-1721?
How can I check npm dependencies for CVE-2026-1721?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-cvhv-6xm6-c3v4",
"modified" : "2026-02-13T20:04:56Z",
"published" : "2026-02-13T03:31:23Z",
"aliases" : [ "CVE-2026-1721" ],
"summary" : "Cloudflare Agents is Vulnerable to Reflected Cross-Site Scripting in the AI Playground's OAuth callback handler",
"details" : "Summary\n\nA Reflected Cross-Site Scripting (XSS) vulnerability was discovered in the AI Playground's OAuth callback handler. The `error_description` query parameter was directly interpolated into an HTML script tag without proper escaping, allowing attackers to execute arbitrary JavaScript in the context of the victim's session.\n\nRoot cause\n\nThe OAuth callback handler in `site/ai-playground/src/server.ts` directly interpolated the `authError` value, sourced from the `error_description` query parameter, into an inline `<script>` tag.\n\nImpact\n\nAn attacker could craft a malicious link that, when clicked by a victim, would:\n\n * Steal user chat message history - Access all LLM interactions stored in the user's session.\n\n\n * Access connected MCP Servers - Interact with any MCP servers connected to the victim's session (public or authenticated/private), potentially allowing the attacker to perform actions on the victim's behalf\n\n\nMitigation:\n\n * PR: https://github.com/cloudflare/agents/pull/841 https://github.com/cloudflare/agents/pull/841 \n * Agents-sdk users should upgrade to agents@0.3.10\n * Developers using configureOAuthCallback with custom error handling in their own applications should ensure all user-controlled input is escaped before interpolation.",
"severity" : [ {
"type" : "CVSS_V4",
"score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:A/VC:N/VI:N/VA:N/SC:H/SI:L/SA:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "agents"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "0.3.10"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-1721"
}, {
"type" : "WEB",
"url" : "https://github.com/cloudflare/agents/pull/841"
}, {
"type" : "WEB",
"url" : "https://github.com/cloudflare/agents/commit/3f490d045844e4884db741afbb66ca1fe65d4093"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/cloudflare/agents"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-79" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2026-02-13T20:04:55Z",
"nvd_published_at" : "2026-02-13T03:15:52Z"
}
}