GHSA-2qj5-gwg2-xwc4

Suggest an improvement
Source
https://github.com/advisories/GHSA-2qj5-gwg2-xwc4
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/02/GHSA-2qj5-gwg2-xwc4/GHSA-2qj5-gwg2-xwc4.json
JSON Data
https://api.osv.dev/v1/vulns/GHSA-2qj5-gwg2-xwc4
Aliases
Published
2026-02-18T22:42:29Z
Modified
2026-02-20T16:54:10.404629Z
Severity
  • 8.6 (High) CVSS_V4 - CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N CVSS Calculator
Summary
OpenClaw: Unsanitized CWD path injection into LLM prompts
Details

Overview

OpenClaw embedded the current working directory (workspace path) into the agent system prompt without sanitization. If an attacker can cause OpenClaw to run inside a directory whose name contains control/format characters (for example newlines or Unicode bidi/zero-width markers), those characters could break the prompt structure and inject attacker-controlled instructions.

Impact

Prompt injection may alter agent behavior and could lead to unintended tool use or disclosure of sensitive information.

Affected Packages / Versions

  • Package: openclaw (npm)
  • Vulnerable versions: < 2026.2.15 (latest published vulnerable version as of 2026-02-16: 2026.2.14)
  • Patched versions: >= 2026.2.15

Fix

The workspace path is now sanitized before it is embedded into any LLM prompt output, stripping Unicode control/format characters and explicit line/paragraph separators. Workspace path resolution also applies the same sanitization as defense-in-depth.

Fix Commit(s)

  • 6254e96acf16e70ceccc8f9b2abecee44d606f79

Thanks @aether-ai-agent for reporting.

Database specific
{
    "github_reviewed": true,
    "github_reviewed_at": "2026-02-18T22:42:29Z",
    "cwe_ids": [
        "CWE-77"
    ],
    "severity": "HIGH",
    "nvd_published_at": "2026-02-20T00:16:16Z"
}
References

Affected packages

npm / openclaw

Package

Affected ranges

Type
SEMVER
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
2026.2.15

Database specific

source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/02/GHSA-2qj5-gwg2-xwc4/GHSA-2qj5-gwg2-xwc4.json"