CVE-2022-21647: Deserialization of Untrusted Data in Codeigniter4
Impact Deserialization of Untrusted Data was found in the old() function in CodeIgniter4. Remote attackers may inject auto-loadable arbitrary objects with this vulnerability, and possibly execute existing PHP code on the server. We are aware of a working exploit, which can lead to SQL injection.
Patches Upgrade to v4.1.6 or later.
Workarounds Do not use: - old() and formhelper - RedirectResponse::withInput() and redirect()->withInput()
References - PHP Object Injection | OWASP
For more information If you have any questions or comments about this advisory: Open an issue in codeigniter4/CodeIgniter4 Email us at SECURITY.md
Other sources
CodeIgniter is an open source PHP full-stack web framework. Deserialization of Untrusted Data was found in the old() function in CodeIgniter4. Remote attackers may inject auto-loadable arbitrary objects with this vulnerability, and possibly execute existing PHP code on the server. We are aware of a working exploit, which can lead to SQL injection. Users are advised to upgrade to v4.1.6 or later. Users unable to upgrade as advised to not use the old() function and formhelper nor RedirectResponse::withInput() and redirect()->withInput().
— NVD
CVE-2022-21647: Deserialization of Untrusted Data in Codeigniter4
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
composer/codeigniter4/frameworkto a version that resolves this vulnerability.Fixed in 4.1.6 - Upgrade
Upgrade
CodeIgniter4to a version that resolves this vulnerability.Fixed in 4.1.6 - Compensating control
If unable to upgrade, do not use the old() function, form_helper, RedirectResponse::withInput(), or redirect()->withInput().
Event History
Frequently Asked Questions
What is CVE-2022-21647?
CVE-2022-21647 is a vulnerability found in the `old()` function in CodeIgniter4 that allows remote attackers to inject auto-loadable arbitrary objects and potentially execute existing PHP code on the server.
What is the severity of CVE-2022-21647?
The severity of CVE-2022-21647 is critical with a CVSS score of 9.8.
How does CVE-2022-21647 affect CodeIgniter4?
CVE-2022-21647 affects CodeIgniter4 versions up to and including 4.1.6.
How can an attacker exploit CVE-2022-21647?
An attacker can exploit CVE-2022-21647 by injecting auto-loadable arbitrary objects into the `old()` function and potentially executing PHP code on the server.
Are there any fixes or patches available for CVE-2022-21647?
Yes, patches and fixes for CVE-2022-21647 are available. It is recommended to update CodeIgniter4 to a version higher than 4.1.6.