/

CVE-2026-97635

Severity:

HIGH RISK

(8.1)

Stored Cross-Site Scripting (CWE-79) in Agent Zero UI

CVE-2026-97635

Awaiting Analysis

Vulnerability type

Category:

Cross-Site Scripting

CWE:

CWE-79

Impact:

Authenticated session compromise and unauthorized actions

Severity:

HIGH RISK

(8.1)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

Agent Zero Web UI before version 1.15 does not adequately sanitize user-controlled content in chat messages or file uploads. When the interface reproduces that content, injected JavaScript may execute in the context of an authenticated victim's session.

Agent Zero Web UI before version 1.15 does not adequately sanitize user-controlled content in chat messages or file uploads. When the interface reproduces that content, injected JavaScript may execute in the context of an authenticated victim's session.

Affected context

The vulnerability occurs in Agent Zero Web UI deployments where user-provided chat content or uploaded files are later rendered in the chat interface without sufficient output encoding or sanitization. Risk is greater when an attacker can submit content that is subsequently viewed or reproduced by another authenticated user.

The vulnerability occurs in Agent Zero Web UI deployments where user-provided chat content or uploaded files are later rendered in the chat interface without sufficient output encoding or sanitization. Risk is greater when an attacker can submit content that is subsequently viewed or reproduced by another authenticated user.

Exploit preconditions

  • Attack surface: Agent Zero Web UI chat rendering and file-upload workflows
  • Required access: Ability to submit or influence chat messages or uploaded file content
  • Trigger point: A victim views or causes the affected content to be reproduced in the authenticated web interface
  • Why exploitation is possible: User-controlled content is rendered without consistently neutralizing executable browser content
  • Attack surface: Agent Zero Web UI chat rendering and file-upload workflows
  • Required access: Ability to submit or influence chat messages or uploaded file content
  • Trigger point: A victim views or causes the affected content to be reproduced in the authenticated web interface
  • Why exploitation is possible: User-controlled content is rendered without consistently neutralizing executable browser content

Why this happens

The underlying bug is improper neutralization of user-controlled input in a web page context. Content from chat messages or file uploads is reproduced without an effective combination of context-aware output encoding, sanitization, and safe rendering controls. This behavior maps to CWE-79: Improper Neutralization of Input During Web Page Generation, commonly known as Cross-Site Scripting.

The underlying bug is improper neutralization of user-controlled input in a web page context. Content from chat messages or file uploads is reproduced without an effective combination of context-aware output encoding, sanitization, and safe rendering controls. This behavior maps to CWE-79: Improper Neutralization of Input During Web Page Generation, commonly known as Cross-Site Scripting.

Potential impact

  • Malicious script execution in a victim's browser session
  • Unauthorized actions performed with the victim's Agent Zero privileges
  • Exposure of data displayed or accessible through the authenticated interface
  • Modification of chat content or application state
  • Account or workflow compromise, depending on available permissions
  • Malicious script execution in a victim's browser session
  • Unauthorized actions performed with the victim's Agent Zero privileges
  • Exposure of data displayed or accessible through the authenticated interface
  • Modification of chat content or application state
  • Account or workflow compromise, depending on available permissions

General mitigation guidance

Mitigation generally focuses on treating chat messages, file names, metadata, and uploaded content as untrusted data throughout their lifecycle.

Common defensive patterns include:

  • Applying context-aware output encoding whenever user-controlled data is inserted into HTML, attributes, URLs, or scripts
  • Using a well-maintained sanitizer with an allowlist when limited markup is required
  • Rendering untrusted content as plain text or through isolated safe document viewers
  • Validating upload types, names, and metadata while avoiding reliance on client-side checks
  • Enforcing a restrictive Content Security Policy as defense in depth
  • Limiting authenticated users and service accounts to the least privileges necessary
  • Avoiding direct HTML interpretation and unsafe DOM manipulation APIs

Mitigation generally focuses on treating chat messages, file names, metadata, and uploaded content as untrusted data throughout their lifecycle.

Common defensive patterns include:

  • Applying context-aware output encoding whenever user-controlled data is inserted into HTML, attributes, URLs, or scripts
  • Using a well-maintained sanitizer with an allowlist when limited markup is required
  • Rendering untrusted content as plain text or through isolated safe document viewers
  • Validating upload types, names, and metadata while avoiding reliance on client-side checks
  • Enforcing a restrictive Content Security Policy as defense in depth
  • Limiting authenticated users and service accounts to the least privileges necessary
  • Avoiding direct HTML interpretation and unsafe DOM manipulation APIs

How teams detect issues like this

Detection approaches can include:

  • Static analysis rules for unsafe DOM sinks, direct HTML assignment, and missing context-aware encoding
  • Code review checks covering every path from chat or upload input to browser rendering
  • Tests using harmless marker strings to verify that untrusted content is encoded or safely sanitized
  • Policy enforcement requiring approved sanitization libraries and restrictive browser security headers
  • Monitoring for unusual script-like content in submitted messages and uploaded metadata

Automated application security testing and code review tools can help identify common XSS data flows, but should complement manual review of rendering contexts.

Detection approaches can include:

  • Static analysis rules for unsafe DOM sinks, direct HTML assignment, and missing context-aware encoding
  • Code review checks covering every path from chat or upload input to browser rendering
  • Tests using harmless marker strings to verify that untrusted content is encoded or safely sanitized
  • Policy enforcement requiring approved sanitization libraries and restrictive browser security headers
  • Monitoring for unusual script-like content in submitted messages and uploaded metadata

Automated application security testing and code review tools can help identify common XSS data flows, but should complement manual review of rendering contexts.

Sources

SourceLink
github.comgithub.com/agent0ai/agent-zero/issues/943
github.comgithub.com/agent0ai/agent-zero/releases/tag/v1.15
raw.githubusercontent.comraw.githubusercontent.com/cisagov/CSAF/develop/csaf_files/IT/white/2026/va-26-296-01.json
cve.orgcve.org/CVERecord?id=CVE-2026-97635

Frequently asked

questions

It may be exploitable through the web interface when an attacker can submit content that another authenticated user later views or causes the application to reproduce.

The attacker generally needs whatever access is required to submit chat messages or upload files. The victim must typically be authenticated for session-context impact to occur.

Treat all user-controlled content as untrusted, encode it for its output context, sanitize only with a strict allowlist when necessary, and avoid interpreting untrusted data as HTML or script.

Combine secure rendering APIs, upload and input validation, restrictive Content Security Policy settings, security-focused code review, and automated XSS testing.

It may be exploitable through the web interface when an attacker can submit content that another authenticated user later views or causes the application to reproduce.

The attacker generally needs whatever access is required to submit chat messages or upload files. The victim must typically be authenticated for session-context impact to occur.

Treat all user-controlled content as untrusted, encode it for its output context, sanitize only with a strict allowlist when necessary, and avoid interpreting untrusted data as HTML or script.

Combine secure rendering APIs, upload and input validation, restrictive Content Security Policy settings, security-focused code review, and automated XSS testing.

Find out what's already
exploitable in your codebase.