EXPOSURES › CVE-2025-14179
CVE-2025-14179
CRITICALA SQL injection flaw in PHP's PDO Firebird driver allows attackers to bypass quoting protections and execute arbitrary SQL commands.
The PDO Firebird driver mishandles NUL bytes during query construction, dropping closing quotes and enabling SQL injection even when PDO::quote() is used. DIB organizations must patch PHP versions 8.2.31+, 8.3.31+, 8.4.21+, and 8.5.6+ immediately, as this flaw could allow data exfiltration, database manipulation, and lateral movement within systems relying on Firebird databases.
Shame score — A critical SQL injection vulnerability in a widely used database driver that bypasses standard quoting protections, indicating a fundamental flaw in the application layer that could lead to severe data breaches and system compromise.
▸ RECOMMENDED ACTION Remote code execution — patch the affected products on priority.
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.