CVE-2025-14179

SQL injection in pdo_firebird via NUL bytes in quoted strings

State
Published
Severity
7.4 High
Published
May 10, 2026
Updated
Jul 15, 2026
Reserved
Dec 6, 2025

Read the record on cve.org

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.

Scores

CVSSScoreVectorSource
4.07.4 HighCVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:A/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H/E:P/AU:Y/RE:M/U:Amberphp
3.18.1 HighCVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:Hredhat-SADP

Weaknesses

  • CWE-89 Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')

Affected Products

ProductVersions
PHPPHP Group
  • 8.2.* to before 8.2.31Affected
  • 8.3.* to before 8.3.31Affected
  • 8.4.* to before 8.4.21Affected
  • 8.5.* to before 8.5.6Affected

References

Every record here comes from the CVE Program’s CVE List. © 1999–2026 The MITRE Corporation. CVE is a registered trademark of The MITRE Corporation. The records are reproduced under the CVE Program terms of use.