CVE-2022-21647
Deserialization of Untrusted Data in Codeigniter4
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 form_helper nor RedirectResponse::withInput() and redirect()->withInput().
Attack profile
How easy it is to exploit
- Attack vector
- Network
- Complexity
- High
- Privileges needed
- None
- User interaction
- None
What an attacker can affect
- Confidentiality
- Low
- Integrity
- High
- Availability
- High
Exploit likelihood
What each source reports
CVE List Score used
7.7
Deserialization of Untrusted Data in Codeigniter4
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 form_helper nor RedirectResponse::withInput() and redirect()->withInput().
- Record
CVE-2022-21647- CVSS 3.1
- 7.7 High
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:H/A:H - Weakness
- CWE-502
- Updated
- 2026-11-02
EUVDEUVD-2022-0719
7.7
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 form_helper nor RedirectResponse::withInput() and redirect()->withInput().
- Record
EUVD-2022-0719- CVSS 3.1
- 7.7 High
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:H/A:H - Updated
- 2026-11-02
GitHub AdvisoriesGHSA-w6jr-wj64-mc9x
7.7
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 form_helperRedirectResponse::withInput()andredirect()->withInput()
References
For more information
If you have any questions or comments about this advisory:
- Open an issue in codeigniter4/CodeIgniter4
- Email us at SECURITY.md
- Record
GHSA-w6jr-wj64-mc9x- CVSS 3.1
- 7.7 High
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:H/A:H - Weakness
- CWE-502
- Updated
- 2026-11-02
NVD
7.7
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 form_helper nor RedirectResponse::withInput() and redirect()->withInput().
- Record
CVE-2022-21647- CVSS 3.1
- 7.7 High
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:H/A:H - CVSS 3.1
- 9.8 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H - CVSS 2.0
- 7.5 High
AV:N/AC:L/Au:N/C:P/I:P/A:P - Weakness
- CWE-502
- Updated
- 2026-11-02
OSV
7.7
Deserialization of Untrusted Data in Codeigniter4
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 form_helper nor RedirectResponse::withInput() and redirect()->withInput().
- Record
CVE-2022-21647- CVSS 3.1
- 7.7 High
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:H/A:H - Weakness
- CWE-502
- Updated
- 2026-11-02
OSVGHSA-w6jr-wj64-mc9x
7.7
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 form_helperRedirectResponse::withInput()andredirect()->withInput()
References
For more information
If you have any questions or comments about this advisory:
- Open an issue in codeigniter4/CodeIgniter4
- Email us at SECURITY.md
- Record
GHSA-w6jr-wj64-mc9x- CVSS 3.1
- 7.7 High
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:H/A:H - Weakness
- CWE-502
- Updated
- 2026-11-02
OSVBIT-codeigniter-2022-21647 No score
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 form_helper nor RedirectResponse::withInput() and redirect()->withInput().
- Record
BIT-codeigniter-2022-21647- Updated
- 2026-11-02
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
codeigniter4/frameworkPackagist |
before 4.1.6 | 4.1.6 |
codeigniterBitnami |
4.0.0 up to 4.1.6 | 4.1.6 |
codeigniter4/frameworkPackagist |
before 4.1.6, plus listed versions 4.0.04.0.0-rc.4v4.0.0-alpha.3v4.0.0-alpha.4v4.0.0-alpha.5 Show 19 moreShow lessv4.0.0-beta.1v4.0.0-beta.2v4.0.0-beta.3v4.0.0-beta.4v4.0.0-rc.1v4.0.0-rc.2v4.0.0-rc.2.1v4.0.0-rc.3v4.0.1v4.0.2v4.0.3v4.0.4v4.0.5v4.1.0v4.1.1v4.1.2v4.1.3v4.1.4v4.1.5 |
4.1.6 |
History
| Recorded | Changed | Sources |
|---|---|---|
| first indexed | CVE List, EUVD, GitHub Advisories, NVD, OSV |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
CVE-2022-21647 is a high vulnerability (CVSS 7.7) in Codeigniter, published January 4, 2022. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 37.7%, the 98th percentile. Fixed in codeigniter4/framework 4.1.6.
References
github.com/codeigniter4/CodeIgniter4/security/advisories/GHSA-w6jr-wj64-mc9x
github.com/codeigniter4/CodeIgniter4/commit/ce95ed5765256e2f09f3513e7d42790e0d6948f5
nvd.nist.gov/vuln/detail/CVE-2022-21647
github.com/FriendsOfPHP/security-advisories/blob/master/codeigniter4/framework/CVE-2022-21647.yaml
github.com/advisories/GHSA-w6jr-wj64-mc9x
github.com/CVEProject/cvelistV5/tree/main/cves/2022/21xxx/CVE-2022-21647.json
github.com/codeigniter4/CodeIgniter4