Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessFind endpoint mixing named bind with escaped value
-
DeliveryInject :name: placeholder into escaped parameter
-
ExploitControlled bind value breaks out of literal
-
ExecutionArbitrary SQL executes in query
-
ImpactExfiltrate or tamper with database
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Parameterized queries, prepared statements
MITRE ATT&CK
2 techniques across 2 tactics: Initial Access, Persistence The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Exploitation requires the target application to construct a single query that both (a) renders one attacker-controlled value into the SQL as an escaped string literal via one of the named paths - a subquery passed to where()/having()/union()/unionAll()/fromSubquery()/selectSubquery(), a custom where()/having() string built with $db->escape(), the WHERE conditions of deleteBatch(), or a $db->query() call mixing named binds with manually escaped fragments - and (b) binds a second attacker-controlled value by name (:name:) in the same query. The attacker must be able to place a :name: placeholder (bind names are column names and easy to guess) into the escaped value while controlling the value bound under that name; deleteBatch() has a variant where the attacker must control a WHERE value and the batch row data. Limiting factors: plain where(), like(), whereIn(), insert(), update(), insertBatch(), updateBatch(), upsertBatch() and question-mark (?) binds are NOT affected, so applications not using the specific dual-value patterns are not exploitable - this is the AC:H/AT:P condition. There is no workaround other than upgrading to 4.7.6 (or removing one of the two patterns from each affected query). |
| Impact | Severity signals are strong but conditional. The supplied CVSS 4.0 vector (AV:N/AC:H/AT:P/PR:N/UI:N) scores 9.2 and carries high confidentiality, integrity and availability impact (VC:H/VI:H/VA:H), consistent with full SQL injection (CWE-89). The vuln.today decision label is act_now and the finding comes from VulnCheck, which raises its priority. However, AC:H and AT:P are doing real work here: per the GHSA advisory the flaw only fires when an application builds a single query that renders one user-controlled value into the SQL as an escaped literal AND binds a second user-controlled value by name - a specific coding pattern, not any query. This reconciles the 'network, unauthenticated' reading of PR:N with the elevated complexity: an unauthenticated remote attacker can reach it, but only against applications that use one of the named vulnerable patterns (subquery where()/having()/union()/fromSubquery()/selectSubquery(), $db->escape()-built where()/having() strings, deleteBatch() plus where(), or $db->query() mixing named binds with escaped fragments). No EPSS score is provided and the CVE is not listed in CISA KEV, so there is no evidence of active exploitation; the act_now label reflects the critical impact and the published, tested proof-of-concept rather than confirmed in-the-wild use. Net: a genuine high priority for CodeIgniter4 shops to patch, but real-world exposure depends on whether the application actually uses the affected query-building patterns, so blanket-critical urgency should be tempered by that application-level condition. |
| Exploit ScenarioDerived | An application exposes an endpoint that builds a single query from two user-supplied parameters - for example a UNION of two Query Builder results - where one value is escaped into the SQL and the other is bound by :name:. A remote unauthenticated attacker sets the first parameter to a boolean payload (e.g. ' OR 1=1 OR ') and the second to the literal ':status:', so the escaped first value is substituted inside the second value's quoted literal, breaking out of it and injecting arbitrary SQL. The GHSA advisory includes a full, tested proof-of-concept (curl commands against CodeIgniter 4.7.5 with MySQL 8) demonstrating this exact UNION bypass. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Dec 02, 2026
SQL injection in CodeIgniter4 through 4.7.5 lets unauthenticated remote attackers break out of an already-escaped string literal and execute arbitrary SQL, but only when a single query both renders one attacker-controlled value into the SQL as an escaped literal and binds a second attacker-controlled value by name. The root cause is Query::matchNamedBinds(), which applies a plain strtr() substitution of :name: placeholders over the whole SQL text, re-scanning literals that BaseConnection::escape() had already produced, so an attacker who can plant a :name: token inside a subquery, union, escaped where()/having() string, deleteBatch() condition or $db->query() fragment controls what lands inside that literal. Exploitation is conditional (CVSS 4.0 AC:H/AT:P, aligned 3.1 AV:N/AC:H/PR:N/UI:N with high confidentiality, integrity and availability impact), vendor-released patch 4.7.6 addresses it, the GHSA-25rf-99hr-7pmr advisory ships a documented proof-of-concept, and there is no CISA KEV listing for this CVE at time of analysis.
RemediationAI
Vendor-released patch: upgrade to CodeIgniter4 4.7.6 (composer/codeigniter4/framework 4.7.6), which corrects named-bind substitution so placeholders inside already-escaped literals are no longer treated as binds, and fixes the {:_table_:} ordering in deleteBatch(). The advisory states there is no workaround other than removing one of the two patterns from each affected query, so teams that cannot upgrade immediately must audit every query that combines an escaped, user-influenced value with a named bind and rewrite it - for example by switching those statements to question-mark binds, by passing subqueries through whereIn() (which stores the subquery as a bind value and was not affected), or by eliminating the user-influenced escaped literal in favour of a plain where()/like() bind. Because exploitation is conditional on that dual-value pattern and the vendor assesses practical risk as high but configuration-dependent, inventorying affected call sites should accompany the upgrade rather than follow it. Full technical detail and the reproduction case are at https://github.com/codeigniter4/CodeIgniter4/security/advisories/GHSA-25rf-99hr-7pmr, with a secondary write-up at https://www.vulncheck.com/advisories/codeigniter4-before-4.7.6-sql-injection-via-named-bind-placeholders-in-query-builder.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
The vulnerability is CWE-89 SQL injection arising from placeholder handling rather than from missing escaping. In system/Database/Query.php, matchNamedBinds() builds a map of :name: tokens to their escaped values and applies it with strtr() across the entire statement; because the SQL string at that point already contains quoted literals emitted by BaseConnection::escape(), a literal such as ':status:' is indistinguishable from a bind placeholder. The escaped replacement is inserted between the quotes of that literal, terminating it early and placing the bind value outside any string literal. Bind names correspond to column names and are therefore predictable. According to the advisory, the code paths that render a value into SQL before substitution are: a subquery passed to where()/having(), union() and unionAll(), fromSubquery(), selectSubquery(), a custom where()/having() string built with $db->escape(), the WHERE conditions of deleteBatch(), and $db->query() calls mixing named binds with manually escaped fragments. A subquery passed to whereIn() is stored as a bind value and was not affected; insertBatch(), updateBatch() and upsertBatch() do not substitute named binds and were not affected; question-mark binds were not affected because matchSimpleBinds() ignores markers inside quoted strings. deleteBatch() carries a second variant of the same class of bug: BaseBuilder::_deleteBatch() (and its Postgre and OCI8 overrides) substituted WHERE binds first and replaced the internal {:_table_:} token with the rendered batch rows afterwards, so a WHERE bind value containing {:_table_:} received batch data inside its string literal and attacker-controlled row values ended up outside their own literals.
Know when Codeigniter4 gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
CVSS:4.0/AV:N/AC:H/AT:P/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
Remote and unauthenticated (AV:N/PR:N) but requires a specific dual-value query-construction pattern, so AC:H; SQL injection yields full read/write and potential destructive impact (C:H/I:H/A:H).
Primary rating from Vendor (VulnCheck).
CVSS VectorVendor: VulnCheck
Lifecycle Timeline
2DescriptionCVE.org
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.
Technical POC Analysis
Bug class: CWE-89, SQL injection.
Full technical POC analysis - root cause, step-by-step exploitation and patch breakdown - is part of the Pro and Business plans.
Executive ViewAI
CVE-2026-142150 is a critical SQL injection vulnerability in CodeIgniter4 (versions through 4.7.5) that allows unauthenticated remote attackers to execute arbitrary SQL under specific query conditions, potentially leading to data breaches, data corruption, or service disruption. This affects any organization using CodeIgniter4 in production, and the existence of a public proof-of-concept increases the likelihood of exploitation attempts. Leadership should prioritize immediate patching to mitigate risk.
Apply vendor patch: 4.7.6
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
SQL injection exploits the way applications construct database queries by mixing user input directly into SQL statements.
More in Codeigniter4
View allUnauthenticated file upload validation bypass in the CodeIgniter4 PHP framework (versions prior to 4.7.4) lets a remote
SQL injection in CodeIgniter4's Query Builder deleteBatch() method (versions 4.3.0 through 4.7.3) allows user-controlled
Path traversal file write in the CodeIgniter4 PHP framework prior to 4.7.4 lets remote unauthenticated attackers place u
Remote code execution in CodeIgniter4 before 4.7.5 stems from filename-based upload validation rules that can be tricked
HTTP security header spoofing in CodeIgniter4 prior to 4.7.4 allows remote unauthenticated attackers to trick the framew
PHP code injection in the CodeIgniter4 View Parser (versions before 4.7.5) lets users who can edit template source - for
Information disclosure in the CodeIgniter4 CURLRequest component before 4.7.5 can leak a previously used Authorization h
PHP code execution and unintended local file inclusion in CodeIgniter4 before 4.7.5 occur when view data is extracted in
File upload validation bypass in CodeIgniter4 releases before 4.7.5 lets unauthenticated remote attackers slip a disallo
Cross-site scripting in CodeIgniter4 before 4.7.5 allows an attacker who controls a single value rendered through the Vi
Cross-site scripting in the CodeIgniter4 form helpers - parse_form_attributes(), form_input(), form_label(), form_dropdo
EUVD-2026-141468
GHSA-ccrg-2qgf-h2fh
NVD
CVE.org
Exploit-DB