What’s Vulnerable › Vulnerabilities
CVE-2022-24712: Cross-Site Request Forgery (CSRF) Protection Bypass Vulnerability in CodeIgniter4
- Severity: high (CVSS 8.8 v3.1)
- Exploited in the wild: not listed in CISA KEV
- EPSS: 0.6% probability of exploitation in the next 30 days
- Public exploit or detection template: none known
- Published: 2022-02-28 · updated 2026-06-17
- Weakness: CWE-352
Description
CodeIgniter4 is the 4.x branch of CodeIgniter, a PHP full-stack web framework. A vulnerability in versions prior to 4.1.9 might allow remote attackers to bypass the CodeIgniter4 Cross-Site Request Forgery (CSRF) protection mechanism. Users should upgrade to version 4.1.9. There are workarounds for this vulnerability, but users will still need to code as these after upgrading to v4.1.9. Otherwise, the CSRF protection may be bypassed. If auto-routing is enabled, check the request method in the controller method before processing. If auto-routing is disabled, either avoid using `$routes->add()` and instead use HTTP verbs in routes; or check the request method in the controller method before processing.
Affected products
- CodeIgniter4: from 4.0.0 before 4.1.9 — fixed in 4.1.9
How to fix
Upgrade to a fixed version: CodeIgniter4 4.1.9. Check the vendor advisory for mitigations.
References
- https://github.com/codeigniter4/CodeIgniter4/blob/7dc2ece32401ebde67122f7d2460efcaee7c352e/user_guide_src/source/changelogs/v4.1.9.rst
- https://github.com/codeigniter4/CodeIgniter4/security/advisories/GHSA-4v37-24gm-h554
- https://github.com/codeigniter4/CodeIgniter4/blob/7dc2ece32401ebde67122f7d2460efcaee7c352e/user_guide_src/source/changelogs/v4.1.9.rst
- https://github.com/codeigniter4/CodeIgniter4/security/advisories/GHSA-4v37-24gm-h554
Get alerted when CVE-2022-24712 or the next vulnerability affects your stack