CVE-2026-142150: CodeIgniter4 before 4.7.6 SQL Injection via Named Bind Placeholders in Query Builder
CodeIgniter4 before 4.7.6 contains an SQL injection vulnerability in Query::matchNamedBinds(), which substitutes named :name: bind placeholders across the entire SQL text, including values already escaped into string literals. Remote attackers who can inject a :name: placeholder into a subquery, union, escaped where()/having() string, deleteBatch() condition, or $db->query() fragment while controlling that bind's value can break out of the literal and execute arbitrary SQL.
Affected Software
Event History
Frequently Asked Questions
Which applications are realistically exposed to this issue?
Applications using CodeIgniter4 before 4.7.6 are exposed when attacker-controlled input can introduce a named placeholder such as :name: into SQL text and the attacker can also control the value bound to that placeholder. The affected paths include subqueries, UNIONs, escaped where() or having() strings, deleteBatch() conditions, and fragments passed to $db->query().
Does exploitation require authentication or user interaction?
No authentication or user interaction is required according to the supplied vector. Exploitation does require a suitable application-level input path that lets a remote attacker influence both a named placeholder in the SQL fragment and its corresponding bind value.
What should teams do if they cannot immediately upgrade?
The provided information does not list a workaround. Prioritize removing or strictly preventing attacker-controlled named placeholders and bind values from reaching the affected SQL-construction paths, particularly custom SQL fragments, subqueries, UNIONs, and escaped condition strings.