Mar 3, 2026·5 min read·24 visits
Unsafe TAR/ZIP extraction in OpenClaw allows arbitrary file overwrite via directory traversal. Fixed in version 2026.2.14.
OpenClaw versions prior to 2026.2.14 contain a critical path traversal vulnerability, commonly known as 'Zip Slip', within the archive extraction and browser tool file handling components. This flaw allows remote attackers to write arbitrary files to the host filesystem by providing malicious archives or filenames containing directory traversal sequences. Successful exploitation can lead to Remote Code Execution (RCE) by overwriting sensitive configuration files or executables.
OpenClaw, an open-source automation tool, utilizes archive extraction for managing "skills" (plugins) and handling browser-based file downloads. A vulnerability exists in the src/infra/archive.ts and src/agents/skills-install.ts components where the application fails to validate the destination path of extracted files.
This flaw is a classic instance of "Zip Slip" (CWE-22). When the application processes a compressed archive (ZIP or TAR), it extracts entries based on the filenames specified within the archive headers. If an attacker crafts an archive containing files with directory traversal sequences in their names (e.g., ../../../../root/.ssh/authorized_keys), OpenClaw blindly follows these paths during extraction.
The vulnerability extends to the browser tool's file handling, where the suggestedFilename from remote servers was not sanitized, allowing malicious websites to trigger downloads that write to arbitrary system locations relative to the OpenClaw execution context.
The root cause of this vulnerability is the absence of canonical path validation during file extraction and creation. The application relied on high-level extraction commands (tar.x, unzip) or naive file writing logic without verifying that the resolved destination path resided within the intended directory.
In a secure implementation, an extraction routine must:
OpenClaw skipped this verification step. Specifically, in src/agents/skills-install.ts, downloaded skill archives were extracted directly. Consequently, the filesystem API accepted relative paths in filenames, processing them relative to the current working directory or the extraction root, allowing escape from the intended sandbox.
The vulnerability was addressed in commit 3aa94afcfd12104c683c9cad81faf434d0dadf87 by introducing strict path confinement checks. The developers implemented a new validation layer that inspects every file entry before it is written to the disk.
The fix introduces validateArchiveEntryPath and resolveCheckedOutPath. These functions enforce that all filesystem operations are confined to a safe directory.
Conceptual Patch Logic:
// VULNERABLE LOGIC (Conceptual)
// Archives were extracted without checking entry paths
function extract(archivePath, targetDir) {
// Implicitly trusts that archive entries are safe
exec(`tar -xf ${archivePath} -C ${targetDir}`);
}
// PATCHED LOGIC (Conceptual)
function extractSecurely(archivePath, targetDir) {
const resolvedTarget = path.resolve(targetDir);
// Iterate entries and validate before extraction
for (const entry of archiveEntries) {
const destination = path.resolve(targetDir, entry.path);
// CRITICAL FIX: Ensure the destination is inside the target
if (!destination.startsWith(resolvedTarget)) {
throw new Error("Zip Slip detected: Path traversal attempt");
}
// Additional hardening: Reject symlinks to prevent logical traversal
if (entry.isSymlink()) {
throw new Error("Symlinks not allowed in untrusted archives");
}
}
}The patch also includes preflight scanning for TAR archives (using tar tf) to list and validate entries prior to invoking the extraction command, ensuring that the tar binary does not process malicious paths.
Exploitation requires an attacker to induce the OpenClaw instance to process a malicious file. This can be achieved through two primary vectors:
suggestedFilename (e.g., ../../target).Attack Scenario:
../../../../home/node/.bashrc with a malicious payload (e.g., a reverse shell command).installSkill function.tar. The tar utility respects the relative path in the filename.~/.bashrc. The next time the user logs in or opens a shell, the payload executes.The impact of this vulnerability is rated High (CVSS 8.8). The ability to write arbitrary files to the host filesystem effectively bridges the gap between limited application access and full system compromise.
index.js) allows for persistent backdoor insertion.Since OpenClaw is an automation tool often running with significant privileges (to install packages, manage browsers, etc.), the likelihood of successful privilege escalation to root or full user compromise is high.
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H| Product | Affected Versions | Fixed Version |
|---|---|---|
OpenClaw OpenClaw | < 2026.2.14 | 2026.2.14 |
| Attribute | Detail |
|---|---|
| CWE ID | CWE-22 |
| CWE Name | Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') |
| Attack Vector | Network |
| CVSS v3.1 | 8.8 (High) |
| Impact | Arbitrary File Write / RCE |
| Exploit Status | Proof of Concept Available |
The software uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the software does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory.
A local security vulnerability in the Nuxt development server (nuxt dev) allows local unprivileged users to access sensitive configuration files and source code. On Linux environments running Node.js 20+, Nuxt bound its internal vite-node IPC server to an abstract-namespace Unix socket without any peer authentication, enabling co-resident local users to connect and request module code directly.
Mozilla Bleach is an open-source HTML sanitizing library for Python. Versions up to and including 6.3.0 contain an incomplete filtering implementation in the URI validation logic ('sanitize_uri_value'). This logic fails to detect disallowed protocols, such as 'javascript:', if they contain Unicode invisible characters, whitespace characters, or characters with a code point greater than U+00A0. While standard-compliant web browsers do not directly execute invalid URI schemes containing these non-standard characters, downstream systems that normalize Unicode text by stripping invisible or non-ASCII characters can unintentionally reactivate the 'javascript:' prefix, causing Cross-Site Scripting (XSS). Additionally, this behavior violates Bleach's core sanitization contract by outputting URIs that bypass protocol allowlists configured by the caller.
An uncontrolled resource consumption vulnerability exists in the Python package Bleach when parsing text to linkify email addresses. When `parse_email=True` is enabled, the regular expression engine is forced into a quadratic-time complexity scan on specially crafted payloads lacking an '@' symbol. This causes immediate CPU exhaustion and blocks application server worker processes.
A path traversal and sandbox escape vulnerability in LangChain and LangChain-Anthropic Python packages allows unauthenticated local attackers to access files outside the restricted directory via crafted input, symbolic links, or prefix bypasses.
The PHP Secure Communications Library (phpseclib) contains a Server-Side Request Forgery (SSRF) vulnerability due to an insecure default implementation of Authority Information Access (AIA) certificate chasing. This flaw allows remote, unauthenticated attackers to coerce applications validating user-supplied X.509 certificates into generating arbitrary outbound HTTP requests to internal networks or local interfaces.
A directory traversal vulnerability exists in the Microsoft .NET System.Formats.Tar library during archive extraction. When extracting a TAR archive using the TarFile.ExtractToDirectory API, the extraction engine improperly resolves symbolic links prior to file creation, allowing local unauthorized attackers to write or overwrite arbitrary files outside the target directory. This can lead to local tampering, privilege escalation, or arbitrary code execution.