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

> An attacker can write files outside the intended directory via symlink traversal during ZIP extraction in the OpenClaw library.

- **Severity:** Not scored
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** A user has to click or open something
- **Fix available:** Yes
- **Published:** 3 Mar 2026

## What is GHSA-jxrq-8fm4-9p58?

GHSA-jxrq-8fm4-9p58 is a path traversal vulnerability in openclaw, published on 3 Mar 2026. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.

### Official description

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

## Which versions are affected by GHSA-jxrq-8fm4-9p58?

2 open source packages ship an affected version, including openclaw.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `openclaw` | npm | All versions | 2026.2.22 |
| `openclaw` | npm | All versions | 2026.2.22 |

## How do I fix GHSA-jxrq-8fm4-9p58?

Upgrade openclaw to 2026.2.22 or later.

## Is GHSA-jxrq-8fm4-9p58 being exploited?

There is no known exploitation of GHSA-jxrq-8fm4-9p58 in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for GHSA-jxrq-8fm4-9p58 and fix it if it is affected.

What it is: GHSA-jxrq-8fm4-9p58 is a path traversal vulnerability in openclaw, published on 3 Mar 2026. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.
Exploitation: There is no known exploitation of GHSA-jxrq-8fm4-9p58 in the wild and no public exploit code.

Affected packages and fixed versions:
- openclaw (npm): affected all versions; fixed in 2026.2.22
- openclaw (npm): affected all versions; fixed in 2026.2.22

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/GHSA-jxrq-8fm4-9p58/ (Markdown: https://insights.sbomify.com/GHSA-jxrq-8fm4-9p58/index.md)
```

## Sources

- OSV: https://osv.dev/vulnerability/GHSA-jxrq-8fm4-9p58

---
From sbomify Insights: https://insights.sbomify.com/GHSA-jxrq-8fm4-9p58/
Summaries are generated and may contain mistakes; the official description above is the record.
