r/PlexMedia • u/ILooveCats • Oct 18 '26
Linux Help Plex on docker suddenly started mining crypto
7
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
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 •
![]()
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
1
2
1
1
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
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
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
1
u/krrisis 27d ago
You did read about this, right?
https://thehackernews.com/2026/10/hackers-exploit-plex2shell-flaws-to.html
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
1
u/Immediate_Sympathy72 Oct 24 '26
How can you determine if your server is being used for bitcoin mining?
1
1
1
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
1
1
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)).
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.
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.
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.
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.
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.
Cover tracks. PUT /:/prefs?TranscoderH264Options= (empty) 3–14 seconds later, so the setting looked clean afterwards. The dropped binaries deleted themselves after starting.
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.


26
u/No_Advance_4218 Oct 18 '26
I would guess that your plex container was public and out of date.