Unofficial Hacker News companion — get notified on comment replies, and more.

Elephant in the Server Room: >50% of WordPress Sites Run PHP That's EOL by Jan (opens external site)

285 points by xadz 3 days ago | adamgreenough.net | 132 comments on HN | Vote on HN (opens Hacker News) |

View full thread · View on Hacker News

Comment thread (37)

  1. The real elephant in the room is that hosting platforms and normal server operating systems support and maintain versions of PHP for years after the PHP project stops doing so.

    It doesn't really matter what the PHP project does or doesn't support. RHEL/Ubuntu will get you updates for five to ten years even if PHP drops support after a week, as can the repositories that are derived from them.

    If you're running PHP 7.4 on Rocky 8.4, you have nothing to worry about for a couple years, despite what alarmist blogs may be shouting.

    PHP's fast pace is good for the language, which has improved immensely over the years, but that doesn't reflect what PHP users have ever been running. For the exact same reason, KDE/Gnome users running this year's or even last year's version are only a small segment of the total user base, despite there not even being any notable LTS support.

    Replies (6)
    1. There are of course lots of well maintained alternatives to official releases. Security aside, in my opinion the commitment to back-compatibility from WordPress is a big negative to the developers who work on themes, plugins and core who can't use newer, faster, cleaner PHP features while supporting the majority of its userbase. Only in 2023 did they drop PHP 5.6, 5 years after its EOL.

      The maintainers seem to have an informal policy of 5% of users running a PHP version is what they should be supporting. It's a chicken & egg though as the quote in the post says, many people don't have the incentive to bother upgrading if it works anyway.

      It was a better thing in the past, but after the year WP & PHP has had with increasing vulnerabilities discovered, the if it ain't broke don't fix it mindset seems outdated.

      Replies (1)
      1. The maintainers are clowns. For example one of first things many installs need to do is to set it up to support X-Forwarded-For header. There are no options for it in WP. There were multiple tickets asking for it. It's about 5 lines of code ("if this header from the loadbalancer/rp IP, set host ip to this header").

        Every time they refused with "oh buh it's not RFC, no matter near every piece of software does it". For DECADE

        When it got standardised into RFC (which was DECADE ago) guess whether they implemented it? Of course not. They started whining "oh but it's from the internet header, someone configuring it wrong might let people spoof IP". Sensible defaults that user could then set up for their env ? who needs that.

        Wordpress project is a history of developer incompetency for last 23 years

        Replies (4)
        1. Such pristine example of classic developer being unkind know it all
        2. This is a sane approach. Your webserver can and should handle X-Forwarded-For, not some PHP application. Use apache2 with mod_remoteip and you will get the client IP in REMOTE_ADDR. If you don't do that any client can send XFF.
          Replies (1)
          1. That's so typical old PHP developer mind of "let's have half of the app written in mod_rewrite and web server config files".
            Replies (3)
            1. Typical PHP developer has no information which load balancer to trust. It is not his job.
            2. It's not. mod_remoteip != mod_rewrite, stop shifting the topic. Besides that, if you have Apache (or nginx, doesn't really matter) you want mod_remoteip otherwise logs are not showing the correct IP.

              Continue this thread (1 replies) →

            3. And that is so typical new PHP developer to try to jam infra tasks into the web application level and then wonder why their buggy site slows to a crawl.
        3. But they instead have time to fast track a feature no one needs and will cause issues when it’s turned on by default as pointed out by many Wordpress veterans. Talking about the new /random url that will randomly redirect to some content.

          There’s a lot of really poorly designed plugins that improperly use custom post types as storage and assume complex slugs are safe. Ran into one client that had a plugin that generated invoice urls. If they don’t disable this new redirect they will be exposing customer information.

          It also seemed to also apply to uploaded media last I checked. That’s one I really hope they filter out by default.

        4. Of all the weird things with Wordpress .. why would you want to pick that one?

          Making things convenient for your particular use case but a potential security issue for many others is not a good tradeoff, and the developers' position is reasonable here.

          It is not strange that you have to tell your web server about your load balancer (as well as your certificate name, where to send logs, your application path etc.). For the vast majority of users, there's nothing more to it.

          It would be a lot more weird if applications ignored this information and parsed headers with their own logic.

    2. > RHEL/Ubuntu will get you updates for five to ten years

      Mate.

      MATE.

      Both RHEL AND Ubuntu just recently couldn't get kernel CVE fixed for 3 weeks while both Debian and the hackery ones like Arch did that just fine

      Replies (2)
      1. That was really weird and doesn’t reflect normal release timetables.
        Replies (3)
        1. We arent in normal times for vulnerabilities.
          Replies (1)
          1. What makes you think this isn’t the new normal?
        2. Still doesn’t mean it didn’t happen or won’t happen again.
        3. Based on what are you judging the normal release timetables?

          I have not done proper math, but the delay between kernel tip and backports making their way into default Ubuntu binary repositories has always been like that for me. Sometimes a week early, sometimes a week later, but generally not trending down. And certainly not instilling confidence that the procedures will be ready to deal with a seriously-zomg-RCE bug without deviating from most everything that currently (generally..) prevents shipping broken binaries. (Relatedly, Ubuntu still has that two week update inhibition on Firefox - even though Firefox just reduced release cadence, lol)

      2. And yet they released the PHP backports at the exact date every other distribution has.

        Ubuntu took its sweet time testing their kernels, for sure. Doing a release schedule akin to Windows is surely something their paying customers should be annoyed by. However, it's hardly the end of Ubuntu like internet forums seem to think it is.

        Hundreds of millions of servers ran vulnerable kernels for weeks and yet there has been no news of worms spreading like wildfire across the internet. Every CVE now claims to be the end of the world and it's honestly tiring to see people fall for grand claims every single time.

    3. "You have nothing to worry about for a couple years"

      have you heard of php2shell for instance? The problem is they don't offer patches to < PHP 8.

      I think the only way that's true is if you install a proxy like https://github.com/Qbix/proxy - and even that doesn't protect you from the latest vulnerabilities discovered in e.g. PHP's backtrace for fatal errors.

      Replies (4)
      1. Shared host wordpress installs are hardened as if the www-data user is already compromised so even if it's hacked it can't do anything.
        Replies (1)
        1. Really? :)
          Replies (1)
          1. Yes that's the absolute first thing a mutual host does.
            Replies (1)
            1. > so even if it's hacked it can't do anything

              This is what my comment is about. Hardening your server is the bare minimum you need to do today, and most certainly does not mean that you are safe.

      2. Pretty sure they had patches for 7.4 and some other versions for php2shell.
        Replies (1)
        1. The php team had an official 7.4 patch, yes. That was the only 7 or older version, that got an official patch by the php team, though. But it saved my beacon that day. Because it gave me the time to first patch php and then migrate an old application onto something more reasonable (needed to rewrite it, but reduced the complexity and the number of dependencies, so a net positive in my books).
      3. I had a fully patched version of _5.6_ within a few hours of disclosure. This thread is specifically about non-official support, it's weird to just... ignore that. Were you meaning to reply to a different thread on the same post?

        Oh, the post is a simple ego ad for a vibe coded mitigation that may or may not accomplish the stated goal, and may or may not introduce a fun new layer with fun new potential issues.

        Replies (1)
        1. Well, by that same logic, your ego 5.6 patch may or may not actually work, but thanks for telling us about it?

          I’d say making a proxy to help people and giving it away under MIT license is making the situation better for them than being totally exposed. But I’m happy for you tho that you’ve been able to patch your 5.6, your skills are impressive. Or sorry that happened.

          Replies (1)
          1. No, they likely got the fix from the vendor they use (e.g. RedHat).
      4. You can get the patched EOL versions right here, for example: https://github.com/remicollet/php-src-security

        All the way down to 5.6.

    4. I’m unconvinced that this is enough in general.

      I used to maintain several npm packages. As a general rule, I followed the nodejs release schedule. When nodejs versions stopped being officially supported, I stopped supporting them in my packages too. It’s nice to be able to use modern JS features. And nodejs has long, well documented support timelines, including LTS versions.

      But it didn’t stop people filing bugs on my packages due to incompatibilities with ancient nodejs versions. One person replied back that they were using the latest version of node that was in their OS package repository. Fully 10 years old or something at that point - and already past its official EOL date. They didn’t have a reasonable path to update. And I’m not interested in supporting ancient software forever, for fun. I told them to use an old version - but it’s got known bugs.

      Unless Debian or whatever is going to mirror all of npm, I’m not sure what they expect people to do. For well maintained projects like php and node, you’re generally gonna have fewer problems using modern versions.

      https://nodejs.org/en/about/previous-releases

      Replies (2)
      1. Yeah, it's an issue with debian in particular. Mainly because they have such a long release cycle and they like to lock in to major versions of software packages rather than updating them. Currently node 20 is the latest version and the next version of Debian is due out some time next year.

        Seems like by having such long release cycles they are creating maintenance headaches for themselves.

      2. I don't know how NPM deals with these things, but Composer (PHP's NPM equivalent) will loudly proclaim versions are vulnerable even if there are no upgrade paths.

        Other people's old runtimes aren't your problem as an OSS maintainer, of course. However, WordPress supports PHP 7.4 for all recent versions. Other projects and plugins might not be so generous, but whether or not this is a problem will depend on a case-by-case basis.

        Debian doesn't vendor all NPM packages, but they do vendor hundreds of them: https://pkgs.org/search/?q=node-

        Replies (1)
        1. Why? Are they doing that by hand? There’s over 4 million packages in npm. “Hundreds” gives you about 0.01% of npm. For any given package, that means you have a 1/10 000 chance of finding it in apt. I hardly see the point.
          Replies (1)
          1. Because someone decided to add one or more projects based on the digital quicksand that is NPM to the official repositories, and Debian wanted to include it in their repositories. They need to maintain all dependencies for the support period of that specific release.
    5. The real.elephant in the room.is that many hosting providers offer shard hosting only for PHP code coupled with CPanel, but no other alternative, at a fair price. Heroku has been really a drop in the ocean, letting also Docker workloads
    6. Speaking as someone who maintains the infrastructure for a company who has deployed hundreds (maybe thousands?) of Wordpress sites over the past 15 years, the other elephant in the room is that it's pretty much impossible to get most of these small-time clients to pay for keeping their software up to date.

      Possibly writing better contracts that allow us to shut the site down if they down update, or building in enough margin to cover annual updates (prices us out n% of the time) might have been mitigations. It's actually been surprising how many clients have called to see if their sites are vulnerable in the wake of recent events.

      The cost of keeping a Wordpress site up to date is not as simple as keeping PHP up to date. There is a lot of QA involved, and breakages still happen frequently. I'm not the expert in that area - my job is to make it possible to run the latest PHP.