On 30 July 2026 the PHP project released PHP 8.5.9, 8.4.24, 8.3.33 and 8.2.33 as security releases. The fix most likely to matter to ordinary web applications is an SQL injection in the PostgreSQL extension's convenience functions such as pg_insert() and pg_select(). The round also fixes an out-of-bounds write in bccomp(), updates the bundled GD library and stops a crash caused by crafted phar archives.
At a glance
| Item | Details |
|---|---|
| Product | PHP (php-src), branches 8.2 to 8.5 |
| Fixed versions | 8.5.9, 8.4.24, 8.3.33, 8.2.33 (30 July 2026) |
| CVEs | CVE-2026-17543, CVE-2026-9672, CVE-2026-7260 (all branches); CVE-2026-17544 (8.4 and 8.5 only) |
| Severity | High (PHP advisories for CVE-2026-17543 and CVE-2026-17544) |
| Debian | DSA-6406-1 (trixie, php8.4 8.4.24-1~deb13u1, 31 July); DLA-4732-1 (bookworm, php8.2 8.2.33-1~deb12u1, 11 August) |
What the vulnerabilities are
CVE-2026-17543: SQL injection in pgsql helper functions
pg_insert(), pg_update(), pg_select() and pg_delete() escape values with PQescapeStringConn() and then wrap them in an E'...' escape string constant. With standard_conforming_strings = on, the PostgreSQL default since version 9.1, that escaping does not double backslashes, so a value containing a backslash followed by a quote can end the string early and inject SQL. PHP's advisory GHSA-7qpv-r5mr-78m4 rates it High, and the CVE record scores it CVSS 4.0 8.1. The fix switches to non-escaping string constants. Code that uses pg_query_params() or PDO prepared statements does not go through this path.
CVE-2026-17544: out-of-bounds write in bccomp() (8.4 and 8.5)
Attacker-supplied operands and scale passed to bccomp() could cause an out-of-bounds write with stack and heap corruption. PHP rates it High (GHSA-x692-q9x7-8c3f, CVSS 4.0 8.1). Debian's tracker notes the code was introduced in 8.4.3 and is not present in 8.2.
CVE-2026-9672: GD library update
The ChangeLog lists this as an upgrade of the bundled libgd. Debian's advisories for its separate libgd2 package describe a flaw that may cause denial of service or potentially code execution when a malformed GIF file is processed. The CVE had no published record on CVE.org when we checked.
CVE-2026-7260: phar crash with circular symlinks
A crafted tar-based phar archive with symbolic links pointing at each other causes unbounded recursion and crashes the PHP process (GHSA-vc5h-9ppw-p5f3, Medium, CVSS 4.0 5.4).
None of these CVEs is in CISA's Known Exploited Vulnerabilities catalog (30 October 2026 edition).
Are you affected?
Upstream builds older than 8.5.9, 8.4.24, 8.3.33 or 8.2.33 are affected. To find the risky pgsql calls in your code:
php -v
grep -rnE 'pg_(insert|update|select|delete)\(' /var/www --include='*.php' | headOn Debian, compare with DSA-6406-1 (trixie) and DLA-4732-1 (bookworm). Debian fixed the GD issue in the libgd2 library separately: DSA-6409-1 (trixie, 2.3.3-14~deb13u1) and DLA-4731-1 (bookworm, 2.3.3-9+deb12u1). The library's binary package is libgd3:
apt policy php8.4-pgsql libgd3 # trixie
apt policy php8.2-pgsql libgd3 # bookwormUbuntu users should check Ubuntu Security Notices.
How to update
On Debian and Ubuntu, sudo apt update followed by sudo apt upgrade installs both the PHP and libgd updates. For source, Windows and container builds, use the newest release of your branch from php.net/downloads; as of 31 October 2026 that is 8.5.12, 8.4.27, 8.3.36 or 8.2.35.
Restart or reboot?
No reboot. Restart PHP-FPM, Apache (mod_php) and long-running PHP workers so they load the new PHP and the new libgd:
sudo systemctl restart php8.4-fpm # or php8.2-fpm on bookworm
Sources
- php.net/archive/2026.php
- php.net/ChangeLog-8.php#8.4.24
- php.net/ChangeLog-8.php#8.2.33
- github.com/php/php-src/security/advisories/GHSA-7qpv-r5mr-78m4
- github.com/php/php-src/security/advisories/GHSA-x692-q9x7-8c3f
- github.com/php/php-src/security/advisories/GHSA-vc5h-9ppw-p5f3
- cve.org/CVERecord?id=CVE-2026-17543
- cve.org/CVERecord?id=CVE-2026-17544
- cve.org/CVERecord?id=CVE-2026-7260
- security-tracker.debian.org/tracker/CVE-2026-17544
- security-tracker.debian.org/tracker/CVE-2026-9672
- security-tracker.debian.org/tracker/DSA-6406-1
- lists.debian.org/debian-security-announce/2026/msg00317.html
- security-tracker.debian.org/tracker/DLA-4732-1
- lists.debian.org/debian-lts-announce/2026/08/msg00022.html
- lists.debian.org/debian-security-announce/2026/msg00320.html
- lists.debian.org/debian-lts-announce/2026/08/msg00021.html
- packages.debian.org/source/trixie/libgd2
- cisa.gov/known-exploited-vulnerabilities-catalog
Comments
0 total · 0 threads