Fix guides / Debian

Fix php2shell on Debian

Debian 13 (trixie) and Debian 12 (bookworm) have fixed packages in the security archive. Upgrade with apt and restart PHP. If your PHP comes from the Sury repository (packages.sury.org), it follows upstream numbering and needs 8.5.12, 8.4.27, 8.3.36, 8.2.35 or later.

These steps fix CVE-2026-109618 and CVE-2026-109619. Upstream releases and distribution package numbers are in the fixed versions table.

Can’t update right now? Apply the temporary mitigations.

Not sure which PHP your site uses? Start with the self-check.

1. Check what you have installed

Installed PHP packages and their versions:

dpkg -l 'php*' 'libapache2-mod-php*' | grep ^ii

Installed and available version (replace 8.2 with your branch):

apt-cache policy php8.2-common

The fixes come from the security archive. Make sure it is configured:

grep -rhs security.debian.org /etc/apt/sources.list /etc/apt/sources.list.d/

Does PHP come from the Sury repository? If this prints anything, compare with the upstream fixed versions:

grep -rhs sury /etc/apt/sources.list /etc/apt/sources.list.d/

Fixed package versions

DistributionPackageFixed package versionAdvisory
Debian 13 (trixie)php8.48.4.27-1~deb13u1DSA-6574-1
Debian 12 (bookworm)php8.28.2.35-1~deb12u1DLA-4848-1

2. Install the update

Upgrade only the PHP packages of your branch (replace 8.2):

sudo apt update && sudo apt install --only-upgrade 'php8.2*' 'libapache2-mod-php8.2'

Other Debian releases are not listed here yet. Check the Debian security tracker for CVE-2026-109618 and CVE-2026-109619 before relying on them.

3. Restart PHP

Restart every PHP-FPM service:

sudo systemctl restart "php*-fpm"

If Apache runs PHP as a module (mod_php):

sudo systemctl restart apache2

4. Verify

The installed changelog should mention both CVEs (replace 8.2):

zgrep -E "CVE-2026-10961[89]" /usr/share/doc/php8.2-common/changelog.Debian.gz

Then confirm the version your website really uses with the temporary file from the self-check page.

Other environments

FAQ

Debian 12 now reports PHP 8.2.35. Is that the upstream release?

Yes. The bookworm package 8.2.35-1~deb12u1 carries upstream 8.2.35, which contains the fix.

Why is the bookworm fix a DLA and not a DSA?

Debian 12 security support is handled by the Debian LTS team, which publishes DLA advisories. The packages still come from the regular security archive.