CVE-2026-25289
Published:July 07, 2026
Updated:July 07, 2026
SQL injection in PHP pdo_firebird via NUL bytes in quoted strings. During PDO::prepare, the pdo_firebird driver reparses and reconstructs the SQL statement token by token using the NUL-terminated strncat() in ext/pdo_firebird/firebird_driver.c. When a quoted string literal contains a NUL byte, strncat() stops copying at the NUL and drops the closing quote, so attacker-controlled input that passed through PDO::quote() spills out of the string literal and into executable SQL, enabling SQL injection (e.g. UNION-based extraction of database version details).
Affected Packages
https://github.com/php/php-src.git (GITHUB):
Affected version(s) >=php-8.3.0 <php-8.3.31Fix Suggestion:
Update to version php-8.3.31https://github.com/php/php-src.git (GITHUB):
Affected version(s) >=php-8.4.0 <php-8.4.21Fix Suggestion:
Update to version php-8.4.21https://github.com/php/php-src.git (GITHUB):
Affected version(s) >=php-8.5.0 <php-8.5.6Fix Suggestion:
Update to version php-8.5.6https://github.com/php/php-src.git (GITHUB):
Affected version(s) >=php-8.2.0 <php-8.2.31Fix Suggestion:
Update to version php-8.2.31https://github.com/php/php-src.git (GITHUB):
Affected version(s) >=php-8.1.0 <php-8.1.34Fix Suggestion:
Update to version php-8.1.34Related Resources (1)
Do you need more information?
Contact UsCVSS v4
Base Score:
9.2
Attack Vector
NETWORK
Attack Complexity
HIGH
Attack Requirements
NONE
Privileges Required
NONE
User Interaction
NONE
Vulnerable System Confidentiality
HIGH
Vulnerable System Integrity
HIGH
Vulnerable System Availability
HIGH
Subsequent System Confidentiality
NONE
Subsequent System Integrity
NONE
Subsequent System Availability
NONE
CVSS v3
Base Score:
8.1
Attack Vector
NETWORK
Attack Complexity
HIGH
Privileges Required
NONE
User Interaction
NONE
Scope
UNCHANGED
Confidentiality
HIGH
Integrity
HIGH
Availability
HIGH