# CVE-2026-25244: WebdriverIO has Command Injection in the BrowserStack Service

> Attackers can execute arbitrary code on CI/CD servers and developer machines by exploiting unsanitized git branch names in WebdriverIO's BrowserStack service.

- **Severity:** Critical 9.8 (`CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 18 May 2026
- **Updated:** 23 Jul 2026
- **Also known as:** GHSA-5c46-x3qw-q7j7

## What is CVE-2026-25244?

CVE-2026-25244 is a critical command injection vulnerability in webdriverio, published on 18 May 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

WebdriverIO is a test automation framework for unit, e2e and component testing using WebDriver, WebDriver BiDi and Appium. Versions below 9.24.0 contain a command injection vulnerability leading to remote code execution (RCE) in test orchestration. Git permits branch names containing shell metacharacters, and getGitMetadataForAISelection() interpolates these names directly into execSync() calls without sanitization. An attacker can exploit this by supplying a malicious repository (via testOrchestrationOptions.runSmartSelection.source, or the current directory if unset) whose branch name carries a payload, causing the shell to execute arbitrary code. This enables remote code execution on CI/CD servers and developer machines, leading to credential and secret disclosure, source code and SSH key exfiltration, system compromise, and supply chain attacks via tampered build artifacts. The issue has been fixed in version 9.24.0.

Weakness: CWE-78 (Improper Neutralization of Special Elements used in an OS Command)

## Which versions are affected by CVE-2026-25244?

2 open source packages ship an affected version, including @wdio/browserstack-service. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `@wdio/browserstack-service` | npm | All versions | 9.24.0 |
| `@wdio/browserstack-service` | npm | All versions | 9.24.0 |

Products: Openjsf Webdriverio.

## How do I fix CVE-2026-25244?

Upgrade @wdio/browserstack-service to 9.24.0 or later.

## Is CVE-2026-25244 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-25244 exists.

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2026-25244 and fix it if it is affected.

What it is: CVE-2026-25244 is a critical command injection vulnerability in webdriverio, published on 18 May 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-25244 exists.

Affected packages and fixed versions:
- @wdio/browserstack-service (npm): affected all versions; fixed in 9.24.0
- @wdio/browserstack-service (npm): affected all versions; fixed in 9.24.0

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2026-25244/ (Markdown: https://insights.sbomify.com/CVE-2026-25244/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2026-25244
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-25244
- OSV: https://osv.dev/vulnerability/CVE-2026-25244

---
From sbomify Insights: https://insights.sbomify.com/CVE-2026-25244/
Summaries are generated and may contain mistakes; the official description above is the record.
