7.4high
SQL injection in pdo_firebird via NUL bytes in quoted strings
- Severity
- 7.4high CVSS:4.0 by php
- Exploit likelihood
- 0.44% (higher than 39% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- php
- Also known as
- BIT-LIBPHP-2025-14179BIT-PHP-2025-14179BIT-PHP-MIN-2025-14179GHSA-w476-322c-wpvm
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
| Product or package | Versions | Reported by |
|---|---|---|
| pdo_firebird | from 8.2.* before 8.2.31, from 8.3.* before 8.3.31, from 8.4.* before 8.4.21, from 8.5.* before 8.5.6 | CVE List |
| php | Not specified | CVE List |
| php8.4 | Not specified | CVE List |
| php:7.4/php | Not specified | CVE List |
| php:8.2/php | Not specified | CVE List |
| php:8.3/php | Not specified | CVE List |
| php php | from 8.2.0 before 8.2.31, from 8.3.0 before 8.3.31, from 8.4.0 before 8.4.21, from 8.5.0 before 8.5.6 | NVD |
| libphp (Bitnami) | from 8.2.0 before 8.2.31, from 8.3.0 before 8.3.31, from 8.4.0 before 8.4.21, from 8.5.0 before 8.5.6 | Bitnami Vulnerability Database |
| php (Bitnami) | from 8.2.0 before 8.2.31, from 8.3.0 before 8.3.31, from 8.4.0 before 8.4.21, from 8.5.0 before 8.5.6 | Bitnami Vulnerability Database |
| php-min (Bitnami) | from 8.2.0 before 8.2.31, from 8.3.0 before 8.3.31, from 8.4.0 before 8.4.21, from 8.5.0 before 8.5.6 | Bitnami Vulnerability Database |
All scores
| php | 7.4high CVSS:4.0 | CVSS: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:Amber |
| redhat-SADP | 8.1high CVSS:3.1 | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H |
| NVD | 9.8critical CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
| Bitnami Vulnerability Database | critical rating |
Classification
SSVC (CISA-ADP): exploitation none, automatable no, technical impact total.
What each source says
CVE List
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.
NVD (es)
En versiones de PHP 8.2.* anteriores a 8.2.31, 8.3.* anteriores a 8.3.31, 8.4.* anteriores a 8.4.21, y 8.5.* anteriores a 8.5.6, el controlador PDO Firebird maneja incorrectamente los bytes NUL al preparar consultas SQL. Durante la construcción de consultas token por token, un token de cadena que contiene un byte NUL se copia mediante strncat(), lo que se detiene en el byte NUL, eliminando la comilla de cierre y haciendo que los tokens SQL subsiguientes se interpreten como parte de la cadena. Esto permite la inyección SQL cuando los valores controlados por el atacante se citan mediante PDO::quote() y se incrustan en sentencias SQL.
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2025-14179 changed 2026-07-15 | CVE Terms of Use |
| NVD | CVE-2025-14179 changed 2026-07-25 | Public domain |
| Bitnami Vulnerability Database | BIT-LIBPHP-2025-14179 changed 2026-11-11 | Apache-2.0 |
| Bitnami Vulnerability Database | BIT-PHP-2025-14179 changed 2026-11-11 | Apache-2.0 |
| Bitnami Vulnerability Database | BIT-PHP-MIN-2025-14179 changed 2026-11-11 | Apache-2.0 |