Summary
CVE-2026-63221 is a critical SQL injection vulnerability (CVSS 9.4) in the Query Builder deleteBatch() method of the CodeIgniter4 PHP web framework, affecting all versions from 4.3.0 through 4.7.3. The flaw arises because deleteBatch() substitutes bound values from where() conditions directly into generated SQL while ignoring their escape flags, allowing user-controlled input to be interpreted as raw SQL. The issue was addressed in CodeIgniter4 version 4.7.4, released July 7, 2026.
Technical details
- Root cause: In the
deleteBatch()code path, bound values passed viawhere()conditions are injected into the generated SQL string without respecting their escape flags. This differs from the regulardelete()method, which correctly escapeswhere()binds. - Trigger conditions: Exploitation requires an application endpoint that calls
deleteBatch()with WHERE conditions derived from user-supplied input. Not every CodeIgniter4 installation is affected — only those implementing this specific code pattern on a network-accessible endpoint. - Attack vector: Network-accessible, no authentication required at the framework level (Privileges Required: None, User Interaction: None, Attack Complexity: Low). Whether a given deployment is reachable without authentication depends on application-level access controls.
- Impact: Successful exploitation enables injection of arbitrary SQL commands into batch delete operations, with potential for unauthorized data manipulation, mass deletion of database records, and partial data disclosure.
Affected software
- CodeIgniter4 versions 4.3.0 through 4.7.3 (inclusive)
Severity
- CVSS v3.1 Base Score: 9.4 (Critical)
- Vector String:
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:H/A:H - Confidentiality Impact: Low | Integrity Impact: High | Availability Impact: High
Mitigation and recommended actions
- Immediate: Upgrade to CodeIgniter4 version 4.7.4, which corrects the escaping behavior in
deleteBatch()to match the handling used by regulardelete()operations. - Code review: Audit application code for any use of
deleteBatch()combined withwhere()conditions that incorporate user-supplied values. Prioritize endpoints that are publicly accessible. - If immediate upgrade is not feasible: Avoid passing user-controlled values into
where()conditions used withdeleteBatch(). Apply strict server-side input validation and consider restricting network access to affected endpoints as a temporary measure.
IONIX Status
The IONIX research team is tracking ongoing exploitation attempts and recommends immediate patching. Potentially affected assets are outlined in this post.

