CVE-2022-24712
mediumpriority · track · 35EPSS 0.006 · 47 %ileEUUSEPSS · scored 2026-10-27
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.
cvss
Technical severity, 0–10. One row per scoring source.
base score 0–10 · higher = more severe · hover a vector to decode⚠ sources disagree · medium–high · 6.3–8.8
ssvc
A stakeholder decision — act, attend, or track — from exploitation and impact.
weaknesses
The CWE weakness classes this flaw belongs to.
affected products (4)
Products and version ranges known to be affected.
advisories (2)
Vendor and ecosystem advisories describing this.
- GHSA-4v37-24gm-h554Cross-Site Request Forgery (CSRF) Protection Bypass Vulnerability in CodeIgniter42022-03-01ghsa · osvUS
### Impact This vulnerability might allow remote attackers to bypass the CodeIgniter4 CSRF protection mechanism. ### Patches Upgrade to v4.1.9 or later. ### Workarounds These are workarounds for this vulnerability, but **you will still need to code as these after upgrading to v4.1.9**. Otherwise, the CSRF protection may be bypassed. #### When Auto-Routing is Enabled 1. Check the request method in the controller method before processing. E.g.: ```php if (strtolower($this->request->getMethod()) !== 'post') { return $this->response->setStatusCode(405)->setBody('Method Not Allowed'); } ``` #### When Auto-Routing is Disabled Do one of the following: 1. Do not use `$routes->add()`, and [use HTTP verbs in routes](https://codeigniter4.github.io/userguide/incoming/routing.html#using-http-verbs-in-routes). 2. Check the request method in the controller method before processing. E.g.: ```php if (strtolower($this->request->getMethod()) !== 'post') { return $this->response->setStatusCode(405)->setBody('Method Not Allowed'); } ``` ### References - [CodeIgniter4 CSRF protection](https://codeigniter4.github.io/userguide/libraries/security.html#cross-site-request-forgery-csrf) ### For more information If you have any questions or comments about this advisory: * Open an issue in [codeigniter4/CodeIgniter4](https://github.com/codeigniter4/CodeIgniter4/issues) * Email us at [SECURITY.md](https://github.com/codeigniter4/CodeIgniter4/blob/develop/SECURITY.md)
- BIT-codeigniter-2022-247122024-03-06vendor · osvUS
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.
also known as (5)
Other names and identifiers for this entity.
- CNNVD-202202-2143cnnvd
- EUVD-2022-1316enisa_euvd
- GHSA-4v37-24gm-h554enisa_euvd
- BIT-codeigniter-2022-24712osv
- GHSA-4v37-24gm-h554osv
sources
Which sources assert this record, and when.
references (7)
External citations — patches, advisories, analysis.
- https://cxsecurity.com/cveshow/CVE-2022-24712/cnnvd
- https://github.com/codeigniter4/CodeIgniter4/blob/7dc2ece32401ebde67122f7d2460efcaee7c352e/user_guide_src/source/changelogs/v4.1.9.rstcnnvd
- https://github.com/codeigniter4/CodeIgniter4/security/advisories/GHSA-4v37-24gm-h554cnnvd
- https://github.com/codeigniter4/CodeIgniter4/blob/7dc2ece32401ebde67122f7d2460efcaee7c352e/user_guide_src/source/changelogs/v4.1.9.rstenisa_euvd
- https://github.com/codeigniter4/CodeIgniter4/security/advisories/GHSA-4v37-24gm-h554enisa_euvd
- https://github.com/codeigniter4/CodeIgniter4/blob/7dc2ece32401ebde67122f7d2460efcaee7c352e/user_guide_src/source/changelogs/v4.1.9.rstRelease NotesThird Party Advisorynvd
- https://github.com/codeigniter4/CodeIgniter4/security/advisories/GHSA-4v37-24gm-h554MitigationThird Party Advisorynvd
Attackers weaponise vulnerabilities like this against internet-exposed services. See what is exposed on your perimeter with a free passive scan.
Free scan