CVE-2025-14179: SQL injection in pdo_firebird via NUL bytes in quoted strings
Fixed (SQL injection via NUL bytes in quoted strings). (CVE-2025-14179)
Other sources
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.
— Red Hat
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 8.5.6 - Upgrade
Upgrade
debian/php7.4to a version that resolves this vulnerability.Fixed in 7.4.33-1+deb11u5Fixed in 7.4.33-1+deb11u11 - Upgrade
Upgrade
debian/php8.2to a version that resolves this vulnerability.Fixed in 8.2.31-1~deb12u1Fixed in 8.2.32-1~deb12u1 - Upgrade
Upgrade
debian/php8.4to a version that resolves this vulnerability.Fixed in 8.4.23-1~deb13u1Fixed in 8.4.23-1 - Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 8.2.31 - Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 8.3.31 - Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 8.4.21
Event History
Frequently Asked Questions
What is the severity of CVE-2025-14179?
CVE-2025-14179 is considered a critical severity SQL injection vulnerability affecting certain versions of PHP.
How do I fix CVE-2025-14179?
To fix CVE-2025-14179, upgrade your PHP installation to version 8.5.6 or a later version.
What systems are affected by CVE-2025-14179?
CVE-2025-14179 affects 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.
How does CVE-2025-14179 impact database security?
CVE-2025-14179 allows attackers to exploit SQL injection vulnerabilities to access or manipulate the database.
When was CVE-2025-14179 announced?
CVE-2025-14179 was publicly announced as part of the PHP security advisories.