CVE-2026-27001

OpenClaw: Unsanitized CWD path injection into LLM prompts

Published Feb 19, 2026 CVSS 4.0 · 8.6 High EPSS < 1% KEV · Not listed
Description
OpenClaw is a personal AI assistant. Prior to version 2026.2.15, 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. Starting in version 2026.2.15, the workspace path is 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.

Analysis

AI-generated

Technical impact

OpenClaw embedded the current working directory into the agent system prompt without sanitization. Because the directory name could contain control or format characters such as newlines or Unicode bidi/zero‑width markers, an attacker that can control the directory name can break the prompt structure and insert attacker‑controlled instructions. This form of flaw is an Input Injection (CWE‑77) that threatens the confidentiality and integrity of the AI assistant’s behavior, potentially allowing an attacker to direct the LLM to perform unintended actions.

Affected Systems

The vulnerability affects the OpenClaw personal AI assistant software before version 2026.2.15. All releases that embed the workspace path unsanitized are impacted. The affected platform is Node.js based, as indicated by the product metadata.

Risk and Exploitability

The CVSS base score of 8.6 classifies the flaw as high severity. The EPSS score is less than 1 %, implying a low likelihood of exploitation at the moment, and it is not listed in the CISA KEV catalog. The attack vector is inferred to require an attacker who can influence the working directory of the running OpenClaw process—typically a local or privileged user. If the attacker can induce the assistant to operate in a directory with crafted names, the unsanitized path will flow into the prompt and allow injection. No additional external access requirements are indicated in the description, so the main risk is local.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade OpenClaw to version 2026.2.15 or later where the workspace path is sanitized.
  • Ensure that the working directory used by OpenClaw does not contain control or format characters; avoid executing in directories with such characters.
  • As a temporary measure if an upgrade is not yet available, start OpenClaw from a safe, plain‑ASCII directory that does not include newlines or Unicode control markers.

Generated by OpenCVE AI on April 18, 2026 at 11:39 UTC.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Github GHSA Github GHSA GHSA-2qj5-gwg2-xwc4 OpenClaw: Unsanitized CWD path injection into LLM prompts
History
Type Values Removed Values Added
CPEs cpe:2.3:a:openclaw:openclaw:*:*:*:*:*:node.js:*:*
Metrics cvssV3_1

{'score': 7.8, 'vector': 'CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H'}

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'total'}, 'version': '2.0.3'}

Type Values Removed Values Added
First Time appeared Openclaw
Openclaw openclaw
Vendors & Products Openclaw
Openclaw openclaw
Type Values Removed Values Added
Description OpenClaw is a personal AI assistant. Prior to version 2026.2.15, 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. Starting in version 2026.2.15, the workspace path is 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.
Title OpenClaw: Unsanitized CWD path injection into LLM prompts
Weaknesses CWE-77
References
Metrics cvssV4_0

{'score': 8.6, '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'}

Weaknesses
  • CWE-77

    Improper Neutralization of Special Elements used in a Command ('Command Injection')

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Feb 20, 2026, 3:38 PM
Reserved
Feb 17, 2026, 1:41 AM
Status
Analyzed
Published
Feb 20, 2026, 12:16 AM
Modified
Jun 17, 2026, 10:26 AM