PDO emulation does not properly treat NUL bytes which could lead to an SQL injection
Description
Based on: https://web.archive.org/web/20251017002820/https://slcyber.io/assetnote-security-research-center/a-novel-technique-for-sql-injection-in-pdos-prepared-statements/
When developers write SQL statements by concatenating user input directly into the query, the input can contain a NUL byte which will then confuse the SQL parser. If a placeholder comes after such part, an SQL injection is possible.
This requires code that does not use white-listing for column/table names and inserts a user input value into the query.
PHP Version
Any PHP version.
Operating System
No response
Seems like related with https://github.com/php/php-src/issues/13958 issue and possibly also with https://github.com/php/php-src/pull/14035 PR.
You mean its already merged ?
No, that are old issues, but I think they are related to this problem.