Your RSA-2048 keys break in 2030. Find every one of them before attackers do.
📦
📦 npm
Not in CISA KEV
MEDIUM severity

CVE-2026-58191 — @appium/base-driver

MEDIUMFix: appium/appium#22394

CVE-2026-58191 is a medium-severity (CVSS 6.5) Cross-site Scripting (XSS) vulnerability in @appium/base-driver. A fix is available for @appium/base-driver — see the affected versions and patch details below.

Appium: Reflected XSS / arbitrary JS in @appium/base-driver /test/guinea-pig* routes

Also known asGHSA-3wgp-x9p5-c7cc
Published
Updated
Affected
1 pkg
Patched
1 / 1
Exploits
None indexed
Exploitation data as of Oct 17, 2026 · OSV.dev, NVD, FIRST.org (EPSS)

Exploitation Status

No confirmed exploitation observed yet

  • CISA’s own triage has not observed active exploitation or public proof-of-concept code for this CVE as of its last assessment.

Exploitation and automatability from CISA’s SSVC triage for CVE-2026-58191.

EPSS Exploitation Probability

via FIRST.org ↗
0.6%probability of exploitation in next 30 days
Lower Risk0.00%
Lower risk than most CVEs46th percentile — riskier than 46% of all scored CVEsHighest risk
0.00%0.35%0.71%1.06%0.3%0.3%0.6%0.6%Aug 26Oct 26Oct 26

Probability of exploitation in the next 30 days, from FIRST.org EPSS.

How urgent is this, really

CVE-2026-58191 by exploitation likelihood (EPSS) against impact (CVSS). Outside the shaded patch-first corner.

Where this sits among everything scored

Of 390,400 CVEs with a current EPSS score, this one falls in the < 10% band (highlighted). Counts from FIRST.org, log-scaled.

Real-World Exposure

1 pkg affected

How broadly this vulnerability is actually deployed: weekly install volume shows current usage, and reverse-dependency count shows how many other packages break if it stays unpatched.

20other npm packages depend on this — each one inherits the vulnerability until it's patched upstream
@appium/base-drivernpm
814Kdownloads / week

Description

Summary

Appium's base-driver mounts the built-in /test/guinea-pig, /test/guinea-pig-scrollable and /test/guinea-pig-app-banner routes unconditionally on every server. The handler reflects the throwError query param, the comments POST field, and the User-Agent request header into the returned HTML via compileLodashTemplate, which interpolates <%= expr %> as String(expr) with no HTML/JS escaping. This yields reflected XSS, and the throwError value is reflected inside a <script> block, giving arbitrary JavaScript execution on the server's origin. No authentication, no session, no driver and no plugin are required, and the default bind address is 0.0.0.0.

Details

Affected

  • @appium/base-driver 10.6.0 (with Appium server 3.5.0); tested live.
  • Template engine helper: @appium/base-driver lib/utils.ts compileLodashTemplate.

Location (file:line)

  • Routes mounted unconditionally: base-driver/lib/express/server.ts:216-219 (app.all('/test/guinea-pig', guineaPig) etc.).
  • Tainting: base-driver/lib/express/static.ts:35-61 (guineaPigTemplate) — throwError = String(req.params.throwError ?? req.query?.throwError), params.comment = String(req.body.comments), params.userAgent = req.headers['user-agent'].
  • Unescaped render: base-driver/lib/utils.ts:67-83 (compileLodashTemplate) emits <%= expr %> as String(${expr}) via new Function(...), no escaping.
  • Sinks (shipped templates): base-driver/static/test/guinea-pig.html:11-12 (throwError inside <script>), :50 (comment), :87 (userAgent); same in guinea-pig-scrollable.html / guinea-pig-app-banner.html.

PoC

Requests:

GET /test/guinea-pig?throwError=x%27%2balert(document.domain)%2b%27
POST /test/guinea-pig         (body: comments=</span><img src=x onerror=alert(1)>)
GET  /test/guinea-pig         (header: User-Agent: <script>alert(7)</script>)
<img width="973" height="276" alt="image" src="https://github.com/user-attachments/assets/f58e1dce-f3ad-43d3-b66e-1ff5efea3866" />

Impact

An attacker who can get a victim to open a crafted link (or auto-submit a form) to the Appium server executes arbitrary JavaScript on the server's origin. With default CORS * + no authentication, that JS can drive the WebDriver REST API and plugin endpoints. The endpoints are debug/test fixtures that should not be reachable on a production listener at all.

Affected Packages

1 total 1 fixed
EcosystemPackageVulnerable rangeFix
📦npm@appium/base-driverall versions10.7.0npm install @appium/base-driver@10.7.0

Affected Products

1 product · 1 configurations
Application
appium\/base-driverappium
< 10.7.0
range

Detection & mitigation playbook

Open-source dependency
  1. Detect

    Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for @appium/base-driver, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.

  2. Fix

    Update @appium/base-driver to 10.7.0 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2026-58191 is resolved across your whole dependency graph.

  3. Workarounds

    Escape or sanitise the affected output on the server side rather than relying on client-side filtering, and add a Content-Security-Policy that blocks inline script execution so injected markup cannot run even if it reaches the page.

How to detect CVE-2026-58191

A community-maintained Nuclei template exists for this CVE. You can scan for it directly:

nuclei -id cve-2026-58191 -u https://target
Template
Appium base-driver <=10.6.0 - Reflected Cross-Site Scripting
Severity
medium
Impact
Remote attackers can execute arbitrary JavaScript on the server origin, potentially leading to session hijacking or further attacks.
Remediation
Update to version 10.7.0 or later.

Template by ProjectDiscovery nuclei-templates (str4k3r), MIT licensed. View the full template. Scan only systems you are authorised to test.

Frequently Asked Questions

## Summary Appium's base-driver mounts the built-in `/test/guinea-pig`, `/test/guinea-pig-scrollable` and `/test/guinea-pig-app-banner` routes **unconditionally** on every server. The handler reflects the `throwError` query param, the `comments` POST field, and the `User-Agent` request header into the returned HTML via `compileLodashTemplate`, which interpolates `<%= expr %>` as `String(expr)` with **no HTML/JS escaping**. This yields reflected XSS, and the `throwError` value is reflected **inside a `<script>` block**, giving arbitrary JavaScript execution on the server's origin. No authentic
O3 Security · Impact-Aware SCA

Is CVE-2026-58191 in your dependencies?

Find it across npm, including transitive dependencies.

CVE-2026-58191: @appium/base XSS — Fixed in 10.7.0