CVE-2022-40826
CodeIgniter vulnerability analysis and mitigation

Overview

CodeIgniter version 3.1.13 and earlier versions were found to be vulnerable to SQL Injection through the or_having() function in the system\database\DB_query_builder.php file. The vulnerability was identified and assigned CVE-2022-40826 (NVD).

Technical details

The vulnerability exists in the query builder component of CodeIgniter, specifically in the or_having() function within the DB_query_builder.php file. The issue stems from insufficient filtering of query fields, which could allow malicious SQL injection attacks when developers incorrectly handle query fields from client input (GitHub Issue).

Impact

When exploited, this vulnerability could allow attackers to perform SQL injection attacks against applications built with affected versions of CodeIgniter. This could potentially lead to unauthorized access to or manipulation of the database.

Mitigation and workarounds

Users should upgrade to a version newer than CodeIgniter 3.1.13 if available. Additionally, developers should ensure proper input validation and sanitization when handling database queries, particularly when dealing with user-supplied input in query fields.

Additional resources


SourceThis report was generated using AI

Related CodeIgniter vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2025-54418CRITICAL9.8
  • PHPPHP
  • cpe:2.3:a:codeigniter:codeigniter
NoYesJul 28, 2025
CVE-2024-41344HIGH7.5
  • CodeIgniterCodeIgniter
  • cpe:2.3:a:codeigniter:codeigniter
NoYesOct 15, 2024
CVE-2024-29904HIGH7.5
  • PHPPHP
  • cpe:2.3:a:codeigniter:codeigniter
NoYesMar 29, 2024
CVE-2025-45406MEDIUM6.1
  • PHPPHP
  • cpe:2.3:a:codeigniter:codeigniter
NoYesJul 25, 2025
CVE-2025-24013MEDIUM5.3
  • PHPPHP
  • cpe:2.3:a:codeigniter:codeigniter
NoYesJan 20, 2025

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management