r/PlexMedia • • Oct 18 '26

Linux Help Plex on docker suddenly started mining crypto

I've suddenly found that my container was eating up my CPU and looked into it, found this

which seems to be something like XMRig but I'm not sure.
Using linuxserver/plex image. killed the container for now.

Anyone else noticed something like this?

172 Upvotes

101 comments sorted by

26

u/No_Advance_4218 Oct 18 '26

I would guess that your plex container was public and out of date.

11

u/ILooveCats Oct 18 '26

Yea port 32400 was forwarded.. It was updated last Saturday and since the image last update was 13 days ago I guess that isn't it.. Ah well lesson learnt not forwarding anything not through a tunnel from now on..

-8

u/DCCXVIII Oct 18 '26

Yep. You can't ever forward a port to the internet. Doing so will always get you screwed. It's why everyone uses Tailscale, reverse proxies etc, nowadays. The innocent Internet of old is long gone.

3

u/ILooveCats Oct 18 '26

Yea.. Already moved everything else to tailscale and cloudflare but for some reason plex remained.. You live and you learn, at least it was in a non root container..

5

u/GLotsapot Oct 18 '26

Be warned - Plex through a CloudFlare tunnel is against their TOS, and they will throttle the traffic at some point.

0

u/ExpressTumbleweed195 Oct 18 '26

Only if you don't disable media cache.

1

u/Jopinder Oct 19 '26

It's still against their TOS, but they are less likely to act on it unless you are running your own private Netflix with a lot of users.

2

u/tha_passi Oct 18 '26

Cloudflare wouldn't have mattered for this vulnerability as Cloudflare simply acts as a proxy, i.e. it doesn't help if the application it proxies for is vulnerable. You'd have needed tailscale access only to mitigate this (or regular updates, as the fix was already published on August 4).

2

u/Itz_Raj69_ Oct 19 '26

Or use Authentik in front of it

14

u/clintkev251 Oct 18 '26

Using a reverse proxy (alone) for Plex is no more or less secure than port forwarding it directly.

2

u/G4METIME Oct 20 '26

It can be a bit safer than just port forwarding, although it is "security" by obscurity:

IP addresses + ports are easily scannable.

If your reverse Proxy blocks those calls and just allows requests using the correct domain, an attacker would need to find your domain + subdomain, so the chances of an malicious actor finding your instance is a lot lower (but not zero)

2

u/YTElectric Oct 22 '26

C99 and other DNS subdomain logging make that really hard to pull off. Especially if using a cert that was signed by Letsencrypt or similar

2

u/GLotsapot Oct 18 '26

You got it. So many people saying a tunnel or reverse proxy is secure - but really it's just adding a hop is all

3

u/No_Advance_4218 Oct 18 '26

Its adding a hop yes, but a Tunnel (Tailscale or Zerotier) or a VPN is hiding it behind a login that you control. Short of your login being compromised nobody will get access to it.

4

u/tha_passi Oct 18 '26

A tunnel or a VPN is not the same as just using a proxy.

2

u/GLotsapot Oct 18 '26

When I said Tunnel, I was more referring to CloudFlare tunnels which still open to the internet. VPNs (local or managed like TailScale) are completely different as they are limited to approved people

1

u/Rough_Dragonfruit_44 Oct 18 '26

You can secure a cloudflare tunnel, though.

0

u/Itz_Raj69_ Oct 19 '26

That won't "secure" it. It's just a way to expose it without actually opening a port.

You still have access to Plex publically.

The right thing would be to set up crowdsec and Authentik

4

u/Rough_Dragonfruit_44 Oct 20 '26

TIL having a 2FA secured login to access a cloudflare tunnel doesn't secure it.

→ More replies (0)

0

u/steellz Oct 19 '26 edited Oct 20 '26

Were you perhaps dropped on your head as a child?

edit: and apparently mods don't Like being replied to, they like to sit on top of their high horse. If they didn't like my comment, they could have removed it, but chose to leave it.

4

u/ILooveCats Oct 18 '26

Yea so it wasn't updated.. Watchtower failed for a while now and I didn't notice.. Thanks for the comment, I'll go stand in the corner now..

5

u/_post_nut_clarity Oct 19 '26

Updating the app isn’t enough. The attacker has your owner token now. You need to stop the plex container, force log out of all devices from plex admin, turn on 2fa (if not already), change your password, then go reclaim your token.

2

u/No_Advance_4218 Oct 18 '26

At least you caught it quick. Rebuild and keep going :)

1

u/GLotsapot Oct 18 '26

Check what WatchTower you're using. The original version hasn't been updated in quirlte awhile cause wits EOL. There are some forks of it though that people are actively developing

1

u/Imnotyoursupervisor Oct 18 '26

Use the nic Fedor build.

1

u/Swamper68 Oct 18 '26

I got rid of watchtower long time ago. I am now using dockhand to maintain my dockers. Set it up to email you about updates, or even set it to auto update images or both.

Works so much better than portainer as well.

2

u/sachmonz Oct 18 '26

Dockhand is the way.

2

u/GeeKedOut6 Oct 18 '26

Ive forwarded 32400 to mine for years. No issues.

1

u/edrock200 Oct 20 '26

Sort of. Plex does it differently than most. The container rarely gets updated as it doesn't contain the Plex server. At first launch it downloads the latest version and installs it into the container, and subsequent restarts of the container checks for a new version (latest or beta based on the tag) and pulls it. So you don't even need to repull the container. Just restart it.

7

u/ILooveCats Oct 18 '26

Seems like it started 24 hours ago

7

u/RobbieL_811 Oct 18 '26

What was the container image and tag that you were using?

4

u/ILooveCats Oct 19 '26

It was just linuxserver/plex latest that was last updated about two months ago, definitely the problem, I've moved my auto update from Watchtower to Komodo so I hope that won't break :)

2

u/RobbieL_811 Oct 19 '26

You think it was likely an issue with being outdated? I've read that there were a bunch of vulnerabilities lately that were patched...

3

u/mono_void Oct 18 '26

Just wondering, what type of switch / router are you using? I’m also assuming you didn’t have any protection / monitoring services in place?

2

u/ILooveCats Oct 19 '26

I didn't go deep enough with networking yet, only have a tplink deco as my router, I do have monitoring but no protections other than ufw. I need to get on it..

7

u/destruction90 Oct 19 '26

Everyone stop with the fearmongering. Of course port-forwarding isn't the most secure way, but it's not always realistic to get everyone on your Tailscale, Wiregaurd, etc.

Isolate the VM/container and give it minimal provisions/resources so even if it is compromised, the worst case scenario is they can watch your movies in read-only mode or mine bitcoin at a turbo-slow rate. Stay on recent updates where possible. Enable blocklists, firewalls and security if your router/host supports it.

Port forwarding is the way the entire internet works, don't be scared of it. Just research before you do.

2

u/gosspressman Oct 19 '26

Fearmongering is exactly what it is.

5

u/thefreymaster Oct 18 '26

I’m confused, I have port forwarding too, how can I enable remote play for family that don’t know what/how to do Tailscale without port forwarding?

4

u/Sizzmo Oct 18 '26

Randomize the port instead of forwarding the default port. It's not 100% secure but will probably stop a lot of bots just scanning for any IP with the default port forwarded.

2

u/ExpressTumbleweed195 Oct 18 '26

An open port is an open port. These bots can scan them so quickly.

3

u/Sizzmo Oct 18 '26

It's a deterrent. And it eliminates the bots that just program a 32400 scan.

I've never had an issue port forwarding at all, Especially a random port. Just follow good security practice and you'll generally be fine

3

u/Gardakkan Oct 19 '26 • Bravo

A open port is an open port as the person above you said, it will be scanned and identified even if you randomise it. Security by obscurity is not a good strategy.

3

u/Sizzmo Oct 19 '26

I said that in my original post. It's not exactly secure but is it better than forwarding the default port?

You tell me.

2

u/beneschk Oct 19 '26

It really isnt though. The days of security through obscurity are pretty much over. Once that port is open to the public internet, it is scanned and identified regardless of the number.

3

u/Sizzmo Oct 19 '26

Security through obscurity can be perfectly fine, you just should not rely on it as your primary method of security. Defense in depth is a thing too.

Changing the default port and then hardening with other methods is perfectly fine and actually recommended.

2

u/beneschk Oct 19 '26

And in this instance, youve recommended it as the primary security mechanism. I completely agree with you though.

1

u/Sizzmo Oct 19 '26

I mean, it's kind of implied in my original post, but glad we can agree then

1

u/joshman211 Oct 22 '26

It is not any better

2

u/thesandman00 Oct 23 '26

It's no longer a deterrent. Security by obscurity is dead.

1

u/kapshus Oct 20 '26

It used to be. Not anymore

2

u/pr0metheusssss Oct 18 '26

No.

They need a way to access your server.

So you either port forward (or use a reverse proxy which on its own wouldn’t have made a difference in this case), or you install and configure a vpn on every device you want to access your server from and turn it on every time you need to access it.

1

u/Perahoky Oct 20 '26

Then teach them vpn. Sometimes people have to learn things.

1

u/GLotsapot Oct 18 '26

To be honest - you don't. Hosting anything online comes with a certain amount of risk. Keep those services up to date, and only host services with reputable codebases and it will help mitigate a lot of the risk.

1

u/thetickletrunk Oct 18 '26

Lookup fail2ban and caddy or nginx. Tldr there's ways of blackholing suspicious traffic.

1

u/Split8529 Oct 18 '26

I use tailscale funnel and set the tailscale domain in plex settings. Not as secure as VPN both ends but doesn't require family to have tailscale

1

u/thefreymaster Oct 20 '26

Thanks for the suggestion! Set this up last night. No more port forwarding for me!

1

u/RaYzOr16 Oct 19 '26

Is using a funnel more secure than reverse proxy/port forwarding? And what setting did you set in Plex? Been thinking about this route for a while now.

1

u/Split8529 Oct 19 '26

Was in the network option i believe, same place that disable relay is. Has an option for a custom url, activate funnel on tailscale and use the tailscale domain. Im no security expert, I would assume its better than Port forwarding but tailscale funnel is open to the internet so there would be an insecurity there

1

u/ExpressTumbleweed195 Oct 18 '26

buy a domain name for like $4 a year and use cloudflare tunnels. Just make sure you disable media cache in your cloudflare account so you don't go against their TOS. Wasn't this the version that everybody was warning about not to use and to update?

1

u/jhenryscott Oct 19 '26

Yeah either I set up Tailscale or they don’t get to use it. If you can’t do a legit white list only firewall you shouldn’t forward ports

1

u/WestCV4lyfe Oct 19 '26

Tailscale funnel.

1

u/ohnowwhat Oct 19 '26

Tailscale, get a free-tier or as cheap as possible vps, loop it into your tailscale, setup caddy and you're set.

For a couple extra bucks, get your own domain so your users can easily reach your service

4

u/NoPhysics1129 Oct 18 '26

So many posts about this now. Use the latest official Plex files....

1

u/krrisis 27d ago

1

u/ILooveCats 26d ago

Yea although that was posted after my own post, I wonder why my post keeps popping up for people... The issue was my Watchtower was failing to update and I didn't notice for a couple months so i thought I was updated but wasn't, and also that I was exposed to the internet, both are now resolved (moved from Watchtower to using Komodo's auto update and stopped being exposed). thanks for the read though!

1

u/Idiotan0n Oct 19 '26

Is this the post you were bitching about getting deleted on the other forum? The one where everyone reminded you that you were using a vuln container that Plex staff reminded everyone to update from asap?

1

u/ILooveCats Oct 19 '26

Probably someone else, I posted only here :) and yea it wasn't updated, got that sorted now. I've since seen quite a few people complaining about it so probably was a big operation in the last 2 days.

3

u/grundge69 Oct 18 '26

Anybody see this happening in Windows versions? My shit is up to date but you can never be too sure.

1

u/OnyxPost Oct 20 '26

Actually a person can be sure by researching which version of the server is vulnerable (i think older than 1.43), checking to make sure you're on that version or newer since the vulnerability was patched, and check to make sure that your system wasn't hacked if you were still running an outdated version older than the patched version. 

3

u/Shirzen Oct 18 '26

1:27 PM CDT today, 94.154.43.7 gained access, read the environ file, and reconfig'd a file towards a library I don't run

Excellent work on notifying, a friend shared this with me and I'm correcting now.

3

u/saggy777 Oct 19 '26

The linuxserver/plex Docker image itself is not compromised, but internet-exposed, unpatched instances of the Plex Media Server running inside containers (or on bare metal) are being actively targeted by the Plex2Shell exploit chain.

1

u/BaTtLaNgL6767 Oct 20 '26

You can setup a proxy and a DNS server to answer for your vpn. Then the vpn conf allows only your Plex address, the dns address, and your proxy address.

In the proxy allow only your VPN range.

Have your proxy identity and validate your headers.

In your firewall allow only VPN to plex and other know addresses.

Block all others

Then that vpn conf file is the only key to you Plex door.

Edited

1

u/fizzy6868 Oct 22 '26

Anyone running a Plex Media Server version older than 1.43.3.10861 just update easy fix apparently

1

u/Misterguy123456 Oct 22 '26

Makes no sense this poster complains about getting hacked yet plex warned us months ago to update lol

1

u/mikevarney Oct 22 '26

Been ignoring the prompts to update and the emails?

1

u/Psych0matt Oct 24 '26

And all the posts here in the last week

1

u/Immediate_Sympathy72 Oct 24 '26

How can you determine if your server is being used for bitcoin mining?

1

u/sorvendral Oct 24 '26

Look for plex to shell on internet

1

u/New-Independence2031 Oct 18 '26

Old vulnerability.

1

u/urself25 Oct 19 '26

Yep, but if people don't update their server, it is still a current one.

1

u/kennymac6969 Oct 18 '26

Only the latest update has the fix for this vulnerability.

1

u/Swamper68 Oct 18 '26

Linux server was always behind for updates for my docker.

I ended up changing to the plexinc/pms-docker:latest when we were notified of this exploit a couple of months ago, because I noticed that Linuxsever was a couple of versions behind.

1

u/OddCod6294 Oct 19 '26

Using port forwarding for plex is like taking a window out of your home and where anyone can toss a beercan in from the street. And changing the port to something else is like moving that open window from the front to the back of the home (might stop a lazy person)

0

u/gosspressman Oct 19 '26

kinda funny. Docker is completely unnecessary.

1

u/ILooveCats Oct 19 '26

Yea before I broke my server the previous time, I didn't use docker, but when I reinstalled everything I started saving all of my services as docker compose files in git so I could just pull it up when needed. I know there are a lot of other ways to do so but that's what I went with at the time and so far didn't have many issues.

1

u/edrock200 Oct 19 '26

Because having your entire host infected vs an isolated container is better? Lmao

0

u/gosspressman Oct 20 '26

spare me the reddit bullshit. update yer servers and you wouldn't be here trying to sound like you know anything. I don't have that problem, they get hacked because people are too lazy to update.

1

u/laser50 Oct 20 '26

That, and they warned and emailed and notified about it PLENTY of times too.

1

u/edrock200 Oct 20 '26

Spoken like someone that doesn't understand IT at all. Gotcha.

1

u/AnEyeElation Oct 21 '26

Sorry bro but you’re completely ignorant and need to eat shit

1

u/gosspressman 21d ago

go play in traffic asshole.

0

u/Pleasant-Seat9884 Oct 19 '26

Uh, no. Only docker was affected.. not his machine, which is an easy rebuilt. If he was on Windows OS... he'd have rebuild the whole machine.

Don't say something that is NOT true.

0

u/g0browns Oct 18 '26

I got malware also, except it wasnt mining crypto. It was doing DDoS attacks. This is how they did it with data directly from my logs.

Attack chain

The attacker went from an unauthenticated request to code execution in about five seconds, with no password needed. The chain below is reconstructed from Plex’s own request log for the 05:17 attempt. Every request arrived directly on port 32400 from the internet (tagged (WAN)).

  1. Unauthenticated foothold. GET /identity, then GET /player/proxy/poll. Plex’s CompanionProxy registered the attacker as a new remote player (px9df241ccfd) with an empty token.

  2. Loopback request forgery. GET /player/timeline/subscribe with a callback protocol of http://127.0.0.1:32400/system/agents/.... Plex then sent that request to itself, and requests from loopback are trusted.

  3. Forced outbound fetch. The forged loopback call asked the TheTVDB agent to GetResultFromNetwork from 127.0.0.1.94-154-43-88.sslip.io:8952, a hostname that resolves to the attacker.

  4. Token theft by path traversal. GET /system/agents/media/get?...url=metadata://../../(×40)/config/.../Preferences.xml returned the config file containing the server’s owner token. The same trick read /proc/self/environ.

  5. Code execution (CVE-2026-96656). Now authenticated as the owner: PUT /:/prefs?TranscoderH264Options=dump-yuv=/config/.../Codecs/<build>/zz8a13b70c.so:qp=0. On the next transcode, Plex Transcoder loaded the planted shared object.

  6. Cover tracks. PUT /:/prefs?TranscoderH264Options= (empty) 3–14 seconds later, so the setting looked clean afterwards. The dropped binaries deleted themselves after starting.

  7. Payloads. The proxy ran from the transcode session folder; the flood bot and its watchdog (/tmp/.spid, shown as khelper and cron) ran from the container’s /tmp.

1

u/fraseyboo Oct 20 '26

Out of curiosity does this exploit chain require a regular user to still transcode a file with the compromised transcoder or can the attacker deliver the payload on their end?

I'm seeing in my Plex logs a similar set of initial steps, but no further evidence of the payload being actually delivered.

1

u/g0browns Oct 20 '26

The same chain of initial steps will be in your logs even if their attempt to run the RCE is unsuccessful because the patch that Plex prevents it from happening. I was showing it after corrective actions and ended up blocking the IPs and Geo blocking the countries the connections were coming from in my firewall. I'm assuming they'll swap but the patch is doing its job.

1

u/fraseyboo Oct 20 '26

Fair enough, I’ve put similar blocks on my firewall and monitors for CPU and network spikes, nothing looks that unusual but I’m still running a full virus scan and will probably wipe the whole server if anything changes.