Логотип exploitDog
Консоль
Логотип exploitDog

exploitDog

redhat логотип

CVE-2025-14179

Опубликовано: 10 мая 2026
Источник: redhat
CVSS3: 8.1
EPSS Низкий

Описание

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.

A flaw was found in PHP. 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 flaw allows SQL injection when attacker-controlled values are quoted via PDO::quote() and embedded in SQL statements.

Отчет

This issue can be exploited in applications using the PDO Firebird driver. The application must construct dynamic queries using PDO::quote() and the query structure must contain subsequent string boundaries or parameters. This allows an attacker to inject a malicious payload, resulting in the execution of arbitrary database commands. Additionally, the use of PDO::quote() for manual concatenation is heavily discouraged and considered a legacy anti-pattern. Modern PHP applications use native prepared statements ($stmt->execute()) that are not vulnerable to this issue, limiting its exposure. Due to these reasons, this vulnerability has been rated with an important severity.

Меры по смягчению последствий

To mitigate this issue, do not use 'PDO::quote()' for manual query concatenation. Refactor the application to use native parameterized prepared statements. Additionally, implement an input validation mechanism to reject any user-supplied data containing control characters, specifically the NUL byte (\x00).

Затронутые пакеты

ПлатформаПакетСостояниеРекомендацияРелиз
Red Hat Enterprise Linux 10phpAffected
Red Hat Enterprise Linux 10php8.4Not affected
Red Hat Enterprise Linux 6phpNot affected
Red Hat Enterprise Linux 7phpNot affected
Red Hat Enterprise Linux 8php:7.4/phpNot affected
Red Hat Enterprise Linux 8php:8.2/phpNot affected
Red Hat Enterprise Linux 9phpNot affected
Red Hat Enterprise Linux 9php:8.2/phpNot affected
Red Hat Enterprise Linux 9php:8.3/phpNot affected
Red Hat Hardened ImagesphpNot affected

Показывать по

Дополнительная информация

Статус:

Important
Дефект:
CWE-89
https://bugzilla.redhat.com/show_bug.cgi?id=2468567php: SQL injection in pdo_firebird via NUL bytes in quoted strings

EPSS

Процентиль: 37%
0.00439
Низкий

8.1 High

CVSS3

Связанные уязвимости

CVSS3: 9.8
ubuntu
3 месяца назад

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.

CVSS3: 9.8
nvd
3 месяца назад

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.

msrc
3 месяца назад

SQL injection in pdo_firebird via NUL bytes in quoted strings

CVSS3: 9.8
debian
3 месяца назад

In PHP versions 8.2.* before 8.2.31, 8.3.* before 8.3.31, 8.4.* before ...

github
3 месяца назад

SQL injection in pdo_firebird via NUL bytes in quoted strings

EPSS

Процентиль: 37%
0.00439
Низкий

8.1 High

CVSS3