Skip to content
OpenAdvisories
High · 7.4 CVE-2025-14179 EUVD-2025-209755

SQL injection in pdo_firebird via NUL bytes in quoted strings

Published May 10, 2026 · Updated Jul 15, 2026 · Assigned by php

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

VendorProductAffectedFixed
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.

ReleasePackageFixed inAdvisory
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 —
ReleasePackageFixed inAdvisory
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)
ReleasePackageFixed inAdvisory
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 —
ReleasePackageFixed inAdvisory
openSUSE Tumbleweed php8 8.5.6-1.1 openSUSE-SU-2026:10747-1

Azure Linux

ReleasePackageFixed inAdvisory
Azure Linux 3 php 8.3.31-1 —

Wolfi

ReleasePackageFixed inAdvisory
Wolfi rolling php-8.2 8.2.31-r0 —

Advisories 4

References