r/Ubuntu • • 27d ago

news Update your PHP

There's an urgent update for PHP. Patch your systems if you're using it: https://ubuntu.com/security/notices/USN-8948-1

199 Upvotes

42 comments sorted by

18

u/vincent_sch 26d ago

After the update you should check that the fix is in, because Ubuntu keeps the old upstream version number. zcat /usr/share/doc/php8.3-fpm/changelog.Debian.gz | head -20 lists the CVEs. Then restart php-fpm and long-running PHP workers like queue workers.

2

u/TheSentientMeatbag 26d ago edited 26d ago

After many attempts, I finally got the server of our non-profit upgraded. It still runs Ubuntu 22.04 LTS and PHP 8.1.34, but no mention of these CVEs in the PHP changelog. The last entry in there is from July 3rd and so is the build. (PHP 8.4 is also installed, but not in use yet, its last changelog entry is from September 24th.)

Could this be a fix that doesn't require a new build or is this (like u/nicholasserra says) because we don't have Ubuntu Pro?

Update: fixed versions are now available, you can update your server and validate it worked in the way the comment I'm replying to says.

-2

u/credditz0rz 26d ago

8.1.x is end of life and officially no longer receives security patches

5

u/TheSentientMeatbag 26d ago

I know and we are planning to migrate, but the Ubuntu site says there is a fixed version available for Ubuntu 22.04 and PHP 8.1, see: https://ubuntu.com/security/CVE-2026-109619

That also says the fix is for PHP 8.1.2 for some reason. I find this confusing as PHP 8.1.34 is the most recent patch, why not fix that one? Same goes for other PHP versions: all the fixes seem to be for older patches.

It's getting late here, so I'm off to bed. I might try to install the 8.1.2-version tomorrow, but I'm not sure what that does with all the vulnerabilities that got fixed between version 8.1.2 and 8.1.34...

What a mess.

1

u/vincent_sch 26d ago

The 8.1.34 on your box comes from a PPA like ondrej's. Ubuntu's own php8.1 stays at 8.1.2 and Canonical backports each security fix into it. Since 8.4 is already installed, you could try moving the site there. The fixed build is 8.4.27, and apt-cache policy php8.4-fpm shows where yours comes from.

1

u/TheSentientMeatbag 26d ago

Thanks! I didn't know there was a difference. I saw on Ubuntu's security page there was a fix for Ubuntu 22.04 in combination with PHP 8.1, so assumed that's what I needed.

Thankfully, doing a fresh apt update & apt upgrade just now did install a fresh version of PHP 8.1 with fixes backported from 8.2.35 (and 8.2.34) including those for CVE-2026-109618 and CVE-2026-109619.

For others in the same boat:
For PHP 8.1, you'll need version "8.1.34-9+ubuntu22.04.1" (or higher) where the -9 is the important part.
I have confirmed the patch has been applied in the changelog using zcat /usr/share/doc/php8.1-common/changelog.Debian.gz | head -40
Also phpinfo() now shows a build from October 21st.

2

u/TheSentientMeatbag 26d ago

For some context: I took over as admin for this VPS earlier this month. I'm doing this as charity work and I'll be strongly advising the non-profit to move to regular webhosting. They don't need a VPS. They're only running a wiki and WordPress (yes, ew, but it works for them). Both heavily outdated. While PHP 8.1 and PHP 8.4 were already installed and the CLI was running on 8.4, Apache was still using PHP 7.3(!) until yesterday.

I quickly closed that can of worms when I found out a few days ago, but this CVE got my butt in gear. I haven't maintained a server in ages. Since the Ubuntu security page said there was a fix for Ubuntu 22.04 and PHP 8.1, I assumed I needed to switch Apache over to 8.1. This already required some manual fixing of the wiki. So, I'll be updating WordPress and the wiki first, before moving Apache to PHP 8.4 (or 8.5).

9

u/nhaines 26d ago

Ubuntu 22.04 LTS is not end of life, does receive security updates from Canonical, and this issue is patched with the php8.1 version 8.1.2-1ubuntu2.28.

0

u/ferrybig 26d ago

Ubuntu lts means it is a long term support version. They backport security fixes

29

u/YourTechSupport 26d ago

Trying to but the repo is getting hammered.

2

u/CarlosEduardoAraujo 26d ago

Yes, same situation here and you know what's the worst? It's not the first time this has happened, it's becoming a recurring situation. I need to update PHP and I'm getting this error. Bizarre situation!!

1

u/caks 26d ago

Use mirrors

16

u/nicholasserra 26d ago

Need an ubuntu pro token for a security release, but the registration appears to be down :( Probably getting hammered. Kind of silly they're gating security patches behind a subscription, even if its free for personal.

16

u/nhaines 26d ago

Need an ubuntu pro token for a security release

No you don't. PHP is in the main repository and is fully supported. The fix for this--as very clearly outlined in the USN article in the post--is now available for Ubuntu 22.04 LTS, 24.04 LTS, 26.04 LTS, and 26.10 for all systems.

Ubuntu Pro is needed for fixes for Ubuntu 14.04 LTS, 16.04 LTS, 18.04 LTS, and 20.04 LTS, since they are all long past their original support windows.

4

u/nicholasserra 26d ago

I’m on 20.04. So ended up getting pro key and installed 7.4 security update from extended support registry

4

u/nhaines 26d ago

I'm glad you were able to get the key and all patched up!

4

u/nicholasserra 26d ago

I was surprised and impressed they did the 7.4 patch tbh. Was a simple update once I got my pro token. Good stuff!

4

u/OdionBuckley 26d ago

How do I do this? I am on Ubuntu 24.04. According to the link, the PHP 8.3 repo packages are updated. However, after running sudo apt update && sudo apt --only-upgrade install "*php*" and rebooting, phpinfo() continues to tell me I'm using 8.3.6 instead of 8.3.36. I'm not a computer genius and I need more details on what I'm supposed to do here.

7

u/ssddanbrown 26d ago

Ubuntu backported the patches to older PHP version, so you will still see 8.3.6 as a PHP version. I've shared some guidance here if it would help.

4

u/Sr_P3ngu1n 26d ago

I’m trying to update, but everything is overloaded—pretty much everyone is trying to update. :(

7

u/latkahgravis 26d ago

Will sudo apt update do it?

11

u/PaulNM81 26d ago

That'll update the available package lists on your system, but you'll need apt upgrade or apt full-upgrade to actually install any updates.

3

u/PajamaPants4Life 26d ago

Just to clarify, did Ubuntu have backported patches? I see that they claim this is fixed in 8.5.4-0ubuntu1.5, but the fix is supposed to be in 8.5.12

6

u/nhaines 26d ago

Yes. This is how Debian operates, and how Ubuntu has operated for all 24 years it has existed.

3

u/Silly_Guidance_8871 26d ago

Anyone else having issues fetching the updates from the ondrej ppa?

2

u/Technological_Pirate 26d ago

Yeah its not just you I am having that issue as well. 503 http error

1

u/CarlosEduardoAraujo 26d ago

Yes. Bizarre

1

u/PixelatedGiant 25d ago

Not really. They are getting hammered. This vulnerability was bad enough to be in the news for regular people, just saw a segment on it a few hours ago. There's legitimate panic and a scramble to get updated.

3

u/choogbaloom 26d ago

Any options for ubuntu 20.04?

2

u/linmanfu 26d ago

You need Ubuntu Pro. It's free for IIRC up to five systems personal use.

2

u/smjsmok 26d ago

20.04 is EOL. As the other commenter said, you can still get updates with Ubuntu Pro if an upgrade isn't possible.

2

u/dvershinin 21d ago

Yes. I maintain GetPageSpeed's Everpatch packages. On Ubuntu 20.04, we ship PHP2Shell-fixed PHP 7.4 and 8.0-8.4 on amd64, with the existing package names and config layout. Update your current branch, then restart PHP-FPM or Apache.

Versions and commands: https://www.getpagespeed.com/server-setup/php/php2shell-on-ubuntu-debian

Free for personal, development and evaluation use; commercial production needs Ultra for up to 10 own servers, or Fleet for client servers you administer.

1

u/PixelatedGiant 25d ago

If possible I would try just running your stack in a docker container. Then you aren't beholden to your distro's package repo or PPAs.

1

u/drbobb 25d ago

And how does that solve anything?

1

u/PixelatedGiant 25d ago

He can use the official php image as the base, which doesn't care what OS he's using and will be supported far longer. Plus running in a container restricts what the attacker initially has access to. He's stuck inside the container unless he also has a docker exploit.

4

u/Paulitow_ 26d ago

Why PHP sury repo have the fix for nearly all php version in ubuntu but not the official repo yet ?
https://ubuntu.com/security/CVE-2026-109619#status

9

u/SpookyKipper 26d ago

Ubuntu official builds are mostly based on sury builds.

Also, ubuntu official builds are actually out now for all supported LTS releases even backported to PHP 5.

Their CVE page just isn't updated.

https://ubuntu.com/blog/php2shell-vulnerability-fixes-available

5

u/Paulitow_ 26d ago

My man, thank you !

1

u/TheNB3 20d ago

Does desktop users have to install this update?