# GHSA-659f-22xc-98f2: OpenClaw hook transform path containment missed symlink-resolved escapes

> Attackers with high privileges can execute arbitrary code by exploiting symlink escapes in webhook transform module path validation.

- **Severity:** Not scored
- **Exploited in the wild:** Not known
- **Login needed:** An administrator
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 3 Mar 2026

## What is GHSA-659f-22xc-98f2?

GHSA-659f-22xc-98f2 is a path traversal vulnerability in openclaw, published on 3 Mar 2026. An attacker needs administrator access to exploit it, with no action from the victim.

### Official description

## Vulnerability

Webhook transform modules were validated with lexical path checks only. A symlink under the allowed hooks transform tree could resolve outside the intended directory and be dynamically imported.

## Affected Packages / Versions

- Package: `openclaw` (npm)
- Affected versions: `<= 2026.2.21-2`
- Patched version (planned next release): `2026.2.22`

## Impact

When an attacker can cause a transform module path to reference a symlinked entry that resolves outside the trusted transform directory, the gateway may import and execute unintended JavaScript with gateway-process privileges.

## Attack Preconditions

- Hook transforms are enabled and reachable.
- Attacker can influence transform path resolution (for example via privileged config access and/or writable filesystem path in the transform tree).
- A symlink escape exists to attacker-controlled code.

## Remediation

- Enforce realpath-aware containment for existing path ancestors before dynamic import.
- Keep lexical containment checks for traversal and absolute-path escapes.
- Add regression coverage for:
  - transform module symlink escape rejection,
  - `hooks.transformsDir` symlink escape rejection,
  - in-root symlink allow-case.

## Fix Commit(s)

- `f4dd0577b055f77af783105bd65eae32f3d5e6a1`

OpenClaw thanks @aether-ai-agent for reporting.

## Which versions are affected by GHSA-659f-22xc-98f2?

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-659f-22xc-98f2?

Upgrade openclaw to 2026.2.22 or later.

## Is GHSA-659f-22xc-98f2 being exploited?

There is no known exploitation of GHSA-659f-22xc-98f2 in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for GHSA-659f-22xc-98f2 and fix it if it is affected.

What it is: GHSA-659f-22xc-98f2 is a path traversal vulnerability in openclaw, published on 3 Mar 2026. An attacker needs administrator access to exploit it, with no action from the victim.
Exploitation: There is no known exploitation of GHSA-659f-22xc-98f2 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-659f-22xc-98f2/ (Markdown: https://insights.sbomify.com/GHSA-659f-22xc-98f2/index.md)
```

## Sources

- OSV: https://osv.dev/vulnerability/GHSA-659f-22xc-98f2

---
From sbomify Insights: https://insights.sbomify.com/GHSA-659f-22xc-98f2/
Summaries are generated and may contain mistakes; the official description above is the record.
