GHSA-vj3g-5px3-gr46

Suggest an improvement
Source
https://github.com/advisories/GHSA-vj3g-5px3-gr46
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/03/GHSA-vj3g-5px3-gr46/GHSA-vj3g-5px3-gr46.json
JSON Data
https://api.osv.dev/v1/vulns/GHSA-vj3g-5px3-gr46
Aliases
  • CVE-2026-22171
Downstream
Published
2026-03-03T18:42:28Z
Modified
2026-03-19T18:47:00.742997Z
Severity
  • 6.9 (Medium) CVSS_V4 - CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:A/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N CVSS Calculator
Summary
OpenClaw vulnerable to path traversal in Feishu media temp-file naming allows writes outside os.tmpdir()
Details

Summary

OpenClaw’s Feishu media download flow used untrusted Feishu media keys (imageKey / fileKey) when building temporary file paths in extensions/feishu/src/media.ts. Because those keys were interpolated directly into temp-file paths, traversal segments could escape the temp directory and redirect writes outside os.tmpdir().

Impact

This is an arbitrary file write issue (within the OpenClaw process file permissions). If an attacker can control Feishu media key values returned to the client (for example via compromised upstream response path), they can influence where downloaded bytes are written.

Affected Packages / Versions

  • Package: openclaw (npm)
  • Latest published npm version at triage: 2026.2.17
  • Affected versions: <= 2026.2.17
  • Fixed version: 2026.2.19

Fix Commit(s)

  • c821099157a9767d4df208c6b12f214946507871
  • cdb00fe2428000e7a08f9b7848784a0049176705
  • ec232a9e2dff60f0e3d7e827a7c868db5254473f

Remediation

The fix removes key-derived temp-file naming and keeps downloads in safe temp locations. Additional hardening isolates SDK writeFile calls in per-download temp directories (mkdtemp) with deterministic cleanup, enforces Feishu key trust-boundary validation, and adds a repository guard test against dynamic path.join(os.tmpdir(), \...${...}`)` patterns in runtime code.

OpenClaw thanks @allsmog for reporting.

Database specific
{
    "github_reviewed_at": "2026-03-03T18:42:28Z",
    "github_reviewed": true,
    "cwe_ids": [
        "CWE-22"
    ],
    "nvd_published_at": "2026-03-18T02:16:21Z",
    "severity": "MODERATE"
}
References

Affected packages

npm / openclaw

Package

Affected ranges

Type
SEMVER
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
2026.2.19

Database specific

source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/03/GHSA-vj3g-5px3-gr46/GHSA-vj3g-5px3-gr46.json"