CVE-2026-27001: OpenClaw Unsanitized CWD Path Injection Into Vulnerability

HIGH
Advisory Identifier: GHSA-2qj5-gwg2-xwc4
CWE-77
Published
Advisory Summary

CVE-2026-27001 is a HIGH unsanitized cwd path injection into vulnerability (CWE-77: Improper Neutralization of Special Elements used in a Command ('Command Injection')) affecting OpenClaw libraries in the npm ecosystem. The issue involves unsanitized cwd path injection into llm prompts. Remediation is available by upgrading affected packages to version 2026.2.15.

CVE-2026-27001 at a Glance

CVE Identifier CVE-2026-27001
GHSA Identifier GHSA-2qj5-gwg2-xwc4
Severity HIGH
CVSS v3.1 Base Score N/A
CWE Classification CWE-77: Improper Neutralization of Special Elements used in a Command ('Command Injection')
Affected Product OpenClaw
Package Ecosystem npm
Published Date
Last Updated

How to Fix CVE-2026-27001

To remediate this vulnerability, upgrade all affected OpenClaw dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

openclaw fixed: 2026.2.15
npm install openclaw@2026.2.15
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

npm ls openclaw

How to Check if You Are Affected

To determine whether your Node.js application is affected by CVE-2026-27001, inspect your project dependencies using npm:

npm ls openclaw

Analyze the terminal output to locate any version of OpenClaw in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2026.2.15), your application is affected.

Note: The npm ls openclaw command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-77: Improper Neutralization of Special Elements used in a Command ('Command Injection'), where the product constructs all or part of a command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended command when it is sent to a downstream component. In OpenClaw, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

## 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.

CVE-2026-27001 Affected OpenClaw Versions

1 component(s)
Fixed Versions:
2026.2.15
Product / Package Ecosystem Affected Versions Fixed Version
openclaw
npm
< 2026.2.15
2026.2.15

References

Frequently Asked Questions

What is CVE-2026-27001?
CVE-2026-27001 is a security vulnerability in OpenClaw involving Unsanitized CWD path injection into LLM prompts under CWE-77: Improper Neutralization of Special Elements used in a Command ('Command Injection').
Which OpenClaw versions are affected?
Affected versions include releases prior to 2026.2.15 across affected packages: openclaw.
What version fixes CVE-2026-27001?
Upgrading to 2026.2.15 (or the latest patched release for your respective branch) resolves the vulnerability.
Is openclaw affected?
Yes, openclaw is affected in releases prior to 2026.2.15. Upgrade your dependency to 2026.2.15 or later.
What CWE is associated with CVE-2026-27001?
CVE-2026-27001 is classified under CWE-77: Improper Neutralization of Special Elements used in a Command ('Command Injection') (The product constructs all or part of a command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended command when it is sent to a downstream component.).
How can I check npm dependencies for CVE-2026-27001?
Run the dependency tree command: 'npm ls openclaw'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-2qj5-gwg2-xwc4",
  "modified" : "2026-02-20T16:46:56Z",
  "published" : "2026-02-18T22:42:29Z",
  "aliases" : [ "CVE-2026-27001" ],
  "summary" : "OpenClaw: Unsanitized CWD path injection into LLM prompts",
  "details" : "## Overview\nOpenClaw 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.\n\n## Impact\nPrompt injection may alter agent behavior and could lead to unintended tool use or disclosure of sensitive information.\n\n## Affected Packages / Versions\n- Package: `openclaw` (npm)\n- Vulnerable versions: `< 2026.2.15` (latest published vulnerable version as of 2026-02-16: `2026.2.14`)\n- Patched versions: `>= 2026.2.15`\n\n## Fix\nThe 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.\n\n## Fix Commit(s)\n- `6254e96acf16e70ceccc8f9b2abecee44d606f79`\n\nThanks @aether-ai-agent for reporting.",
  "severity" : [ {
    "type" : "CVSS_V4",
    "score" : "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"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "openclaw"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "2026.2.15"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/openclaw/openclaw/security/advisories/GHSA-2qj5-gwg2-xwc4"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-27001"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/openclaw/openclaw/commit/6254e96acf16e70ceccc8f9b2abecee44d606f79"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/openclaw/openclaw"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/openclaw/openclaw/releases/tag/v2026.2.15"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-77" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-02-18T22:42:29Z",
    "nvd_published_at" : "2026-02-20T00:16:16Z"
  }
}