GHSA-r294-2894-92j3: Openclaw Cross-Site Scripting Vulnerability

MODERATE
CWE-79
Published
Advisory Summary

GHSA-r294-2894-92j3 is a MODERATE cross-site scripting vulnerability (CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')) affecting Openclaw libraries in the npm ecosystem. The issue involves openclaw has stored xss in exported session html viewer via markdown/raw-html rendering. Remediation is available by upgrading affected packages to version 2026.2.23.

GHSA-r294-2894-92j3 at a Glance

CVE Identifier N/A
GHSA Identifier GHSA-r294-2894-92j3
Severity MODERATE
CVSS v3.1 Base Score N/A
CWE Classification CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
Affected Product Openclaw
Package Ecosystem npm
Published Date
Last Updated

How to Fix GHSA-r294-2894-92j3

To remediate this vulnerability, upgrade all affected Openclaw dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

openclaw fixed: 2026.2.23
npm install openclaw@2026.2.23
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

npm ls openclaw

How to Check if You Are Affected

To determine whether your Node.js application is affected by GHSA-r294-2894-92j3, inspect your project dependencies using npm:

npm ls openclaw

Analyze the terminal output to locate any version of Openclaw in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2026.2.23), your application is affected.

Note: The npm ls openclaw command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting'), where the product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users. In Openclaw, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

## Summary The exported session HTML viewer allowed stored XSS when untrusted session content included raw HTML markdown tokens or unescaped metadata fields. ## Impact Opening a crafted exported HTML session could execute attacker-controlled JavaScript in the viewer context. This can expose session content in the page and enable phishing or UI spoofing in the trusted export view. ## Affected Packages / Versions - Package: `openclaw` (npm) - Affected versions: `<= 2026.2.22-2` - Patched version (released): `>= 2026.2.23` ## Technical Details The exporter rendered markdown with `marked.parse(...)` and inserted HTML via `innerHTML`, but did not override the `html` renderer token path. Raw HTML (for example `<img ... onerror=...>`) was passed through. Additional tree/header metadata fields were interpolated without escaping in the export template. ## Reproduction 1. Create a session containing content like `<img src=x onerror=alert(1)>`. 2. Export the session to HTML. 3. Open the exported file. 4. Observe script execution from injected content. ## Remediation - Added a `marked` `html(token)` renderer override that escapes raw HTML tokens. - Escaped previously unescaped tree/header metadata fields in the export template. - Added image MIME sanitization for exported data-URL image rendering. - Added regression tests for markdown/token and metadata escaping paths. ## Fix Commit(s) - `f8524ec77a3999d573e6c6b8a5055bf35c49a2e6` ## Release Process Note `patched_versions` is pre-set to the released version (`>= 2026.2.23`). This advisory now reflects released fix version `2026.2.23`. OpenClaw thanks @allsmog for reporting.

GHSA-r294-2894-92j3 Affected Openclaw Versions

1 component(s)
Fixed Versions:
2026.2.23
Product / Package Ecosystem Affected Versions Fixed Version
openclaw
npm
< 2026.2.23
2026.2.23

References

Frequently Asked Questions

What is GHSA-r294-2894-92j3?
GHSA-r294-2894-92j3 is a security vulnerability in Openclaw involving OpenClaw has stored XSS in exported session HTML viewer via markdown/raw-HTML rendering under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting').
Which Openclaw versions are affected?
Affected versions include releases prior to 2026.2.23 across affected packages: openclaw.
What version fixes GHSA-r294-2894-92j3?
Upgrading to 2026.2.23 (or the latest patched release for your respective branch) resolves the vulnerability.
Is openclaw affected?
Yes, openclaw is affected in releases prior to 2026.2.23. Upgrade your dependency to 2026.2.23 or later.
What CWE is associated with GHSA-r294-2894-92j3?
GHSA-r294-2894-92j3 is classified under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') (The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.).
How can I check npm dependencies for GHSA-r294-2894-92j3?
Run the dependency tree command: 'npm ls openclaw'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-r294-2894-92j3",
  "modified" : "2026-03-03T22:09:26Z",
  "published" : "2026-03-03T22:09:26Z",
  "aliases" : [ ],
  "summary" : "OpenClaw has stored XSS in exported session HTML viewer via markdown/raw-HTML rendering",
  "details" : "## Summary\n\nThe exported session HTML viewer allowed stored XSS when untrusted session content included raw HTML markdown tokens or unescaped metadata fields.\n\n## Impact\n\nOpening a crafted exported HTML session could execute attacker-controlled JavaScript in the viewer context. This can expose session content in the page and enable phishing or UI spoofing in the trusted export view.\n\n## Affected Packages / Versions\n\n- Package: `openclaw` (npm)\n- Affected versions: `<= 2026.2.22-2`\n- Patched version (released): `>= 2026.2.23`\n\n## Technical Details\n\nThe exporter rendered markdown with `marked.parse(...)` and inserted HTML via `innerHTML`, but did not override the `html` renderer token path. Raw HTML (for example `<img ... onerror=...>`) was passed through. Additional tree/header metadata fields were interpolated without escaping in the export template.\n\n## Reproduction\n\n1. Create a session containing content like `<img src=x onerror=alert(1)>`.\n2. Export the session to HTML.\n3. Open the exported file.\n4. Observe script execution from injected content.\n\n## Remediation\n\n- Added a `marked` `html(token)` renderer override that escapes raw HTML tokens.\n- Escaped previously unescaped tree/header metadata fields in the export template.\n- Added image MIME sanitization for exported data-URL image rendering.\n- Added regression tests for markdown/token and metadata escaping paths.\n\n## Fix Commit(s)\n\n- `f8524ec77a3999d573e6c6b8a5055bf35c49a2e6`\n\n## Release Process Note\n\n`patched_versions` is pre-set to the released version (`>= 2026.2.23`). This advisory now reflects released fix version `2026.2.23`.\n\nOpenClaw thanks @allsmog for reporting.",
  "severity" : [ {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "openclaw"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "2026.2.23"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/openclaw/openclaw/security/advisories/GHSA-r294-2894-92j3"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/openclaw/openclaw/commit/f8524ec77a3999d573e6c6b8a5055bf35c49a2e6"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/openclaw/openclaw"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-79" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-03-03T22:09:26Z",
    "nvd_published_at" : null
  }
}