Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…

Framework: CodeIgniter: SQL injection in Query Builder deleteBatch() when used with where() conditions (CVE-2026-63221)

0
Critical
Published: 08/07/2026 (08/07/2026, 18:22:59 UTC)
Source: GCVE Database
Product: codeigniter4/framework

Description

A critical SQL injection vulnerability exists in CodeIgniter 4's Query Builder deleteBatch() method when used with where() conditions. The vulnerability arises because bound values from the WHERE clause are directly substituted into the SQL query without proper escaping or quoting. This flaw allows user-controlled input passed to where() before deleteBatch() to be interpreted as SQL code, enabling SQL injection attacks. Regular delete() operations are not affected. The issue affects versions from 4.3.0 up to but not including 4.7.4. A patch is available in version 4.7.4 and later.

CVSS v3.1

Score 9.4critical

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
Low
Integrity
High
Availability
High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:H/A:H

Affected software

Packagistghsa
codeigniter4/framework
Affected versions
>=4.3.0 <4.7.4

Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 08/08/2026, 15:20:11 UTC

Technical Analysis

The CodeIgniter 4 framework contains a SQL injection vulnerability (CVE-2026-63221) in the Query Builder's deleteBatch() method when combined with where() conditions. Specifically, bound values from the WHERE clause are inserted into the generated SQL query with their escape flags ignored, causing them to be unescaped and unquoted. This allows an attacker to inject arbitrary SQL if user-controlled input is passed to where() before calling deleteBatch(). This vulnerability is limited to the deleteBatch() code path; the regular delete() method correctly escapes where() binds. The vulnerability affects versions >=4.3.0 and <4.7.4. The vendor has released version 4.7.4 to address this issue.

Potential Impact

Successful exploitation of this vulnerability can lead to SQL injection, allowing an attacker to execute arbitrary SQL commands. This can result in unauthorized data manipulation, data leakage, or denial of service. The CVSS score of 9.4 (critical) reflects the high impact on confidentiality, integrity, and availability. Since the vulnerability is exploitable remotely without authentication, it poses a significant risk to affected applications.

Mitigation Recommendations

Upgrade to CodeIgniter version 4.7.4 or later, where this vulnerability is fixed. If immediate upgrade is not possible, avoid passing user-controlled input to where() when using deleteBatch(). Validate and cast input strictly, especially numeric IDs, though this does not fully protect string inputs. Alternatively, use the normal delete() method with Query Builder binds for user-controlled conditions or express matching values through batch data and onConstraint() instead of separate where() clauses.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

Technical Details

Gcve Source
db.gcve.eu
Osv Id
GHSA-c9w5-rwh3-7pm9
Osv Schema Version
1.4.0
Aliases
["CVE-2026-63221"]
Ecosystems
["Packagist"]
Database Specific Severity
CRITICAL
Cvss Version
3.1

Threat ID: 6a7742a8bf8831d539b08cef

Added to database: 08/08/2026, 14:52:24 UTC

Last enriched: 08/08/2026, 15:20:11 UTC

Last updated: 08/08/2026, 15:20:11 UTC

Views: 2

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need more coverage?

Upgrade to Pro Console for AI refresh and higher limits.

For incident response and remediation, OffSeq services can help resolve threats faster.

Latest Threats

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses