/

CVE-2026-32055

Severity:

HIGH RISK

(7.6)

Path Traversal in OpenClaw Workspace Validation

CVE-2026-32055

Analyzed

Vulnerability type

Category:

Path Traversal

CWE:

CWE-22

Impact:

Arbitrary File Write Outside Intended Workspace

Severity:

HIGH RISK

(7.6)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

OpenClaw versions prior to 2026.2.26 contain a path traversal vulnerability in their workspace boundary validation logic, allowing file writes to escape the intended workspace directory.

By using in-workspace symlinks that point to non-existent targets outside the root, an attacker can cause the first write operation to create files in arbitrary filesystem locations.

Affected context

This issue arises in environments where OpenClaw manages a filesystem-based workspace and enforces a logical root directory for all file operations.

The vulnerability is triggered when the application follows symlinks that reside inside the workspace but resolve to paths outside the workspace root, especially when the symlink target does not initially exist.

Systems that rely on OpenClaw to confine build artifacts, logs, or generated files to a specific directory are particularly exposed.

Exploit preconditions

  • Attack surface: File-creation or file-write operations performed through OpenClaw within a configured workspace.
  • Required access: Ability to create or control symlinks and initiate write operations inside the workspace (e.g., via project files, build scripts, or user-controlled inputs).
  • Trigger point: A write operation to a path that traverses through an in-workspace symlink whose target resolves outside the workspace root and may not yet exist.
  • Why exploitation is possible: The boundary validation logic performs incomplete or incorrect resolution of symlinks and aliases before the first write, allowing the initial creation step to bypass workspace root checks and land outside the trusted directory.

Why this happens

The root cause is an improper restriction of filesystem paths (CWE-22) due to incomplete path normalization and symlink resolution in the workspace boundary check.

The validation logic likely assumes that checking the apparent path under the workspace or resolving paths only after certain filesystem operations is sufficient, but it fails to fully resolve symlinks to their canonical, absolute targets before authorizing file creation.

As a result, an attacker can construct an in-workspace symlink that logically points outside the workspace; when OpenClaw attempts the first write through this symlink, it effectively escapes the workspace boundary and creates files wherever the underlying OS permits.

Potential impact

  • Creation of arbitrary files outside the intended workspace directory.
  • Overwriting or clobbering of existing files accessible to the OpenClaw process (e.g., configuration files, logs, or scripts).
  • Planting malicious files or executables that may later be executed by other services or users.
  • Pollution of build or deployment environments, potentially influencing subsequent builds or system behavior.
  • Escalation of impact when combined with other weaknesses, such as services that automatically load or execute files from predictable locations.

General mitigation guidance

Effective mitigation focuses on robust filesystem boundary enforcement and conservative handling of symlinks:

  • Resolve all user-supplied and workspace-relative paths to their canonical absolute paths (e.g., via realpath-like mechanisms) before allowing file creation, ensuring that the final resolved path remains under the configured workspace root.
  • Treat symlinks as untrusted by default within the workspace; consider blocking writes through symlinks, or applying stricter checks when symlinks are involved.
  • Enforce a strict check that no directory traversal (..) or indirect resolution can escape the workspace root, even when paths or targets do not yet exist.
  • Separate privileges so that the OpenClaw process runs with the least filesystem rights needed, limiting the damage if boundary checks fail.
  • Apply defense-in-depth policies such as restricting write access to sensitive directories at the operating system level (e.g., using filesystem permissions, mount options, or container isolation).

How teams detect issues like this

Organizations can look for this class of issue and its symptoms through:

  • Static analysis and code review:
  • Flag file operations that join workspace roots with untrusted input without canonicalization.
  • Identify uses of filesystem APIs that follow symlinks (open, create, write) where the resolved path is not revalidated against the workspace root.
  • Review boundary-checking functions to confirm they operate on normalized, canonical paths rather than raw or partially processed paths.
  • Runtime monitoring:
  • Audit filesystem writes originating from the OpenClaw process and alert when writes occur outside configured workspace directories.
  • Use OS-level auditing tools or container runtime policies (e.g., seccomp/AppArmor/SELinux) to log or block unexpected write destinations.
  • Policy enforcement in CI/CD:
  • Integrate automated checks or security linters into pipelines to detect insecure path handling patterns.
  • Periodically run filesystem integrity checks to discover unexpected files created in sensitive paths.

Sources

SourceLink
github.comgithub.com/openclaw/openclaw/commit/1aef45bc060b28a0af45a67dc66acd36aef763c9
github.comgithub.com/openclaw/openclaw/commit/46eba86b45e9db05b7b792e914c4fe0de1b40a23
github.comgithub.com/openclaw/openclaw/security/advisories/GHSA-mgrq-9f93-wpp5
vulncheck.comvulncheck.com/advisories/openclaw-workspace-path-boundary-bypass-via-non-existent-symlink

Frequently asked

questions

It can be remotely exploitable if OpenClaw is exposed through services or APIs that allow remote users to control workspace contents or trigger file writes. In local-only deployments, exploitation is typically limited to users or processes that already have access to the workspace.

The attacker must be able to create or influence symlinks and initiate write operations via OpenClaw within the workspace. This might occur through project files, build configuration, or other data that OpenClaw processes.

The safest pattern is to canonicalize every intended file path (fully resolving ./.. segments and symlinks) before creating or opening files, then verify that the canonical path resides within the configured workspace root. If it does not, the operation should be rejected.

Adopt a consistent policy for path handling that treats all external input as untrusted, always resolves to canonical paths, and enforces directory boundaries at the final resolved path. Combine this with least-privilege filesystem permissions and automated review tools that highlight unsafe path concatenation and symlink-following patterns.

Find out what's already
exploitable in your codebase.