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

Medium 6.3 Published Updated

Remote attackers can bypass CSRF protection in CodeIgniter4, potentially allowing unauthorized actions if auto-routing is enabled or routes are misconfigured.

Exploited in the wild
Not known
Login needed
Any signed-in user
Attackable
Over the internet
Victim action needed
A user has to click or open something
Fix
Available

What is CVE-2022-24712?

CVE-2022-24712 is a medium-severity vulnerability in CodeIgniter4, published on 28 Feb 2022. Any signed-in user can exploit it over the network, and only if a user opens a file or follows a link.

Official 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.

Weakness: CWE-352

Which versions are affected by CVE-2022-24712?

3 open source packages ship an affected version, including codeigniter4/framework and codeigniter. It affects 1 product.

PackageAffectedFixed in
codeigniter4/framework PackagistAll versions4.1.9
codeigniter4/framework PackagistAll versions4.1.9
codeigniter BitnamiFrom 4.0.04.1.9

Products include Codeigniter Codeigniter.

How do I fix CVE-2022-24712?

Upgrade codeigniter4/framework to 4.1.9 or later.

Is CVE-2022-24712 being exploited?

There is no known exploitation of CVE-2022-24712 in the wild and no public exploit code.

Sources

Also known as BIT-codeigniter-2022-24712, GHSA-4v37-24gm-h554.

Is CVE-2022-24712 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free