Openclaw cli: OpenClaw: Unsanitized CWD path injection into LLM prompts (CVE-2026-27001)
Description
OpenClaw CLI versions before 2026.2.15 embed the current working directory path into LLM prompts without sanitization. This allows an attacker who can control the directory name to inject control or format characters, potentially altering the prompt structure and injecting malicious instructions. The vulnerability was patched in version 2026.2.15 by sanitizing the workspace path to remove such characters.
CVSS v4.0
Affected software
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
OpenClaw CLI embedded the current working directory (workspace path) into the agent system prompt without sanitization. If an attacker causes OpenClaw to run inside a directory whose name contains control or format characters (e.g., newlines, Unicode bidi or zero-width markers), these characters can break the prompt structure and inject attacker-controlled instructions. This prompt injection could alter agent behavior, potentially leading to unintended tool use or disclosure of sensitive information. The vulnerability affects openclaw npm package versions before 2026.2.15. The issue was fixed by sanitizing the workspace path before embedding it into LLM prompts, stripping Unicode control and format characters and line/paragraph separators.
Potential Impact
Prompt injection may alter the behavior of the OpenClaw agent, potentially causing it to execute unintended commands or disclose sensitive information. This could undermine the integrity and confidentiality of operations performed by the agent.
Mitigation Recommendations
A patch is available in openclaw version 2026.2.15 and later, which sanitizes the workspace path to remove control and format characters before embedding it into LLM prompts. Users should upgrade to version 2026.2.15 or later to remediate this vulnerability.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- BREW-openclaw-cli-CVE-2026-27001
- Osv Schema Version
- 1.7.3
- Ecosystems
- ["Homebrew"]
- Cvss Version
- 4.0
Threat ID: 6ac245dd12601ec6a31684cc
Added to database: 10/04/2026, 12:26:05 UTC
Last enriched: 10/04/2026, 13:23:18 UTC
Last updated: 10/04/2026, 16:08:37 UTC
Views: 4
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.