OpenClaw: Unsanitized CWD path injection into LLM prompts
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.
Affected software
Click a technology to see all vulnerabilities affecting it.
| Platform | Package | Vulnerable versions | Fixed in |
|---|---|---|---|
| npm package | openclaw | < 2026.2.15 | 2026.2.15 |
References
- https://github.com/openclaw/openclaw/security/advisories/GHSA-2qj5-gwg2-xwc4
- https://nvd.nist.gov/vuln/detail/CVE-2026-27001
- https://github.com/openclaw/openclaw/commit/6254e96acf16e70ceccc8f9b2abecee44d606f79
- https://github.com/openclaw/openclaw
- https://github.com/openclaw/openclaw/releases/tag/v2026.2.15
- CVSS vector
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- Weakness (CWE)
CWE-77- Platform
- npm
- Package
openclaw- Disclosed
- 18.02.2026
- Updated
- 11.10.2026 10:22
Sources and licenses
OSV / GitHub Advisory Database - GHSA-2qj5-gwg2-xwc4 - CC BY 4.0
Vulnerability history: openclaw
All published vulnerabilities of this package (npm package), newest first. Shows whether this is a one-off slip or a package that needs watching.
- Total entries
- 588
- First → latest
- 02.2026 07.2026
- Without a fix
- 9
- Exploited in attacks
- 0
Severity breakdown
- Critical 20
- High 215
- Medium 299
- Low 54
Disclosures per year
- 2026: 588
-
OpenClaw: Unsanitized CWD path injection into LLM prompts this entry
Know which vulnerabilities affect your application
With the DockRay integration and software inventory enabled, DockRay checks reported component versions against known vulnerabilities and notifies you about confirmed matches. Coverage depends on the supported technology and available advisory data.