CVE-2026-27001
JSON

8.6high

OpenClaw: Unsanitized CWD path injection into LLM prompts

Severity
8.6high CVSS:4.0 by GitHub_M
Exploit likelihood
0.22% (higher than 14% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
GitHub_M
Also known as
GHSA-2qj5-gwg2-xwc4

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.

Affected

Product or packageVersionsReported by
openclaw openclaw< 2026.2.15, before 2026.2.15CVE List, NVD
openclaw (npm)before 2026.2.15GitHub Advisory Database

All scores

GitHub_M8.6high CVSS:4.0CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
GitHubhigh CVSS:4.0CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
NVD7.8high CVSS:3.1CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

Classification

CWE-77

SSVC (CISA-ADP): exploitation none, automatable no, technical impact total.

What each source says

CVE List

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.

GitHub Advisory Database

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.

NVD (es)

OpenClaw es un asistente personal de IA. Antes de la versión 2026.2.15, OpenClaw incrustaba el directorio de trabajo actual (ruta del espacio de trabajo) en el prompt del sistema del agente sin saneamiento. Si un atacante puede hacer que OpenClaw se ejecute dentro de un directorio cuyo nombre contiene caracteres de control/formato (por ejemplo, saltos de línea o marcadores Unicode bidireccionales/de ancho cero), esos caracteres podrían romper la estructura del prompt e inyectar instrucciones controladas por el atacante. A partir de la versión 2026.2.15, la ruta del espacio de trabajo se sanea antes de incrustarse en cualquier salida de prompt de LLM, eliminando caracteres de control/formato Unicode y separadores explícitos de línea/párrafo. La resolución de la ruta del espacio de trabajo también aplica el mismo saneamiento como defensa en profundidad.

References

Sources

SourceRecordLicence
CVE ListCVE-2026-27001 changed 2026-02-20CVE Terms of Use
GitHub Advisory DatabaseGHSA-2qj5-gwg2-xwc4 changed 2026-02-20CC-BY-4.0
NVDCVE-2026-27001 changed 2026-06-17Public domain