AgentbeamBeta
AI agent vulnerability · OpenClaw

GHSA-jxrq-8fm4-9p58: OpenClaw: Zip extraction symlink traversal could write outside destination

highCVSS 4.0 7.1

OpenClaw up to 2026.2.21-2 can write files outside the extraction folder when it unpacks a ZIP archive, because the check in src/infra/archive.ts looked at paths as text and did not catch a symlink already present in the destination. Fixed in 2026.2.22. The advisory rates it moderate.

Published Mar 3, 2026 · Analysis Nov 7, 2026

What an attacker can do

The ZIP extraction code in src/infra/archive.ts checked output paths lexically. Per the advisory, writes could still traverse an existing symlink in the destination path segments, so a file could land outside the extraction root. The weakness is CWE-59, improper link resolution before file access.

Two things must be true. An attacker must be able to get an archive extracted by OpenClaw, and a symlink must already exist under the extraction root. The advisory does not describe how that symlink gets there.

The result is an arbitrary file write outside the intended folder, with the privileges of the OpenClaw process. Typical abuse would target shell startup files, SSH keys or agent configuration. For a host that runs an AI agent, a poisoned skill or plugin bundle delivered as a ZIP is the obvious route.

The advisory notes the fix was the planned next release, so it is only fully available once 2026.2.22 is on npm. No CVE was assigned.

Who is affected

The npm package openclaw up to and including 2026.2.21-2. Check the version.

npm ls openclaw

Any workflow that extracts ZIP archives from outside sources is in scope, such as installing bundles or importing archives.

openclaw

Ecosystem
npm
Affected
< 2026.2.22
Fixed in
2026.2.22
Check
npm ls openclaw

How to fix it

Upgrade to OpenClaw 2026.2.22 or later. The fix in commit 4b226b7 rejects symlink traversal in destination path segments and checks that resolved destination paths stay inside the extraction root. It also uses no-follow file opens for ZIP output writes where the platform supports them, and adds a regression test for a pre-seeded destination symlink. The advisory names no workaround.

How to tell if you were hit

Look for symlinks inside folders where OpenClaw extracts archives.

find <extraction-root> -type l

Check for recently modified files outside those folders that match archive contents, and for unexpected changes to startup files in the home directory of the OpenClaw user. Beam keeps a log of agent file access and shell commands, which helps if an agent triggered the extraction.

Original advisory

From the GitHub Advisory Database (CC BY 4.0).

Summary

A path confinement bypass in OpenClaw ZIP extraction allowed writes outside the intended destination when a pre-existing symlink was present under the extraction root.

Affected Packages / Versions

  • Package: openclaw (npm)
  • Latest published npm version at triage time: 2026.2.21-2
  • Affected versions: <= 2026.2.21-2
  • Planned patched version for next release: 2026.2.22

Technical Details

The vulnerable path was in src/infra/archive.ts ZIP extraction logic. Output-path checks were lexical, but writes could still traverse an existing symlink in destination path segments.

The fix blocks this by:

  • rejecting symlink traversal in destination path segments,
  • validating resolved destination paths remain inside the extraction root,
  • using no-follow file opens for ZIP output writes where supported,
  • adding a regression test for pre-seeded destination symlink traversal.

Impact

  • Type: Arbitrary file write outside extraction root via symlink traversal during ZIP extraction.
  • Preconditions: attacker-controlled archive extraction plus pre-existing symlink in destination path.

Fix Commit(s)

  • 4b226b74f5fd3b106a83a6347fd404172e2fd246

Release Process Note

Patched version is pre-set to the planned next release (2026.2.22). Once npm release 2026.2.22 is published, the advisory can be published without further field edits.

OpenClaw thanks @tdjackey for reporting.

Credited to tdjackey.

Questions

What fixes GHSA-jxrq-8fm4-9p58?

OpenClaw 2026.2.22 or later. Versions through 2026.2.21-2 are affected.

Does the attacker need a symlink in place?

Yes. The advisory requires a symlink to already exist under the extraction root and an archive to be extracted. It does not say how the symlink is created.

Is there a CVE for this?

No. The advisory states none has been assigned.

References

How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. The analysis is written by an AI model from the sources listed above and checked by automated rules before it is published. Check versions against the vendor's advisory before you act. Methodology

More OpenClaw vulnerabilities

All OpenClaw entries