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
innerHTMLfor 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
innerHTMLfor 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.

