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

Published Feb 26, 2022
·
Updated

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.

Other sources

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

Affected Software

3 affected componentsFixes available
composer/codeigniter4/framework<4.1.9
CodeIgniter Codeigniter>=4.0.0<4.1.9
composer/codeigniter4/framework<4.1.9
4.1.9

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade composer/codeigniter4/framework to a version that resolves this vulnerability.

    Fixed in 4.1.9
  2. Upgrade

    Upgrade CodeIgniter4 to a version that resolves this vulnerability.

    Fixed in 4.1.9
  3. Compensating control

    Check the request method in the controller method before processing. If auto-routing is disabled, avoid using $routes->add() and instead use HTTP verbs in routes.

Event History

Feb 26, 2022
Advisory Published
12:51 AM
Data Sourced
via Packagist·12:51 AM
DescriptionSeverityAffected Software
Feb 28, 2022
CVE Published
via MITRE·04:00 PM
Data Sourced
via MITRE·04:00 PM
DescriptionSeverityWeakness

Frequently Asked Questions

1

What is CVE-2022-24712?

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

2

How does CVE-2022-24712 affect CodeIgniter4?

CVE-2022-24712 affects versions prior to 4.1.9 of CodeIgniter4.

3

How can remote attackers exploit CVE-2022-24712?

Remote attackers can exploit CVE-2022-24712 to bypass the CodeIgniter4 Cross-Site Request Forgery (CSRF) protection mechanism.

4

What is the severity of CVE-2022-24712?

CVE-2022-24712 has a severity score of 8.8 (High).

5

How can I fix CVE-2022-24712?

To fix CVE-2022-24712, users should upgrade to version 4.1.9 of CodeIgniter4.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203