critical

CVE-2026-63221

Packagist · codeigniter4/framework

Summary

CodeIgniter: SQL injection in Query Builder deleteBatch() when used with where() conditions

Severity
critical
CVSS
9.4
EPSS
0.6% (p49)
CWE
CWE-89
Also known as
GHSA-c9w5-rwh3-7pm9
Published
2026-08-07
Updated
2026-08-07

Advisory details

Impact

A SQL injection vulnerability exists in the Query Builder's deleteBatch() method. When deleteBatch() is used together with where() conditions, the bound values from the WHERE clause are substituted directly into the generated SQL with their escape flag ignored, so they are never escaped or quoted. If an application passes user-controlled input to where() before calling deleteBatch(), that input is interpreted as SQL rather than as a value, allowing SQL injection.

This affects only the deleteBatch() code path. Regular delete() operations escape where() binds correctly.

Patches

Upgrade to v4.7.4 or later.

Workarounds

If you cannot upgrade immediately:

References

Related advisories

Is your project exposed to this? Stateward checks every dependency on every pull request and flags it only if your code actually reaches it.

Check my repo

Summarize with AI

ChatGPTClaudePerplexity

Sources: CISA KEV (public domain), OSV.dev & GitHub Advisory Database (CC-BY-4.0), FIRST EPSS, NVD/CWE (public domain). Served live from the Stateward advisory database.