SQL Injection in codeigniter4/framework (CVE-2026-63221)
Summary
SQL injection in codeigniter4/framework (CVE-2026-63221). Data can be tampered with by attackers. Exploitable via WHERE. Mitigation: upgrade to 4.7.4 or later.
Original description
The description as published by the source.
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 usingdeleteBatch(). - For user-controlled conditions, use a normal
delete()with Query Builder binds instead ofdeleteBatch(). - Where possible, express required matching values through the batch data and
onConstraint()rather than as separate user-controlledwhere()clauses.
Source: NIST National Vulnerability Database NVD GitHub Advisory
Auto-generated summary
Assembled by SecPulse from the source data (CVSS, CWE, affected versions) using templates — no AI involved. Check the original description and references below for exact details.
A vulnerability tracked as CVE-2026-63221 has been found in codeigniter4/framework.
Attackers can target a specific entry point like WHERE over the network to misuse the product.
Data can be tampered with by attackers. CVSS score: 9.4/10.
What to do: upgrade codeigniter4/framework to 4.7.4 or later.
If unsure, ask your IT team or search "codeigniter4/framework CVE-2026-63221" on the vendor's site.
CVE-2026-63221 (codeigniter4/framework) — CWE-89 / CVSS v3 9.4
Attack vector: remote (network-reachable) / unauthenticated / no user interaction
Attack surface: WHERE
Patched: 4.7.4 — apply immediately
Plan: 1) Audit SBOM/dependencies, 2) Stage→prod upgrade, 3) Add WAF/proxy monitoring on affected endpoints, 4) Hunt IOCs in logs.
Refs: see the GHSA / vendor advisory / patched release linked on this page.
SQL injection (CWE-89) exists in codeigniter4/framework. Attackers reach the vulnerable code path via WHERE without authentication.
Check the vendor advisory for the affected versions of codeigniter4/framework. Attack surface: WHERE.
Severity: Critical (CVSS 9.4/10). Data can be tampered with by attackers.
Update to 4.7.4.
Until the patch is applied: disable the affected feature, apply WAF rules, or restrict access via network ACLs.
Search webserver/proxy logs for unusual request patterns matching this CVE's known IOCs. Run grep -r 'codeigniter4/framework' . against your dependency files (package-lock.json, requirements.txt, go.sum) to find affected services.
Response actions
Concrete steps and command examples for SOC/SRE teams to execute in order
-
1Identify exposure identify
grep -r 'codeigniter4/framework' . | grep -v node_modulesリポジトリと本番環境の依存ファイル (package-lock.json / requirements.txt / go.sum / Gemfile.lock 等) で
codeigniter4/frameworkを grep し、稼働しているサービス・バージョンを把握する。 -
2Apply patch patch
Upgrade codeigniter4/framework to 4.7.4ステージング環境で 4.7.4 に上げて回帰テスト → 本番反映。回帰テストはアプリの主要ハッピーパスを含めること。
-
3Post-deployment verification verify
Confirm patched version is live in productionパッチ適用後、ステージングで PoC または同等の悪用パターンを再現して脆弱性が閉じたことを確認。本番ではアクセスログ・WAF でアラート再発が無いか継続監視。
Affected packages
Fix status by distribution
Fixed packages published by each distribution for this CVE
- Ubuntu UBUNTU-CVE-2026-63221 php-codeigniter-framework
References
- advisory nvd.nist.gov
- package github.com
- web github.com
- web github.com
- web github.com
- web github.com