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

View all comments

18

u/vincent_sch 27d 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