Skip to content
Heist/ feed
Back to feed
Medium

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

Type: advisorySources: OSV

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.

Products
Not specified
Affected versions
Not specified
Fixed versions
Not specified
CVEs
CVE-2022-24712
Confirmed fixed CVEs
Not specified
Updated in this feed
3 Nov 2026, 05:45 UTC · Revision 1

Source evidence

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

core-osv · Original source

Published 28 Feb 2022, 16:00 UTC

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.

osv:CVE-2022-24712
Complete source record
{
  "id": "df1e0861622f099518f209111a9d8c12564d9bc2af5755e7ff45673e51f2e67d",
  "url": "https://osv.dev/vulnerability/CVE-2022-24712",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "Cross-Site Request Forgery (CSRF) Protection Bypass Vulnerability in CodeIgniter4",
    "summary": "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.",
    "evidence": "osv:CVE-2022-24712",
    "products": [],
    "severity": "medium",
    "structured": {
      "id": "CVE-2022-24712",
      "aliases": [
        "BIT-codeigniter-2022-24712",
        "CVE-2022-24712",
        "GHSA-4v37-24gm-h554"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:N/I:H/A:L"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://github.com/codeigniter4/codeigniter4",
              "type": "GIT",
              "events": [
                {
                  "introduced": "47dbb16bb5e5784f45bf09a7380016f2d36f7c39"
                },
                {
                  "fixed": "202f41ad522ba1d414b9d9c35aba1cb0c156b781"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "range": [
                      {
                        "introduced": "0"
                      },
                      {
                        "fixed": "4.1.9"
                      }
                    ],
                    "source": "AFFECTED_FIELD",
                    "strategy": "StringRangeExpression"
                  },
                  {
                    "cpe": "cpe:2.3:a:codeigniter:codeigniter:*:*:*:*:*:*:*:*",
                    "range": [
                      {
                        "introduced": "4.0.0"
                      },
                      {
                        "fixed": "4.1.9"
                      }
                    ],
                    "source": "CPE_RANGE"
                  }
                ]
              }
            }
          ],
          "versions": [
            "v4.1.8",
            "v4.1.7",
            "v4.1.6",
            "v4.1.5",
            "v4.1.4",
            "v4.1.3",
            "v4.1.2",
            "v4.1.1",
            "v4.1.0",
            "v4.0.5",
            "v4.0.3",
            "4.0.0",
            "v4.0.1"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2022-24712.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:26.243191222Z",
      "provider": "osv",
      "references": [
        "https://github.com/codeigniter4/CodeIgniter4/blob/7dc2ece32401ebde67122f7d2460efcaee7c352e/user_guide_src/source/changelogs/v4.1.9.rst",
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/24xxx/CVE-2022-24712.json",
        "https://github.com/codeigniter4/CodeIgniter4/security/advisories/GHSA-4v37-24gm-h554",
        "https://nvd.nist.gov/vuln/detail/CVE-2022-24712"
      ],
      "provider_metadata": {
        "cwe_ids": [
          "CWE-352"
        ],
        "cna_assigner": "GitHub_M",
        "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/24xxx/CVE-2022-24712.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2022-24712",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 492829,
  "published_at": "2022-02-28T16:00:12+00:00"
}