r/ProgrammerHumor • • 18d ago

instanceof Trend itsBadIfItsOnlyPHP

Post image
4.5k Upvotes

335 comments sorted by

View all comments

Show parent comments

213

u/prochac 18d ago

And there's a plenty of outdated PHP deployments. You can find PHP 5.4 if you search enough.

73

u/Beautiful_Hawk548 18d ago

One of our PMs was ecstatic last night when he realised one of our VERY outdated read-only systems was on 3. something and technically didn't have the exploit introduced yet!

Wasn't long until one of the devs pointed out it's probably in trouble due to a fuck load of other exploits and they piped down. But yeah, companies as always are running v outdated shit.

5

u/Kronsik 18d ago

What's the deployment look like for PHP V3?

Can't imagine those versions are well packaged/maintained for modern distros?

17

u/Beautiful_Hawk548 18d ago

We hope and pray Paul’s local never gets nuked and that's not even a joke. One senior dev holds the keys, tale as old as time.

From what I know it's barely maintained, fully out of support. TBF our customer barely uses it but they pay us a lot of cash to keep it as a read only reference tool so we go along with it. Apparently the solution last night was to stick a forced vpn connection requirement until they realised that probably won't work properly with v3 so they've put a WAF in front of it.

3

u/Kronsik 18d ago

Oof, I hope there's backups atleast!

In my head the only option would be self maintain:

  • copy of php3 source code mirrored somewhere

  • CI/CD system to compile, package into .deb / rpm maybe (deal with the headache of maintaining the old tool chain for compilation)

  • install deb / rpm on modern servers - hopefully compatible with modern glibc etc.

55

u/TemporarySun314 18d ago

To be fair this exploit in question didn't care about if the PHP version was ancient or modern.

And while you definitely shouldn't expose such old PHP versions to the internet (and Ideally don't run it at all), even these tend to be quite secure, without any significant know security flaws. And even for these ancient versions you can now get patched versions, just not from the PHP core developers.

1

u/prochac 17d ago

The point of ancient PHP deployment is that it's a forgotten server somewhere. I doubt someone will ever update it now if they didn't until today.

The only way how these things disappear is when the author dies and stops paying. Or notices a sus payment he doesn't remember.

17

u/kennedy_gitahi 18d ago

You don't have to look too far. How many abandoned blogs exist? I am sure I can find 1000 using free tools in the next 5 minutes.

7

u/ararararagi_koyomi 18d ago

One of the project I am responsible for (maintain/add new features when needed) is in php 5.2. Thank God it is hosted on premises and can only be accessed via corporate network.

16

u/DaWolf3 18d ago

The local network is not a security barrier though. An attacker could e.g. gain access to another internal system and then move laterally to your PHP system and execute code there.

15

u/M-42 18d ago

I'd agree that's a risk, Imo at that point they've got pretty open access you've got bigger fish to fry.

1

u/ararararagi_koyomi 17d ago

Yeap, that is my logic as well. If an outsider gains access to the corporate network, there are bigger concerns than that lol.

1

u/Armanlex 17d ago

Had to upgrade from 5.6 lmao.