GHSA-c9w5-rwh3-7pm9: SQL Injection

Published Aug 7, 2026
·
Updated

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.

Affected Software

1 affected componentFixes available
composer/codeigniter4/framework>=4.3.0<4.7.4
4.7.4

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade composer/codeigniter4/framework to a version that resolves this vulnerability.

    Fixed in 4.7.4
  2. Upgrade

    Upgrade to a fixed release to a version that resolves this vulnerability.

    Fixed in v4.7.4
  3. Compensating control

    If you cannot upgrade immediately, avoid passing user-controlled input into `where()` before calling `deleteBatch()`; instead use `delete()` with Query Builder binds for user-controlled conditions.

  4. Compensating control

    When using `deleteBatch()` together with `where()` conditions, express required matching values through the batch data and `onConstraint()` rather than as separate user-controlled `where()` clauses.

  5. Compensating control

    Strictly validate and cast values (e.g., numeric IDs) before using them in conditions; note this does not fully protect string conditions.

Event History

Aug 7, 2026
Advisory Published
via GitHub·06:22 PM
Data Sourced
via GitHub·06:22 PM
DescriptionSeverityWeaknessAffected Software
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of GHSA-c9w5-rwh3-7pm9?

The severity of GHSA-c9w5-rwh3-7pm9 is rated as critical with a score of 9.4.

2

What type of vulnerability is GHSA-c9w5-rwh3-7pm9?

GHSA-c9w5-rwh3-7pm9 is a SQL injection vulnerability.

3

How do I fix GHSA-c9w5-rwh3-7pm9?

To fix GHSA-c9w5-rwh3-7pm9, update your CodeIgniter framework to the latest version where the issue is resolved.

4

What is the impact of GHSA-c9w5-rwh3-7pm9?

The impact of GHSA-c9w5-rwh3-7pm9 is that it can lead to unauthorized data access or corruption due to SQL injection.

5

When was GHSA-c9w5-rwh3-7pm9 published?

GHSA-c9w5-rwh3-7pm9 was published on August 7, 2026.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203