CVE-2026-1721
Summary A 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. Root cause The 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. Impact An attacker could craft a malicious link that, when clicked by a victim, would: * Steal user chat message history - Access all LLM interactions stored in the user's session. * 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 Mitigation: * PR: https://github.com/cloudflare/agents/pull/841 https://github.com/cloudflare/agents/pull/841 * Agents-sdk users should upgrade to agents@0.3.10 * Developers using configureOAuthCallback with custom error handling in their own applications should ensure all user-controlled input is escaped before interpolation.
AI Analysis
Technical Summary
CVE-2026-1721 is a reflected Cross-Site Scripting (XSS) vulnerability identified in the AI Playground's OAuth callback handler, specifically in the file site/ai-playground/src/server.ts. The vulnerability stems from the direct interpolation of the error_description query parameter into an inline <script> tag without proper escaping or sanitization. This parameter is sourced from the authError value, which is user-controlled. When a victim clicks a maliciously crafted link containing a manipulated error_description parameter, arbitrary JavaScript code executes in the context of the victim's browser session. This enables attackers to steal sensitive data such as the user's chat message history, which includes all interactions with large language models (LLMs) stored in the session. Additionally, attackers can access connected MCP servers linked to the victim's session, potentially performing unauthorized actions on those servers, whether public or private. The vulnerability requires no authentication but does require user interaction (clicking the malicious link). The CVSS 4.0 vector indicates a network attack vector, low attack complexity, no privileges required, user interaction required, no impact on confidentiality, integrity, or availability directly, but a high scope impact due to session compromise. The vulnerability is categorized under CWE-79 (Improper Neutralization of Input During Web Page Generation). Mitigation has been addressed by Cloudflare via pull request 841 and upgrading the agents-sdk to version 0.3.10. Developers using custom OAuth callback handlers must ensure all user-controlled inputs are properly escaped before embedding them into scripts to prevent similar XSS issues.
Potential Impact
The primary impact of CVE-2026-1721 is the compromise of user session security through reflected XSS, which can lead to the theft of sensitive user data such as chat histories with AI language models. This data may contain confidential or proprietary information, posing privacy and intellectual property risks. Furthermore, attackers gaining access to connected MCP servers can perform unauthorized actions, potentially disrupting services, manipulating data, or escalating privileges within those systems. The attack vector requires user interaction but no authentication, making it feasible to target a broad user base via phishing or social engineering. Organizations relying on the affected AI Playground platform or agents-sdk risk exposure of user data and unauthorized server access, which can damage reputation, lead to regulatory penalties, and incur remediation costs. The high scope impact indicates that the vulnerability affects multiple components beyond the initial web application, increasing the potential damage. Although no known exploits are currently reported in the wild, the medium CVSS score and ease of exploitation warrant prompt attention.
Mitigation Recommendations
To mitigate CVE-2026-1721, organizations and developers should immediately upgrade to agents-sdk version 0.3.10, which includes the necessary fixes to properly escape user-controlled input in the OAuth callback handler. For those maintaining custom OAuth callback implementations, it is critical to implement rigorous input validation and output encoding, especially escaping any data interpolated into inline script tags to prevent XSS. Employ Content Security Policy (CSP) headers that restrict script execution sources and disallow inline scripts where feasible to reduce the impact of potential XSS vulnerabilities. Additionally, implement security awareness training to educate users about the risks of clicking suspicious links, as exploitation requires user interaction. Regularly audit and test web applications for XSS vulnerabilities using automated scanners and manual penetration testing to identify and remediate similar issues proactively. Monitoring logs for unusual access patterns to MCP servers can help detect exploitation attempts early. Finally, maintain up-to-date dependencies and apply security patches promptly to minimize exposure.
Affected Countries
United States, United Kingdom, Germany, Canada, Australia, France, Japan, South Korea, India, Netherlands
CVE-2026-1721
Description
Summary A 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. Root cause The 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. Impact An attacker could craft a malicious link that, when clicked by a victim, would: * Steal user chat message history - Access all LLM interactions stored in the user's session. * 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 Mitigation: * PR: https://github.com/cloudflare/agents/pull/841 https://github.com/cloudflare/agents/pull/841 * Agents-sdk users should upgrade to agents@0.3.10 * Developers using configureOAuthCallback with custom error handling in their own applications should ensure all user-controlled input is escaped before interpolation.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
CVE-2026-1721 is a reflected Cross-Site Scripting (XSS) vulnerability identified in the AI Playground's OAuth callback handler, specifically in the file site/ai-playground/src/server.ts. The vulnerability stems from the direct interpolation of the error_description query parameter into an inline <script> tag without proper escaping or sanitization. This parameter is sourced from the authError value, which is user-controlled. When a victim clicks a maliciously crafted link containing a manipulated error_description parameter, arbitrary JavaScript code executes in the context of the victim's browser session. This enables attackers to steal sensitive data such as the user's chat message history, which includes all interactions with large language models (LLMs) stored in the session. Additionally, attackers can access connected MCP servers linked to the victim's session, potentially performing unauthorized actions on those servers, whether public or private. The vulnerability requires no authentication but does require user interaction (clicking the malicious link). The CVSS 4.0 vector indicates a network attack vector, low attack complexity, no privileges required, user interaction required, no impact on confidentiality, integrity, or availability directly, but a high scope impact due to session compromise. The vulnerability is categorized under CWE-79 (Improper Neutralization of Input During Web Page Generation). Mitigation has been addressed by Cloudflare via pull request 841 and upgrading the agents-sdk to version 0.3.10. Developers using custom OAuth callback handlers must ensure all user-controlled inputs are properly escaped before embedding them into scripts to prevent similar XSS issues.
Potential Impact
The primary impact of CVE-2026-1721 is the compromise of user session security through reflected XSS, which can lead to the theft of sensitive user data such as chat histories with AI language models. This data may contain confidential or proprietary information, posing privacy and intellectual property risks. Furthermore, attackers gaining access to connected MCP servers can perform unauthorized actions, potentially disrupting services, manipulating data, or escalating privileges within those systems. The attack vector requires user interaction but no authentication, making it feasible to target a broad user base via phishing or social engineering. Organizations relying on the affected AI Playground platform or agents-sdk risk exposure of user data and unauthorized server access, which can damage reputation, lead to regulatory penalties, and incur remediation costs. The high scope impact indicates that the vulnerability affects multiple components beyond the initial web application, increasing the potential damage. Although no known exploits are currently reported in the wild, the medium CVSS score and ease of exploitation warrant prompt attention.
Mitigation Recommendations
To mitigate CVE-2026-1721, organizations and developers should immediately upgrade to agents-sdk version 0.3.10, which includes the necessary fixes to properly escape user-controlled input in the OAuth callback handler. For those maintaining custom OAuth callback implementations, it is critical to implement rigorous input validation and output encoding, especially escaping any data interpolated into inline script tags to prevent XSS. Employ Content Security Policy (CSP) headers that restrict script execution sources and disallow inline scripts where feasible to reduce the impact of potential XSS vulnerabilities. Additionally, implement security awareness training to educate users about the risks of clicking suspicious links, as exploitation requires user interaction. Regularly audit and test web applications for XSS vulnerabilities using automated scanners and manual penetration testing to identify and remediate similar issues proactively. Monitoring logs for unusual access patterns to MCP servers can help detect exploitation attempts early. Finally, maintain up-to-date dependencies and apply security patches promptly to minimize exposure.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- cloudflare
- Date Reserved
- 2026-01-30T20:12:22.668Z
- Cvss Version
- 4.0
- State
- PUBLISHED
Threat ID: 698e8a20c9e1ff5ad87f7e82
Added to database: 2/13/2026, 2:19:12 AM
Last enriched: 2/27/2026, 11:04:28 PM
Last updated: 3/30/2026, 12:32:01 AM
Views: 124
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
External Links
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.