Loading HuntDB...

CVE-2022-24712

MEDIUM
Published 2022-02-28T16:00:12.000Z
Actions:

Expert Analysis

Professional remediation guidance

Get tailored security recommendations from our analyst team for CVE-2022-24712. We'll provide specific mitigation strategies based on your environment and risk profile.

CVSS Score

V3.1
6.3
/10
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:N/I:H/A:L
Base Score Metrics
Exploitability: N/A Impact: N/A

EPSS Score

v2025.03.14
0.001
probability
of exploitation in the wild

There is a 0.1% chance that this vulnerability will be exploited in the wild within the next 30 days.

Updated: 2025-06-25
Exploit Probability
Percentile: 0.338
Higher than 33.8% of all CVEs

Attack Vector Metrics

Attack Vector
NETWORK
Attack Complexity
LOW
Privileges Required
LOW
User Interaction
REQUIRED
Scope
UNCHANGED

Impact Metrics

Confidentiality
NONE
Integrity
HIGH
Availability
LOW

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.

Available Exploits

No exploits available for this CVE.

Related News

No news articles found for this CVE.

Affected Products

GitHub Security Advisories

Community-driven vulnerability intelligence from GitHub

✓ GitHub Reviewed MODERATE

Cross-Site Request Forgery (CSRF) Protection Bypass Vulnerability in CodeIgniter4

GHSA-4v37-24gm-h554

Advisory Details

### 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)

Affected Packages

Packagist codeigniter4/framework
ECOSYSTEM: ≥0 <4.1.9

CVSS Scoring

CVSS Score

5.0

CVSS Vector

CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:N/I:H/A:L

Advisory provided by GitHub Security Advisory Database. Published: March 1, 2022, Modified: March 1, 2022

References

Published: 2022-02-28T16:00:12.000Z
Last Modified: 2025-04-23T19:00:10.052Z
Copied to clipboard!