/

CVE-2026-66418

Severity:

CRITICAL RISK

(9.3)

Stored XSS (CWE-79) in OpenClaw Dashboard Logs

CVE-2026-66418

Analyzed

Vulnerability type

Category:

Cross-Site Scripting (Stored XSS)

CWE:

CWE-79

Impact:

Session Compromise and Administrative Account Abuse

Severity:

CRITICAL RISK

(9.3)

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

OpenClaw Dashboard v3.0.0 contains a stored cross-site scripting flaw where attacker-controlled usernames from failed logins are written directly into the audit log and later rendered unsafely in the admin notification panel.

An unauthenticated attacker can inject arbitrary HTML and script payloads that execute in an administrator's browser session, allowing interaction with privileged endpoints such as configuration changes and agent instruction file editing.

OpenClaw Dashboard v3.0.0 contains a stored cross-site scripting flaw where attacker-controlled usernames from failed logins are written directly into the audit log and later rendered unsafely in the admin notification panel.

An unauthenticated attacker can inject arbitrary HTML and script payloads that execute in an administrator's browser session, allowing interaction with privileged endpoints such as configuration changes and agent instruction file editing.

Affected context

The vulnerability exists in the OpenClaw Dashboard audit and notification logging feature.

When a failed login occurs, the submitted username value is recorded verbatim into the audit log without sanitization or encoding.

Administrators later view these log entries via the notification panel, where entries are rendered using innerHTML in a page governed by a permissive Content-Security-Policy that permits inline event handlers.

In deployments where anonymous users can access the login page, this creates an untrusted input channel directly into an administrator-facing view.

The vulnerability exists in the OpenClaw Dashboard audit and notification logging feature.

When a failed login occurs, the submitted username value is recorded verbatim into the audit log without sanitization or encoding.

Administrators later view these log entries via the notification panel, where entries are rendered using innerHTML in a page governed by a permissive Content-Security-Policy that permits inline event handlers.

In deployments where anonymous users can access the login page, this creates an untrusted input channel directly into an administrator-facing view.

Exploit preconditions

  • Attack surface: Public or internal web interface exposing the OpenClaw Dashboard login page.
  • Required access: No authentication required; attacker only needs the ability to submit crafted login POST requests.
  • Trigger point: Administrator opens or refreshes the notification panel or any UI element that renders the stored audit log entries using innerHTML.
  • Why exploitation is possible:
  • User input (username field) from failed logins is stored without output encoding.
  • The stored value is later injected into the DOM using innerHTML, treating it as active HTML.
  • The Content-Security-Policy is permissive enough to allow inline script execution via event handlers and similar constructs.
  • Attack surface: Public or internal web interface exposing the OpenClaw Dashboard login page.
  • Required access: No authentication required; attacker only needs the ability to submit crafted login POST requests.
  • Trigger point: Administrator opens or refreshes the notification panel or any UI element that renders the stored audit log entries using innerHTML.
  • Why exploitation is possible:
  • User input (username field) from failed logins is stored without output encoding.
  • The stored value is later injected into the DOM using innerHTML, treating it as active HTML.
  • The Content-Security-Policy is permissive enough to allow inline script execution via event handlers and similar constructs.

Why this happens

This vulnerability stems from improper neutralization of untrusted input before it is included in a web page, aligning with CWE-79: Improper Neutralization of Input During Web Page Generation (Cross-Site Scripting).

The application logs the username field directly into the audit store and later renders that data using innerHTML, which interprets the stored value as HTML rather than text.

Combined with a permissive CSP that allows inline event handlers, attacker-supplied markup can execute as script in the administrator's browser.

Conceptually, this is a stored XSS pattern where data flows from an untrusted input (public login form) to a high-privilege sink (admin UI) without appropriate encoding or context-aware output handling.

This vulnerability stems from improper neutralization of untrusted input before it is included in a web page, aligning with CWE-79: Improper Neutralization of Input During Web Page Generation (Cross-Site Scripting).

The application logs the username field directly into the audit store and later renders that data using innerHTML, which interprets the stored value as HTML rather than text.

Combined with a permissive CSP that allows inline event handlers, attacker-supplied markup can execute as script in the administrator's browser.

Conceptually, this is a stored XSS pattern where data flows from an untrusted input (public login form) to a high-privilege sink (admin UI) without appropriate encoding or context-aware output handling.

Potential impact

  • Attacker-controlled script may execute in the administrator's browser session.
  • Malicious code could perform privileged actions against authenticated endpoints, such as editing agent instruction files or modifying configuration settings.
  • Administrative account abuse, including creation or modification of user accounts and roles.
  • Exfiltration of sensitive data accessible via the dashboard, including configuration details and operational telemetry.
  • Establishment of persistent browser-based backdoors targeting administrators who access the dashboard.
  • Attacker-controlled script may execute in the administrator's browser session.
  • Malicious code could perform privileged actions against authenticated endpoints, such as editing agent instruction files or modifying configuration settings.
  • Administrative account abuse, including creation or modification of user accounts and roles.
  • Exfiltration of sensitive data accessible via the dashboard, including configuration details and operational telemetry.
  • Establishment of persistent browser-based backdoors targeting administrators who access the dashboard.

General mitigation guidance

Effective mitigation typically centers on context-aware output encoding, input handling discipline, and browser-side policy hardening:

  • Encode all untrusted data before insertion into HTML, attributes, or script contexts; avoid using innerHTML for log or notification rendering and prefer safe text insertion APIs.
  • Treat all log data as untrusted, even if originating from internal components, and ensure consistent encoding on every output path.
  • Apply strict Content-Security-Policy rules that disallow inline scripts and inline event handlers, favoring nonces or hashes tied to static script resources.
  • Separate presentation and data concerns by rendering logs via templates that escape output by default.
  • Enforce least-privilege principles in the web application so that administrative actions are tightly scoped, limiting the blast radius of any XSS.

Effective mitigation typically centers on context-aware output encoding, input handling discipline, and browser-side policy hardening:

  • Encode all untrusted data before insertion into HTML, attributes, or script contexts; avoid using innerHTML for log or notification rendering and prefer safe text insertion APIs.
  • Treat all log data as untrusted, even if originating from internal components, and ensure consistent encoding on every output path.
  • Apply strict Content-Security-Policy rules that disallow inline scripts and inline event handlers, favoring nonces or hashes tied to static script resources.
  • Separate presentation and data concerns by rendering logs via templates that escape output by default.
  • Enforce least-privilege principles in the web application so that administrative actions are tightly scoped, limiting the blast radius of any XSS.

How teams detect issues like this

Detection generally involves a mix of review, scanning, and policy checks:

  • Use static analysis or linters to flag dangerous DOM sinks such as innerHTML, outerHTML, and similar APIs when used with dynamic or log-derived data.
  • Incorporate code review checklists that explicitly verify context-appropriate encoding for any data originating from user inputs or logs.
  • Employ dynamic application security testing (DAST) tools that probe for stored XSS by injecting markers into login and form fields and later scanning admin views.
  • Monitor CSP violation reports and browser console errors in controlled environments to detect unexpected script execution attempts.
  • Integrate security-focused testing into CI/CD pipelines to automatically catch new or changed paths where user input reaches an HTML rendering context.

Detection generally involves a mix of review, scanning, and policy checks:

  • Use static analysis or linters to flag dangerous DOM sinks such as innerHTML, outerHTML, and similar APIs when used with dynamic or log-derived data.
  • Incorporate code review checklists that explicitly verify context-appropriate encoding for any data originating from user inputs or logs.
  • Employ dynamic application security testing (DAST) tools that probe for stored XSS by injecting markers into login and form fields and later scanning admin views.
  • Monitor CSP violation reports and browser console errors in controlled environments to detect unexpected script execution attempts.
  • Integrate security-focused testing into CI/CD pipelines to automatically catch new or changed paths where user input reaches an HTML rendering context.

Sources

SourceLink
github.comgithub.com/theopaid/Unauthenticated-Stored-Cross-Site-Scripting-Leading-To-Administrator-Account-Takeover
github.comgithub.com/tugcantopaloglu/openclaw-dashboard
vulncheck.comvulncheck.com/advisories/openclaw-dashboard-stored-xss-via-failed-login-username-field

Frequently asked

questions

Yes. An unauthenticated attacker can exploit this vulnerability remotely by sending crafted failed login requests; exploitation completes when an administrator later views the affected notification panel in a browser.

No valid credentials are required. The only prerequisite is the ability to reach the OpenClaw Dashboard login endpoint and submit POST requests with crafted username values.

Adopt a consistent output encoding strategy for all untrusted data, especially log entries, and avoid using innerHTML or other HTML-parsing sinks with user-controlled input. Render log values as plain text and tighten the Content-Security-Policy to disallow inline scripts and event handlers.

Establish secure coding guidelines that treat every user-supplied or log-stored field as untrusted, enforce context-aware escaping in templates, and use automated static and dynamic analysis tools to flag XSS-prone patterns during development and code review. Regular security training and threat modeling around admin interfaces also help identify risky data flows early.

Yes. An unauthenticated attacker can exploit this vulnerability remotely by sending crafted failed login requests; exploitation completes when an administrator later views the affected notification panel in a browser.

No valid credentials are required. The only prerequisite is the ability to reach the OpenClaw Dashboard login endpoint and submit POST requests with crafted username values.

Adopt a consistent output encoding strategy for all untrusted data, especially log entries, and avoid using innerHTML or other HTML-parsing sinks with user-controlled input. Render log values as plain text and tighten the Content-Security-Policy to disallow inline scripts and event handlers.

Establish secure coding guidelines that treat every user-supplied or log-stored field as untrusted, enforce context-aware escaping in templates, and use automated static and dynamic analysis tools to flag XSS-prone patterns during development and code review. Regular security training and threat modeling around admin interfaces also help identify risky data flows early.

Find out what's already
exploitable in your codebase.