GHSA-3wgp-x9p5-c7cc

Suggest an improvement
Source
https://github.com/advisories/GHSA-3wgp-x9p5-c7cc
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/09/GHSA-3wgp-x9p5-c7cc/GHSA-3wgp-x9p5-c7cc.json
JSON Data
https://api.osv.dev/v1/vulns/GHSA-3wgp-x9p5-c7cc
Aliases
Published
2026-09-01T18:54:53Z
Modified
2026-09-01T19:02:52Z
Severity
  • 6.5 (Medium) CVSS_V3 - CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N CVSS Calculator
Summary
Appium: Reflected XSS / arbitrary JS in @appium/base-driver /test/guinea-pig* routes
Details

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>)
image

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.

Database specific
{
    "cwe_ids":  [
        "CWE-489",
        "CWE-79"
    ],
    "github_reviewed":  true,
    "github_reviewed_at":  "2026-09-01T18:54:53Z",
    "nvd_published_at":  "2026-07-08T21:16:52Z",
    "severity":  "MODERATE"
}
References

Affected packages

npm / @appium/base-driver

Package

Name
@appium/base-driver
View open source insights on deps.dev
Purl
pkg:npm/%40appium/base-driver

Affected ranges

Type
SEMVER
Events
Introduced
0 Unknown introduced version / All previous versions are affected
Fixed
10.7.0

Database specific

last_known_affected_version_range
"<= 10.6.0"
source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/09/GHSA-3wgp-x9p5-c7cc/GHSA-3wgp-x9p5-c7cc.json"