CVEReports
CVEReports

Automated vulnerability intelligence platform. Comprehensive reports for high-severity CVEs generated by AI.

Product

  • Home
  • Sitemap
  • RSS Feed

Company

  • About
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 CVEReports. All rights reserved.

Made with love by Amit Schendel & Alon Barad



GHSA-P25H-9Q54-FFVW
8.8

OpenClaw Zip Slip Path Traversal in Archive Extraction

Alon Barad
Alon Barad
Software Engineer

Mar 3, 2026·5 min read·4 visits

PoC Available

Executive Summary (TL;DR)

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.

Vulnerability Overview

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.

Root Cause Analysis

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:

  1. Resolve the target directory to an absolute path.
  2. Resolve the full path of the archive entry combined with the target directory.
  3. Verify that the resolved entry path starts with the resolved target directory path.

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.

Code Analysis & Patch

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 Methodology

Exploitation requires an attacker to induce the OpenClaw instance to process a malicious file. This can be achieved through two primary vectors:

  1. Malicious Skill Installation: The attacker hosts a "skill" archive containing traversal paths. When an administrator or automated process attempts to install this skill via URL, the extraction routine triggers the overwrite.
  2. Browser Tool Interaction: If OpenClaw is directing a browser to interact with a malicious website, the site can initiate a download with a crafted suggestedFilename (e.g., ../../target).

Attack Scenario:

  1. Preparation: The attacker creates a TAR archive containing a file named ../../../../home/node/.bashrc with a malicious payload (e.g., a reverse shell command).
  2. Delivery: The attacker provides the URL of this archive to the OpenClaw installSkill function.
  3. Execution: OpenClaw downloads the archive and pipes it to tar. The tar utility respects the relative path in the filename.
  4. Compromise: The file is written to ~/.bashrc. The next time the user logs in or opens a shell, the payload executes.

Impact Assessment

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.

  • Confidentiality: Attackers may not be able to read arbitrary files directly via extraction, but they can overwrite configuration files to weaken security settings.
  • Integrity: Critical system files, source code, or application logic can be overwritten. Overwriting application scripts (e.g., index.js) allows for persistent backdoor insertion.
  • Availability: Overwriting critical system binaries or configuration files can render the host system or the OpenClaw application unstable or unusable.

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.

Official Patches

OpenClawCommit fixing the path traversal vulnerability

Fix Analysis (1)

Technical Appendix

CVSS Score
8.8/ 10
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H

Affected Systems

OpenClaw Automation FrameworkNode.js environments executing OpenClaw skills

Affected Versions Detail

Product
Affected Versions
Fixed Version
OpenClaw
OpenClaw
< 2026.2.142026.2.14
AttributeDetail
CWE IDCWE-22
CWE NameImproper Limitation of a Pathname to a Restricted Directory ('Path Traversal')
Attack VectorNetwork
CVSS v3.18.8 (High)
ImpactArbitrary File Write / RCE
Exploit StatusProof of Concept Available

MITRE ATT&CK Mapping

T1059Command and Scripting Interpreter
Execution
T1566Phishing
Initial Access
CWE-22
Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')

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.

Known Exploits & Detection

GitHub CommitRegression tests included in the fix commit demonstrate the traversal vector.

Vulnerability Timeline

Vulnerability reported and fixed in version 2026.2.14
2026-02-14
GHSA-P25H-9Q54-FFVW published
2026-02-14
Included in security bulletins
2026-02-23

References & Sources

  • [1]GitHub Advisory: GHSA-P25H-9Q54-FFVW
  • [2]OpenClaw Repository Advisory
  • [3]Snyk Research: Zip Slip Vulnerability

Attack Flow Diagram

Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.
Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.