CVE-2022-24712
Cross-Site Request Forgery (CSRF) Protection Bypass Vulnerability in CodeIgniter4
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.
Attack profile
How easy it is to exploit
- Attack vector
- Network
- Complexity
- Low
- Privileges needed
- Low
- User interaction
- Required
What an attacker can affect
- Confidentiality
- None
- Integrity
- High
- Availability
- Low
Exploit likelihood
What each source reports
CVE List Score used
6.3
Cross-Site Request Forgery (CSRF) Protection Bypass Vulnerability in CodeIgniter4
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.
- Record
CVE-2022-24712- CVSS 3.1
- 6.3 Medium
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:N/I:H/A:L - Weakness
- CWE-352
- Updated
- 2026-11-02
EUVDEUVD-2022-1316
6.3
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.
- Record
EUVD-2022-1316- CVSS 3.1
- 6.3 Medium
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:N/I:H/A:L - Updated
- 2026-11-02
GitHub AdvisoriesGHSA-4v37-24gm-h554
6.3
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
- Check the request method in the controller method before processing.
E.g.:
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:
- Do not use
$routes->add(), and use HTTP verbs in routes. - Check the request method in the controller method before processing.
E.g.:
if (strtolower($this->request->getMethod()) !== 'post') {
return $this->response->setStatusCode(405)->setBody('Method Not Allowed');
}
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-4v37-24gm-h554- CVSS 3.1
- 6.3 Medium
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:N/I:H/A:L - Weakness
- CWE-352
- Updated
- 2026-11-02
NVD
6.3
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.
- Record
CVE-2022-24712- CVSS 3.1
- 6.3 Medium
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:N/I:H/A:L - CVSS 3.1
- 8.8 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H - CVSS 2.0
- 6.8 Medium
AV:N/AC:M/Au:N/C:P/I:P/A:P - Weakness
- CWE-352
- Updated
- 2026-11-02
OSV
6.3
Cross-Site Request Forgery (CSRF) Protection Bypass Vulnerability in CodeIgniter4
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.
- Record
CVE-2022-24712- CVSS 3.1
- 6.3 Medium
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:N/I:H/A:L - Weakness
- CWE-352
- Updated
- 2026-11-02
OSVGHSA-4v37-24gm-h554
6.3
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
- Check the request method in the controller method before processing.
E.g.:
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:
- Do not use
$routes->add(), and use HTTP verbs in routes. - Check the request method in the controller method before processing.
E.g.:
if (strtolower($this->request->getMethod()) !== 'post') {
return $this->response->setStatusCode(405)->setBody('Method Not Allowed');
}
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-4v37-24gm-h554- CVSS 3.1
- 6.3 Medium
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:N/I:H/A:L - Weakness
- CWE-352
- Updated
- 2026-11-02
OSVBIT-codeigniter-2022-24712 No score
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.
- Record
BIT-codeigniter-2022-24712- Updated
- 2026-11-02
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
codeigniter4/frameworkPackagist |
before 4.1.9 | 4.1.9 |
codeigniterBitnami |
4.0.0 up to 4.1.9 | 4.1.9 |
codeigniter4/frameworkPackagist |
before 4.1.9, plus listed versions 4.0.04.0.0-rc.4v4.0.0-alpha.3v4.0.0-alpha.4v4.0.0-alpha.5 Show 22 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.5v4.1.6v4.1.7v4.1.8 |
4.1.9 |
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-24712 is a medium vulnerability (CVSS 6.3) in Codeigniter, published February 28, 2022. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 0.56%, the 47th percentile. Fixed in codeigniter4/framework 4.1.9.
References
github.com/codeigniter4/CodeIgniter4/security/advisories/GHSA-4v37-24gm-h554
github.com/codeigniter4/CodeIgniter4/blob/7dc2ece32401ebde67122f7d2460efcaee7c352e/user_guide_src/source/changelogs/v4.1.9.rst
nvd.nist.gov/vuln/detail/CVE-2022-24712
github.com/advisories/GHSA-4v37-24gm-h554
github.com/CVEProject/cvelistV5/tree/main/cves/2022/24xxx/CVE-2022-24712.json