ENGINEERING

Plex2Shell is being exploited: how to find every Plex Media Server on your network

Plex Media Server is the free app people install to stream their own movies and music to a TV or phone. It runs on Windows and Linux, and it ends up on work machines too: a desktop under someone’s desk, a file server with a big data drive. Streaming from outside the house means opening its port, 32400, to the internet, and plenty of owners do.

What happened

Zach Main published Plex2Shell on October 16: five bugs in Plex Media Server (CVE-2026-96651, -96652, -96654, -96655 and -96656) that chain together into remote code execution with no login. The short version: an unauthenticated request to /player/timeline makes the server call itself, that gets the attacker the server owner’s admin token, and the admin token lets them write a file into Plex’s Codecs folder. Plex runs it the next time the transcoder starts.

He reported it to Plex in July. Plex fixed it in 1.43.3.10861 on August 3 and emailed server owners around September 1. Plenty of servers still didn’t update, and one day after the exploit code went public, a researcher’s Plex honeypot got hit with it. The attackers dropped an XMRig crypto miner and a proxy program that rents the machine’s internet connection out to strangers. CISA has added the bugs to its Known Exploited Vulnerabilities catalog.

Plex runs as whoever installed it, so a hit gets that account’s access too. On a Windows desktop that’s usually the signed-in user. On Linux it’s the plex service account, which can read whatever media folders it was pointed at.

The payloads seen so far are Linux binaries. Plex’s fix is the same version on every platform, so I’d update the Windows copies too and not wait to find out.

Check one Windows machine

Run these in an elevated PowerShell window. On a machine without Plex, both print nothing.

# Every Plex Media Server.exe on the box, with its version (fixed in 1.43.3.10861)
Get-ChildItem 'C:\Program Files\Plex', 'C:\Program Files (x86)\Plex' -Recurse -Filter 'Plex Media Server.exe' -ErrorAction SilentlyContinue |
  Select-Object FullName, @{ n = 'Version'; e = { $_.VersionInfo.ProductVersion } } | Format-Table -AutoSize

# Is anything listening on Plex's port?
Get-NetTCPConnection -LocalPort 32400 -State Listen -ErrorAction SilentlyContinue |
  Format-Table LocalAddress, LocalPort, OwningProcess

Read the version from the exe, not from Add/Remove Programs. Plex’s MSI writes a mangled DisplayVersion (1.42.2.10156 shows up as 1.42.2156), so anything comparing registry versions gets it wrong. Keep the Format-Table on both lines, too: without it, PowerShell prints the second result inside the first table’s columns, and the listener comes out blank.

Plex on Windows isn’t a service. It starts from the user’s HKCU\...\Run key when they sign in, so a machine where that user is signed out can have Plex installed and nothing listening.

Check one Linux machine

As root:

dpkg-query -W plexmediaserver 2>/dev/null; rpm -q plexmediaserver 2>/dev/null; snap list plexmediaserver 2>/dev/null
docker ps --format '{{.Image}} {{.Names}}' 2>/dev/null | grep -iE 'plex|pms'
ss -ltn 'sport = :32400' | tail -n +2
pgrep -a -x 'mylovelyminer|myawesomeproxy'

The first line gives you the package version. The second finds Plex running in a container (plexinc/pms-docker, linuxserver/plex), which no package manager knows about. The last one looks for the two payloads by the names the honeypot saw. It’s only a name check: if it prints anything, treat the machine as compromised.

I tested both blocks on lab VMs against a real, vulnerable Plex 1.42.2 (and a stand-in process named like the miner), and on the same VMs with Plex removed.

If you find one

Doing this across a fleet

The RFF Script Library has Plex Media Server (Plex2Shell) - Exposure Check for Windows and a Linux version. Run them on every machine you pick. They find every copy (Program Files, a running process, a user’s startup entry; deb, rpm, snap or a Docker/Podman container on Linux) and report the version against the fix, whether port 32400 is listening, and whether Remote Access is turned on. The Linux one also hashes executables against the two published payload hashes and checks cron, systemd and /etc/hosts for proxystream. Both are read-only, and you can read the script before you run it.

RFF is free for your first 100 endpoints: getrff.com.

Sources

One email per new post, nothing else. Unsubscribe in one click. Or use the RSS feed.

Comments

Comments use GitHub Discussions, so you'll need a GitHub account to post. Corrections are especially welcome.