CVE-2026-48062: Codeigniter4/framework CodeIgniter4 Has A Validation Bypass Vulnerability

CRITICAL
Advisory Identifier: GHSA-2gr4-ppc7-7mhx
CVSS 9.8
CWE-434
Published
Advisory Summary

CVE-2026-48062 is a CRITICAL (CVSS 9.8) codeigniter4 has a validation bypass vulnerability (CWE-434: Unrestricted Upload of File with Dangerous Type) affecting Codeigniter4/framework libraries in the Packagist ecosystem. The issue involves codeigniter4 has a validation bypass when uploading file extensions via `ext_in` rule. Remediation is available by upgrading affected packages to version 4.7.3.

CVE-2026-48062 at a Glance

CVE Identifier CVE-2026-48062
GHSA Identifier GHSA-2gr4-ppc7-7mhx
Severity CRITICAL
CVSS v3.1 Base Score 9.8
CWE Classification CWE-434: Unrestricted Upload of File with Dangerous Type
Affected Product Codeigniter4/framework
Package Ecosystem Packagist
Published Date
Last Updated

Security Impact

CVSS: 9.8

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality High (C:H)
Integrity High (I:H)
Availability High (A:H)

How to Fix CVE-2026-48062

To remediate this vulnerability, upgrade all affected Codeigniter4/framework dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

codeigniter4/framework fixed: 4.7.3
Upgrade codeigniter4/framework to 4.7.3
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for codeigniter4/framework

How to Check if You Are Affected

To determine whether your application is affected by CVE-2026-48062, inspect your project dependencies for Codeigniter4/framework:

inspect dependencies for codeigniter4/framework

Analyze the terminal output to locate any version of Codeigniter4/framework in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 4.7.3), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-434: Unrestricted Upload of File with Dangerous Type, where the product allows the upload or transfer of dangerous file types that are automatically processed within its environment. In Codeigniter4/framework, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### Impact The `ext_in` upload validation rule checked the MIME-derived guessed extension instead of the client-provided filename extension. As a result, an uploaded file named `shell.php` containing GIF-like content could pass validation such as: ``` uploaded[avatar]|is_image[avatar]|mime_in[avatar,image/gif]|ext_in[avatar,gif] ``` because the detected MIME type maps to `gif`, even though the uploaded filename extension is `php`. Applications are impacted if they: - accept user-controlled uploads, - rely on `ext_in` to validate the uploaded filename extension, - save uploaded files using the original client filename: `$file->move($path)`, - store uploads in a web-accessible directory, - and allow PHP or other executable files to run from that directory. In those conditions, this may lead to arbitrary code execution. The default application does not expose such an upload endpoint. ### Patches Upgrade to v4.7.3 or later. ### Workarounds - Save uploads outside the public web root, preferably under `writable/uploads` - Use `$file->store()` or `$file->move($path, $file->getRandomName())` instead of preserving the original filename - Disable script execution in any public upload directory - Manually verify the client filename extension before moving the file - Reject files when `$file->getClientExtension()` is not in the allowed list or does not match `$file->guessExtension()` ### Resources - [CodeIgniter4 uploaded files documentation](https://codeigniter.com/user_guide/libraries/uploaded_files.html#moving-files) - [CodeIgniter4 file upload validation documentation](https://codeigniter.com/user_guide/libraries/validation.html#rules-for-file-uploads) - [CWE-434: Unrestricted Upload of File with Dangerous Type](https://cwe.mitre.org/data/definitions/434.html) - [OWASP File Upload Cheat Sheet](https://cheatsheetseries.owasp.org/cheatsheets/File_Upload_Cheat_Sheet.html)

CVE-2026-48062 Affected Codeigniter4/framework Versions

1 component(s)
Fixed Versions:
4.7.3
Product / Package Ecosystem Affected Versions Fixed Version
codeigniter4/framework
Packagist
< 4.7.3
4.7.3

References

Frequently Asked Questions

What is CVE-2026-48062?
CVE-2026-48062 is a security vulnerability in Codeigniter4/framework involving CodeIgniter4 has a validation bypass when uploading file extensions via `ext_in` rule under CWE-434: Unrestricted Upload of File with Dangerous Type.
Which Codeigniter4/framework versions are affected?
Affected versions include releases prior to 4.7.3 across affected packages: codeigniter4/framework.
What version fixes CVE-2026-48062?
Upgrading to 4.7.3 (or the latest patched release for your respective branch) resolves the vulnerability.
Is codeigniter4/framework affected?
Yes, codeigniter4/framework is affected in releases prior to 4.7.3. Upgrade your dependency to 4.7.3 or later.
What is the CVSS score of CVE-2026-48062?
CVE-2026-48062 has a CVSS v3.1 base score of 9.8 (CRITICAL) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H.
What CWE is associated with CVE-2026-48062?
CVE-2026-48062 is classified under CWE-434: Unrestricted Upload of File with Dangerous Type (The product allows the upload or transfer of dangerous file types that are automatically processed within its environment.).
How can I check Packagist dependencies for CVE-2026-48062?
Run the dependency tree command: 'inspect dependencies for codeigniter4/framework'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-2gr4-ppc7-7mhx",
  "modified" : "2026-06-11T17:16:09Z",
  "published" : "2026-06-11T17:16:09Z",
  "aliases" : [ "CVE-2026-48062" ],
  "summary" : "CodeIgniter4 has a validation bypass when uploading file extensions via `ext_in` rule",
  "details" : "### Impact\nThe `ext_in` upload validation rule checked the MIME-derived guessed extension instead of the client-provided filename extension. As a result, an uploaded file named `shell.php` containing GIF-like content could pass validation such as:\n```\nuploaded[avatar]|is_image[avatar]|mime_in[avatar,image/gif]|ext_in[avatar,gif]\n```\nbecause the detected MIME type maps to `gif`, even though the uploaded filename extension is `php`.\n\nApplications are impacted if they:\n- accept user-controlled uploads,\n- rely on `ext_in` to validate the uploaded filename extension,\n- save uploaded files using the original client filename: `$file->move($path)`,\n- store uploads in a web-accessible directory,\n- and allow PHP or other executable files to run from that directory.\n\nIn those conditions, this may lead to arbitrary code execution. The default application does not expose such an upload endpoint.\n\n### Patches\nUpgrade to v4.7.3 or later.\n\n### Workarounds\n- Save uploads outside the public web root, preferably under `writable/uploads`\n- Use `$file->store()` or `$file->move($path, $file->getRandomName())` instead of preserving the original filename\n- Disable script execution in any public upload directory\n- Manually verify the client filename extension before moving the file\n- Reject files when `$file->getClientExtension()` is not in the allowed list or does not match `$file->guessExtension()`\n\n### Resources\n- [CodeIgniter4 uploaded files documentation](https://codeigniter.com/user_guide/libraries/uploaded_files.html#moving-files)\n- [CodeIgniter4 file upload validation documentation](https://codeigniter.com/user_guide/libraries/validation.html#rules-for-file-uploads)\n- [CWE-434: Unrestricted Upload of File with Dangerous Type](https://cwe.mitre.org/data/definitions/434.html)\n- [OWASP File Upload Cheat Sheet](https://cheatsheetseries.owasp.org/cheatsheets/File_Upload_Cheat_Sheet.html)",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "codeigniter4/framework"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "4.7.3"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "< 4.7.2"
    }
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/codeigniter4/CodeIgniter4/security/advisories/GHSA-2gr4-ppc7-7mhx"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/codeigniter4/CodeIgniter4/commit/29299349e7d232e9532767c7cefaed30957309be"
  }, {
    "type" : "WEB",
    "url" : "https://codeigniter.com/user_guide/libraries/uploaded_files.html#moving-files"
  }, {
    "type" : "WEB",
    "url" : "https://codeigniter.com/user_guide/libraries/validation.html#rules-for-file-uploads"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/codeigniter4/CodeIgniter4"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/codeigniter4/CodeIgniter4/blob/develop/CHANGELOG.md"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-434" ],
    "severity" : "CRITICAL",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-06-11T17:16:09Z",
    "nvd_published_at" : null
  }
}