Description
In PHP versions 8.2.* before 8.2.31, 8.3.* before 8.3.31, 8.4.* before 8.4.21, and 8.5.* before 8.5.6, the PDO Firebird driver improperly handles NUL bytes when preparing SQL queries. During token-by-token query construction, a string token containing a NUL byte is copied via strncat(), which stops at the NUL byte, dropping the closing quote and causing subsequent SQL tokens to be interpreted as part of the string. This allows SQL injection when attacker-controlled values are quoted via PDO::quote() and embedded in SQL statements.
Affected products
| Vendor | Product | Affected | Fixed |
|---|---|---|---|
| PHP Group | PHP | 8.2.* – < 8.2.31, 8.3.* – < 8.3.31, 8.4.* – < 8.4.21, 8.5.* – < 8.5.6 | 8.2.31 |
Fixed in Linux distributions
Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.
Debian
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian 14 | php8.4 | 8.4.21-1 | — |
| Debian 13 | php8.4 | 8.4.21-1~deb13u1 | — |
| Debian 12 | php8.2 | 8.2.31-1~deb12u1 | — |
Ubuntu
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu 26.04 LTS | php8.5 | 8.5.4-0ubuntu1.1 | — |
| Ubuntu 25.10 | php8.4 | 8.4.11-1ubuntu1.2 | — |
| Ubuntu 24.04 LTS | php8.3 | 8.3.6-0ubuntu0.24.04.9 | — |
| Ubuntu 22.04 LTS | php8.1 | 8.1.2-1ubuntu2.24 | — |
Show 4 more (older releases, extended support, other products)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu Pro 20.04 LTS | php7.4 | No fix yet | — |
| Ubuntu Pro 18.04 LTS | php7.2 | No fix yet | — |
| Ubuntu Pro 16.04 LTS | php7.0 | 7.0.33-0ubuntu0.16.04.16+esm19 | USN-8513-1 |
| Ubuntu Pro 14.04 LTS | php5 | No fix yet | — |
openSUSE
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| openSUSE Tumbleweed | php8 | 8.5.6-1.1 | openSUSE-SU-2026:10747-1 |
Azure Linux
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Azure Linux 3 | php | 8.3.31-1 | — |
Wolfi
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Wolfi rolling | php-8.2 | 8.2.31-r0 | — |
Advisories 4
- WID-SEC-2026-2455 Oracle Solaris Drittanbieterkomponenten: Mehrere Schwachstellen BSI CERT-Bund (WID) · Nov 12, 2026
- WID-SEC-2026-1433 PHP: Mehrere Schwachstellen BSI CERT-Bund (WID) · Oct 21, 2026
- USN-8513-1 php7.0 vulnerabilities Ubuntu Security Notices (USN) · Jul 6, 2026
- openSUSE-SU-2026:10747-1 php8-8.5.6-1.1 on GA media SUSE / openSUSE Security Updates · May 12, 2026