CodeIgniter 4 Deserialization Vulnerability in the 'old()' Function Allowing Object Injection and Potential SQL Injection

Vulnerability

A deserialization vulnerability has been identified in CodeIgniter 4 versions prior to 4.1.6, specifically within the 'old()' function. This issue allows remote attackers to inject auto-loadable arbitrary objects, which could lead to the execution of existing PHP code on the server. There is a known exploit for this vulnerability that can result in SQL injection.

Impact

Exploitation of this vulnerability could lead to unauthorized object injection, execution of PHP code, and SQL injection vulnerabilities.

Reproduction

The vulnerability can be reproduced by calling the 'old()' function with a parameter that includes serialized data. This can be done through a request that is processed by CodeIgniter 4, such as a form submission or a direct HTTP request. The injected serialized data should include an object that can be autoloaded, which will be deserialized by the 'old()' function, exploiting the vulnerability.

Remediation

Users are advised to upgrade to CodeIgniter 4 version 4.1.6 or later. For those unable to upgrade, it is recommended to avoid using the 'old()' function with the form_helper, as well as 'RedirectResponse::withInput()' and 'redirect()->withInput()'.

Added: May 15, 2026, 12:06 PM
Updated: May 15, 2026, 12:06 PM

Vulnerability Rating

Custom Algorithm
spread
0.0
impact
7.5
exploitability
7.8
remediation
0.0
relevance
0.0
threat
5.0
urgency
2.9
incentive
4.2

Our algorithm analyzes dozens of metrics to generate these 8 key vulnerability categories, which are then combined to calculate the overall risk score.