Skip to main content

CodeIgniter4 CVE-2026-142150

| EUVDEUVD-2026-141468 CRITICAL
SQL Injection (CWE-89)
2026-12-02 VulnCheck GHSA-ccrg-2qgf-h2fh
9.2
CVSS 4.0 · Vendor: VulnCheck
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Find endpoint mixing named bind with escaped value
  2. Delivery
    Inject :name: placeholder into escaped parameter
  3. Exploit
    Controlled bind value breaks out of literal
  4. Execution
    Arbitrary SQL executes in query
  5. Impact
    Exfiltrate 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.

Act Now Prioritize within 24-48h. Why: CRITICAL severity.
Patch available

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – 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

CodeIgniter4 0 <4.7.6

Affected Packages

euvd codeigniter4 fix: 4.7.6

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

Vendor (VulnCheck) PRIMARY 9.2 CRITICAL
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
vuln.today AI 8.1 HIGH

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).

3.1 AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
4.0 AV:N/AC:H/AT:P/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N

Primary rating from Vendor (VulnCheck).

CVSS VectorVendor: VulnCheck

Attack Vector
Network
Attack Complexity
High
Attack Requirements
Present
Privileges Required
None
User Interaction
None
Vulnerable system: Confidentiality
High
Vulnerable system: Integrity
High
Vulnerable system: Availability
High
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

Lifecycle Timeline

2
Patch available
Dec 02, 2026 - 16:02 EUVD
CVE Published
Dec 02, 2026 - 14:37 cve.org
CRITICAL 9.2

DescriptionCVE.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

Why It Matters

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.

Business Impact: High
Compensating Controls

Apply vendor patch: 4.7.6

Threat Intelligence Overview

Prevalence
Medium
popular PHP MVC framework, widely used but far below WordPress footprint
Social Media
1
Sightings
Data Quality
3 sources
Confidence: Low

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.

SignalValue
Severity CRITICAL
CISA KEV No
Public POC No
EPSS N/A
Patch available Yes
Active threat No
Deciding rule
CRITICAL severity
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation· derived
None
System Exposure· derived
Open
Automatable· derived
No
Human Impact
High

Priority Score

46
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +46
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

SQL injection exploits the way applications construct database queries by mixing user input directly into SQL statements.

CVE-2026-63223 CRITICAL POC
9.8 Jul 31

Unauthenticated file upload validation bypass in the CodeIgniter4 PHP framework (versions prior to 4.7.4) lets a remote

CVE-2026-63221 CRITICAL POC
9.4 Jul 31

SQL injection in CodeIgniter4's Query Builder deleteBatch() method (versions 4.3.0 through 4.7.3) allows user-controlled

CVE-2026-63222 HIGH POC
7.5 Jul 31

Path traversal file write in the CodeIgniter4 PHP framework prior to 4.7.4 lets remote unauthenticated attackers place u

CVE-2026-142155 CRITICAL
9.3 Dec 02

Remote code execution in CodeIgniter4 before 4.7.5 stems from filename-based upload validation rules that can be tricked

CVE-2026-63220 MEDIUM POC
4.8 Jul 31

HTTP security header spoofing in CodeIgniter4 prior to 4.7.4 allows remote unauthenticated attackers to trick the framew

CVE-2026-142154 HIGH
8.7 Dec 02

PHP code injection in the CodeIgniter4 View Parser (versions before 4.7.5) lets users who can edit template source - for

CVE-2026-142151 HIGH
8.2 Dec 02

Information disclosure in the CodeIgniter4 CURLRequest component before 4.7.5 can leak a previously used Authorization h

CVE-2026-142153 HIGH
7.7 Dec 02

PHP code execution and unintended local file inclusion in CodeIgniter4 before 4.7.5 occur when view data is extracted in

CVE-2026-142152 MEDIUM
6.9 Dec 02

File upload validation bypass in CodeIgniter4 releases before 4.7.5 lets unauthenticated remote attackers slip a disallo

CVE-2026-130845 MEDIUM
5.3 Nov 17

Cross-site scripting in CodeIgniter4 before 4.7.5 allows an attacker who controls a single value rendered through the Vi

CVE-2026-142138 MEDIUM
5.3 Dec 02

Cross-site scripting in the CodeIgniter4 form helpers - parse_form_attributes(), form_input(), form_label(), form_dropdo

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy