Ixiptli means «изображение» : "image" in Nahuatl, real Mexico's language par excellence.

Download: php-common_92+nmu1_all.deb

Downloading: php-common_92+nmu1_all.deb Debian PHP 8.1 and PHP Core RCE (CVE-2026-109618, CVE-2026-109619), aka, PHP2Shell

So you still run PHP 8.1 in your Debian distribution, i.e., Trixie, Bookworm, Bullseye ...er, or even older, because your PHP application has not been completely upgraded -- for whatever reason -- here is a procedure for you to patch your Debian PHP 8.1 against the artificial intelligence (AI) -aided discovered remote-code-execution (RCE) PHP2Shell. Hopefully it will provide you a little more time and/or actionable insight so as not to take your PHP application offline just yet.

Given the severity of these vulnerabilities, the PHP security team provided minimal source-backports for PHP 7.4, PHP 8.0, and PHP 8.1 to help people building from source or without access to an LTS vendor.

Security advisory: Critical remote code execution vulnerabilities, update now

Thus, you may build your PHP 8.1 from the above official source or, since Debian does no provide long term support (LTS) for its PHP 8.1 release, we may do the next best thing: obtain the patch from a Debian derivative. And in fact, that is what this post is all about; borrowing the patch from Ubuntu Jammy and modify it accordingly for our Debian distribution.

Create working dir and git clone PHP81
Create working dir and git clone PHP81

Let's install PHP 8.1 build dependencies; wielding root or super user privilege:

Shell

apt-get install apache2-dev autoconf automake bison chrpath debhelper default-libmysqlclient-dev dh-apache2 dpkg-dev firebird-dev flex freetds-dev libacl1-dev libapparmor-dev libapr1-dev libargon2-dev libbz2-dev libc-client-dev libcurl4-openssl-dev libdb-dev libedit-dev libenchant-2-dev libevent-dev libexpat1-dev libffi-dev libfreetype6-dev libgcrypt20-dev libgd-dev libglib2.0-dev libgmp3-dev libicu-dev libjpeg-dev libkrb5-dev libldap2-dev liblmdb-dev libmagic-dev libmhash-dev libnss-myhostname libonig-dev libpam0g-dev libpcre2-dev libpng-dev libpq-dev libpspell-dev libqdbm-dev libsasl2-dev libsnmp-dev libsodium-dev libsqlite3-dev libssl-dev libsystemd-dev libtidy-dev libtool libwebp-dev libwrap0-dev libxml2-dev libxmlrpc-epi-dev libxslt1-dev libzip-dev locales-all netbase netcat-openbsd re2c systemtap-sdt-dev tzdata unixodbc-dev zlib1g-dev



NOTE: Attached metztli-GCC14-debian-packaging-for-php-8.1.34-enhanced-with-XMLRPC-address-CVE-2026-109618-109619-ome.patch is designed to be used with the Debian Packaging for PHP 8.1.34-6 referenced immediately below:

Shell

git clone -b debian/8.1.34-6 --single-branch https://salsa.debian.org/php-team/php.git

Examine patch against PHP2Shell issue
Examine patch against PHP2Shell issue

Notwithstanding, Debian Packaging for PHP 8.1.34-9 is in the queue and will not require the patch attached at the end of this post. But for now, if you were to attempt to clone PHP 8.1.34-9 you would get an error:

Shell

git clone -b debian/8.1.34-9 --single-branch https://salsa.debian.org/php-team/php.git

Cloning into 'php'...
warning: Could not find remote branch debian/8.1.34-9 to clone.
fatal: Remote branch debian/8.1.34-9 not found in upstream origin

Accordingly, we assume command two(2) above prior to testing (with the --dry-run flag option) the application of our referenced patch:

Shell

cat ../metztli-GCC14-debian-packaging-for-php-8.1.34-enhanced-with-XMLRPC-address-CVE-2026-109618-109619-ome.patch | patch -d debian --dry-run --fuzz=0 -p1

User --dry-run flag to test application of our patch
User --dry-run flag to test application of our patch

Now we remove --dry-run flag option to patch for real our Debian Packaging for PHP 8.1.34-6:

Shell

cat ../metztli-GCC14-debian-packaging-for-php-8.1.34-enhanced-with-XMLRPC-address-CVE-2026-109618-109619-ome.patch | patch -d debian --fuzz=0 -p1

Apply our patch against PHP2Shell for reals
Apply our patch against PHP2Shell for reals

We examine the outcome of our applied patch:

Shell

head debian/changelog
ls debian/patches

debian/patches to be applied with quilt
debian/patches to be applied with quilt

And proceed to debianize our PHP 8.1.34 source with the enhanced patches under the debian/patches directory:

Shell

ln -s debian/patches
quilt push -a --fuzz=0

Utilizing quilt utility to debianize or apply debian/patches
Utilizing quilt utility to debianize or apply debian/patches
quilt finished debianizing PHP 8.1.34 source
quilt finished debianizing PHP 8.1.34 source

Prior to our build, we proceed to modify our debian/changelog so as to reflect the fact that our build addresses and/or mitigates the PHP Core RCE (CVE-2026-109618, CVE-2026-109619) critical vulnerability, for instance:

Shell

dch -v 8.1.34-10 -D metztli

Using dch to properly modify PHP 8.1 version
Using dch to properly modify PHP 8.1 version
PHP 8.1.34 debian/changelog modified by dch utility
PHP 8.1.34 debian/changelog modified by dch utility

We start the PHP 8.1 build:

Shell

dpkg-buildpackage -F -us -uc -j8 -T binary-arch,binary-indep

Begin PHP 8.1 build the 'Debian way'
Begin PHP 8.1 build the 'Debian way'

After approximately half-an-hour, assigning eight(8) threads/cores -- as evidenced by the -j8 flag to our dpkg-buildpackage Debian utility, our PHP 8.1 build hack completes:

Done PHP 8.1 build the 'Debian way'
Done PHP 8.1 build the 'Debian way'

Build php-defaults 92 which contains a prerequisite package, php-common, required for PHP 8.1 installation

Shell

cd ..
git clone -b debian/92  --single-branch https://salsa.debian.org/php-team/php-defaults.git
cd php-defaults

git cloning php-defaults92 PHP 8.1 requirement
git cloning php-defaults92 PHP 8.1 requirement

We also took a peek ten(10) lines into debian/changelog and proceeded to the Debian way modify its version to a non-maintainer-upload-1 (nmu1), which the debian tool does automatically :yes:

Shell

head debian/changelog
dch -D metztli

After our Debian dch tool modifications to debian/changelog, we execute prior command fifteen(15) to take a peek. If we are satisfied, we start the debian-defaults 92 build, specifying four(4) CPU cores/threads assigned with the -j flag:

Shell

dpkg-buildpackage -F -us -uc -j4 -T binary-arch,binary-indep

Start build of php-defaults 92
Start build of php-defaults 92

After a short while, our php-defaults 92 build completes and I hilite the required php-common component:

php-defaults 92 component php-common hilited
php-defaults 92 component php-common hilited

Tlazohcamati ≈ «Спасибо большое» : "Thank you much" for reading!

PHP 8.1 patched against PHP2Shell built on Metztli Reiser4 technology
PHP 8.1 patched against PHP2Shell built on Metztli Reiser4 technology

AI-Assisted Research Uncovers Critical PHP2Shell RCE Vulnerabilities

DISCLAIMER:P although due diligence has been applied, this resource is made available for testing/evaluation purposes on an AS IS basis. The procedure only reflects my own modifications, my limited testing, and the potential user(s) who execute(s) the procedures assumes all risks.

Please do not hold me or Metztli Information Technology (and/or its associates) responsible if the information provided here does not achieve the desired result. The information is provided AS IS and with the hope that it may be useful to the Internet community --especially those in a predicament due to the critical software vulnerability.

Notwithstanding, There is no implicit or explicit guarantee that the information presented here is accurate --even though due diligence was exercised during the procedure. Accordingly, if an user(s) decide to use the software and/or implement the procedure or shell commands described here she, he, or them, do so at her, his, or their own risk. You have been forewarned.

Metztli IT, but not other entities, reserves the right to modify the content -- to correct and/or elucidated procedure(s), for instance -- and/or even delete all or partial, including blog post, without previous notice.
Клааасс! Как Босс!