CVE-2025-14179
JSON

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 packageVersionsReported by
pdo_firebirdfrom 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.6CVE List
phpNot specifiedCVE List
php8.4Not specifiedCVE List
php:7.4/phpNot specifiedCVE List
php:8.2/phpNot specifiedCVE List
php:8.3/phpNot specifiedCVE List
php phpfrom 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.6NVD
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.6Bitnami 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.6Bitnami 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.6Bitnami Vulnerability Database

All scores

php7.4high CVSS:4.0CVSS: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-SADP8.1high CVSS:3.1CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
NVD9.8critical CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Bitnami Vulnerability Databasecritical rating

Classification

CWE-89

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

SourceRecordLicence
CVE ListCVE-2025-14179 changed 2026-07-15CVE Terms of Use
NVDCVE-2025-14179 changed 2026-07-25Public domain
Bitnami Vulnerability DatabaseBIT-LIBPHP-2025-14179 changed 2026-11-11Apache-2.0
Bitnami Vulnerability DatabaseBIT-PHP-2025-14179 changed 2026-11-11Apache-2.0
Bitnami Vulnerability DatabaseBIT-PHP-MIN-2025-14179 changed 2026-11-11Apache-2.0