Vibe Security Radar
Back to Vulnerabilities

CVE-2026-22171

openclaw/openclaw
Mar 18, 2026CWE-22
TypeScript
Verified by gpt-5.4-high
Severity
HIGH8.8
Verdict
CONFIRMED
0.95 confidence
AI Tool
Claude CodeClaude Code
Language
TypeScript

OpenClaw versions prior to 2026.2.19 contain a path traversal vulnerability in the Feishu media download flow where untrusted media keys are interpolated directly into temporary file paths in extensions/feishu/src/media.ts. An attacker who can control Feishu media key values returned to the client can use traversal segments to escape os.tmpdir() and write arbitrary files within the OpenClaw process permissions.

How AI Introduced This

Yes. The AI-coauthored commit 2267d58afcc70fe19408b8f0dce108c340f3426d created extensions/feishu/src/media.ts and introduced the unsafe `path.join(os.tmpdir(), ... imageKey/fileKey)` temp-file construction that the fixes later removed. A later human refactor rewrote the same bug, but AI-authored code was the original vulnerable implementation and part of the causal chain.

Attribution Chain
Advisory
GitHub Advisory
Fix Commit
c821099— openclaw/openclaw
git blame
extensions/feishu/src/media.ts
Bug-Introducing Commit
Bug-Introducing Commits(1)

feat(feishu): replace built-in SDK with community plugin

Yifeng WangFeb 5, 2026extensions/feishu/src/media.tsBlame: 100%

Deep Verification

by GPT-5.4
CONFIRMED0.95
53 tool calls
95%

This AI-coauthored commit added the new Feishu plugin and created extensions/feishu/src/media.ts with the vulnerable branches `const tmpPath = path.join(os.tmpdir(), `feishu_img_${Date.now()}_${imageKey}`)` and `const tmpPath = path.join(os.tmpdir(), `feishu_${Date.now()}_${fileKey}`)` before calling `responseAny.writeFile(tmpPath)`. In the same plugin version, bot.ts parses inbound message JSON and passes attacker-controlled `image_key`/`file_key` values into `downloadMessageResourceFeishu`, so untrusted keys reached filesystem path construction immediately. The pre-replacement built-in code at 4fc4c5256ad527e14beade2b872984fe0dd3f057 streamed media via `getReadableStream()` and did not interpolate keys into temp paths, so this was a real introduction, not just a file move.

AI Signals(1)
Commit2267d58
Claude CodeCo-author trailerCo-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>95%
Fix Commits(3)