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().
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.
openclaw (npm)2026.2.17<= 2026.2.172026.2.19c821099157a9767d4df208c6b12f214946507871cdb00fe2428000e7a08f9b7848784a0049176705ec232a9e2dff60f0e3d7e827a7c868db5254473fThe 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.
{
"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"
}