Free AI Safety Workshop — in collaboration with explainx.aiSave your seat
AgentbeamBeta
AI agent vulnerability · OpenClaw

CVE-2026-27001: OpenClaw: Unsanitized CWD path injection into LLM prompts

highCVSS 4.0 8.6GHSA-2qj5-gwg2-xwc4

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.

Published Feb 18, 2026 · Updated Feb 20, 2026

Affected packages

openclaw

Ecosystem
npm
Affected
< 2026.2.15
Fixed in
2026.2.15
Check
npm ls openclaw

Advisory details

From the GitHub Advisory Database (CC BY 4.0).

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.

Credited to aether-ai-agent.

References

How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. No analysis has been written for this entry yet. Methodology

More OpenClaw vulnerabilities

All OpenClaw entries