{"id":"CVE-2026-22171","aliases":["CVE-2026-22171","GHSA-vj3g-5px3-gr46"],"related":[],"kind":"vulnerability","state":"published","title":"OpenClaw < 2026.2.19 - Path Traversal in Feishu Media Temporary File Naming","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"en","text":"## Summary\n\nOpenClaw’s Feishu media download flow used untrusted Feishu media keys (`imageKey` / `fileKey`) when building temporary file paths in `extensions/feishu/src/media.ts`.\nBecause those keys were interpolated directly into temp-file paths, traversal segments could escape the temp directory and redirect writes outside `os.tmpdir()`.\n\n## Impact\n\nThis is an arbitrary file write issue (within the OpenClaw process file permissions).\nIf 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.\n\n## Affected Packages / Versions\n\n- Package: `openclaw` (npm)\n- Latest published npm version at triage: `2026.2.17`\n- Affected versions: `<= 2026.2.17`\n- Fixed version: `2026.2.19`\n\n## Fix Commit(s)\n\n- `c821099157a9767d4df208c6b12f214946507871`\n- `cdb00fe2428000e7a08f9b7848784a0049176705`\n- `ec232a9e2dff60f0e3d7e827a7c868db5254473f`\n\n## Remediation\n\nThe 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.\n\nOpenClaw thanks @allsmog for reporting.","format":"markdown","source":"ghsa"},{"lang":"es","text":"Las versiones de OpenClaw anteriores a 2026.2.19 contienen una vulnerabilidad de salto de ruta en el flujo de descarga de medios de Feishu donde las claves de medios no confiables se interpolan directamente en las rutas de archivos temporales en extensions/feishu/src/media.ts. Un atacante que puede controlar los valores de las claves de medios de Feishu devueltos al cliente puede usar segmentos de salto para escapar de os.tmpdir() y escribir archivos arbitrarios dentro de los permisos del proceso de OpenClaw.","source":"nvd"}],"published":"2026-03-03T18:42:28.000Z","modified":"2026-06-23T16:13:46.994Z","severity":{"scorer":"VulnCheck","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:H/VA:L/SC:N/SI:N/SA:N","score":8.8,"rating":"HIGH"},"severities":[{"scorer":"VulnCheck","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:H/VA:L/SC:N/SI:N/SA:N","score":8.8,"rating":"HIGH"},{"scorer":"VulnCheck","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:L/A:N","score":8.2,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:4.0","vector":"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","rating":"MEDIUM"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N","score":9.1,"rating":"CRITICAL"}],"cwes":["CWE-22"],"affected":[{"ranges":[{"type":"semver","introduced":"0","fixed":"2026.2.19","status":"affected"}],"vendor":"OpenClaw","product":"OpenClaw","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"2026.2.19"}],"ecosystem":"npm","package":"openclaw","purl":"pkg:npm/openclaw","source":"ghsa"},{"ranges":[{"status":"affected","fixed":"2026.2.19"}],"vendor":"openclaw","product":"openclaw","cpe":"cpe:2.3:a:openclaw:openclaw:*:*:*:*:*:node.js:*:*","source":"nvd"}],"references":[{"url":"https://github.com/openclaw/openclaw/security/advisories/GHSA-vj3g-5px3-gr46","tags":["mitigation","vendor-advisory","web"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/openclaw/openclaw/commit/c821099157a9767d4df208c6b12f214946507871","tags":["patch","web"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/openclaw/openclaw/commit/cdb00fe2428000e7a08f9b7848784a0049176705","tags":["patch","web"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/openclaw/openclaw/commit/ec232a9e2dff60f0e3d7e827a7c868db5254473f","tags":["patch","web"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://www.vulncheck.com/advisories/openclaw-path-traversal-in-feishu-media-temporary-file-naming","tags":["third-party-advisory","web"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-22171","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/openclaw/openclaw","tags":["package"],"sources":["ghsa"]}],"credits":["Sean Nejad (@allsmog)"],"assigner":"VulnCheck","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"yes","technicalImpact":"partial","date":"2026-03-18T14:04:18.827Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-22171","url":"https://www.cve.org/CVERecord?id=CVE-2026-22171","licence":"CVE Terms of Use","modified":"2026-06-23T16:13:46.994Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-vj3g-5px3-gr46","url":"https://github.com/advisories/GHSA-vj3g-5px3-gr46","licence":"CC-BY-4.0","modified":"2026-03-19T18:47:00.742Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-22171","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-22171","licence":"Public domain","modified":"2026-06-17T10:19:28.560Z"}],"updatedAt":"2026-11-25T22:59:16.070Z","epss":{"score":0.00389,"percentile":0.35149,"date":"2026-12-01T12:00:22.000Z"}}