CVE-2022-24712
published 2022-02-28CVE-2022-24712: 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…
PriorityP342high8.8CVSS 3.1
AVNACLPRNUIRSUCHIHAH
EPSS
0.56%
42.2th percentile
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
3 ranges
| Vendor | Product | Version range | Fixed in |
|---|---|---|---|
| codeigniter | codeigniter | >= 4.0.0 < 4.1.9 | 4.1.9 |
| codeigniter4 | codeigniter4 | < 4.1.9 | 4.1.9 |
| codeigniter4 | framework | >= 0 < 4.1.9 | 4.1.9 |
CVSS provenance
nvdv3.18.8HIGHCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
nvdv2.06.8MEDIUMAV:N/AC:M/Au:N/C:P/I:P/A:P
Stop checking back — get the weekly exploitation signal.
Every Monday: what got weaponized or added to CISA KEV in the last seven days — each CVE cross-linked to its PoC, Nuclei template, and detection rule. Free, one email a week, unsubscribe in one click.
OSV
Cross-Site Request Forgery (CSRF) Protection Bypass Vulnerability in CodeIgniter4
osv·2022-03-01
CVE-2022-24712 [MEDIUM] Cross-Site Request Forgery (CSRF) Protection Bypass Vulnerability in CodeIgniter4
Cross-Site Request Forgery (CSRF) Protection Bypass Vulnerability in CodeIgniter4
### 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 rout
GHSA
Cross-Site Request Forgery (CSRF) Protection Bypass Vulnerability in CodeIgniter4
ghsa·2022-03-01
CVE-2022-24712 [MEDIUM] CWE-352 Cross-Site Request Forgery (CSRF) Protection Bypass Vulnerability in CodeIgniter4
Cross-Site Request Forgery (CSRF) Protection Bypass Vulnerability in CodeIgniter4
### 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 rout
No detection rules found.
No public exploits indexed.
No writeups or analysis indexed.
https://github.com/codeigniter4/CodeIgniter4/blob/7dc2ece32401ebde67122f7d2460efcaee7c352e/user_guide_src/source/changelogs/v4.1.9.rsthttps://github.com/codeigniter4/CodeIgniter4/security/advisories/GHSA-4v37-24gm-h554https://github.com/codeigniter4/CodeIgniter4/blob/7dc2ece32401ebde67122f7d2460efcaee7c352e/user_guide_src/source/changelogs/v4.1.9.rsthttps://github.com/codeigniter4/CodeIgniter4/security/advisories/GHSA-4v37-24gm-h554
2022-02-28
Published