Skip to content
OpenAdvisories
Medium · 6.3 CVE-2022-24712 BIT-codeigniter-2022-24712EUVD-2022-1316GHSA-4v37-24gm-h554

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

Published Feb 28, 2022 · Updated Apr 23, 2025 · Assigned by GitHub_M

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.

Affected products

VendorProductAffectedFixed
codeigniter4 CodeIgniter4 < 4.1.9 —

Affected packages

EcosystemPackageAffectedFixedRecord
Packagist codeigniter4/framework < 4.1.9 4.1.9 GHSA-4v37-24gm-h554

References