Security Digest · Vulnerability record

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

CodeIgniter is a PHP full-stack web framework.

CVSS 9.4 Critical EPSS 0.6% · p49

Should you act?

Critical and remotely reachable

No known exploitation yet, but it is network-reachable without credentials. This signal is computed from CISA KEV, EPSS and CVSS data; it is not an editorial verdict.

  • No confirmed exploitation. It is not in CISA’s KEV catalog and CISA’s SSVC assessment records no known exploitation. That can change quickly after a public write-up; re-check if you are affected.
  • EPSS 0.6%, percentile 49: FIRST’s model estimates a 0.6% chance of exploitation activity in the next 30 days, higher than 49% of all scored CVEs (low). EPSS is a probability, not a verdict.
  • Remotely reachable with no login and no user interaction. If the vulnerable service is exposed to the internet, prioritize it.
  • Only applies if your dependency tree includes codeigniter4/framework (Composer (PHP)) >= 4.3.0, < 4.7.4, fixed in 4.7.4. Check your lockfile, including transitive dependencies.

What it is

CodeIgniter is a PHP full-stack web framework. From 4.3.0 through 4.7.3, Query Builder deleteBatch() substitutes bound values from where() conditions into generated SQL while ignoring their escape flags, allowing user-controlled condition values to be interpreted as SQL. This affects only the deleteBatch() code path. Regular delete() operations escape where() binds correctly. This issue is fixed in version 4.7.4.

From the GitHub advisory

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:

- Strictly validate and cast values (e.g. numeric IDs) before using them in conditions - though this does not fully protect string conditions. - Do not pass user-controlled input to where() when using deleteBatch(). - For user-controlled conditions, use a normal delete() with Query Builder binds instead of deleteBatch(). - Where possible, express required matching values through the batch data and onConstraint() rather than as separate user-controlled where() clauses.

Weakness type: CWE-89.

Product: codeigniter4/framework (Composer (PHP)) · Assigned by: GitHub_M · Published: 2026-07-31

Affected and fixed versions

EcosystemPackageVulnerableFirst fixed
Composer (PHP)codeigniter4/framework>= 4.3.0, < 4.7.44.7.4
VendorProductAffected versions (per CVE record)
codeigniter4CodeIgniter4>= 4.3.0, < 4.7.4

Severity scores

Scored byCVSSScoreVector
GitHub_M3.19.4 CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:H/A:H
GitHub3.19.4 CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:H/A:H
  • Attack vector: network (remotely reachable)
  • Attack complexity: low
  • Privileges required: none (no login)
  • User interaction: none
  • Scope: unchanged

CVSS measures how bad a flaw is if exploited, not how likely exploitation is. Read it next to the exploitation data below.

Exploitation and urgency

  • CISA KEV: not listed (no confirmed in-the-wild exploitation known to CISA).
  • CISA SSVC assessment: exploitation none, automatable yes, technical impact partial.
  • FIRST EPSS (model of 2026-10-21): 0.61% probability of exploitation activity in the next 30 days; percentile 49.

Timeline

  • — CVE record last updated
  • — CVE record published by GitHub_M
  • — GitHub-reviewed advisory GHSA-c9w5-rwh3-7pm9 published (critical)

Sources and references

Original sources first. Version and fix details should always be confirmed against the vendor or project advisory.

Vulnerability records

  1. GitHub Advisory GHSA-c9w5-rwh3-7pm9 github.com
  2. CVE.org record CVE-2026-63221 cve.org
  3. NVD entry CVE-2026-63221 nvd.nist.gov

Other references from the CVE record and advisory

  1. github.com github.com
  2. github.com github.com
  3. github.com github.com

Critical Composer (PHP) advisories · Today’s Security Digest