CVE-2026-1721: agents Package Vulnerable to Reflected XSS in AI Playground OAuth Callback
Summary
CVE-2026-1721: Summary A Reflected Cross-Site Scripting (XSS) vulnerability was discovered in the AI Playground's OAuth callback handler. Affects agents versions < 0.3.10. Fixed in 0.3.10. How to fix ↓
Check if this vulnerability affects your application
Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.
No signup required · Results in about 60 seconds
Background
The agents package is a component used in various applications to facilitate interactions with Cloudflare's AI Playground. It allows developers to integrate AI functionalities into their applications seamlessly. However, a critical vulnerability has been identified in its OAuth callback handler, which could expose users to security risks if not addressed promptly.
Vulnerability Detail
A Reflected Cross-Site Scripting (XSS) vulnerability exists in the AI Playground's OAuth callback handler. The vulnerability arises from the direct interpolation of the 'error_description' query parameter into an HTML script tag without proper escaping. This flaw allows attackers to execute arbitrary JavaScript in the context of the victim's session, potentially leading to unauthorized access to sensitive information such as user chat history and connected MCP servers.
How To Fix
Minimum fixed version
0.3.10
This is the first release that contains the fix.
npm install agents@0.3.10
Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →
Workaround
If an immediate upgrade is not feasible, developers can implement input validation and escaping for the 'error_description' parameter in their OAuth callback handler. For example, use a library like DOMPurify to sanitize the input before rendering it in the HTML context.
Conclusion
The vulnerability identified as CVE-2026-1721 in the agents package poses a significant risk due to its potential for reflected XSS attacks. Users are strongly advised to upgrade to the patched version to safeguard their applications and user data.
See every vulnerability recorded for agents →
FAQ
The CVSS score of this vulnerability is 6.2, indicating a moderate severity level.
You can use Vulert's playground at Vulert Scanner to check if your application is affected by this vulnerability without needing to sign up.
An attacker could steal user chat message history and access connected MCP servers, potentially allowing them to perform actions on behalf of the victim.
Yes, a patch is available in version 0.3.10 of the agents package. Users should upgrade to this version to mitigate the vulnerability.
If an immediate upgrade is not possible, implement input validation and escaping for the 'error_description' parameter in your OAuth callback handler.
References
Related vulnerabilities
Recent vulnerabilities recorded for agents.