原始 OSV JSON{
"id": "GHSA-2gr4-ppc7-7mhx",
"aliases": [
"CVE-2026-48062"
],
"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)",
"summary": "CodeIgniter4 has a validation bypass when uploading file extensions via `ext_in` rule",
"affected": [
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "0"
},
{
"fixed": "4.7.3"
}
]
}
],
"package": {
"name": "codeigniter4/framework",
"ecosystem": "Packagist"
},
"database_specific": {
"last_known_affected_version_range": "< 4.7.2"
}
}
],
"modified": "2026-06-11T17:16:09Z",
"severity": [
{
"type": "CVSS_V3",
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"
}
],
"published": "2026-06-11T17:16:09Z",
"references": [
{
"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": "WEB"
},
{
"url": "https://github.com/codeigniter4/CodeIgniter4",
"type": "PACKAGE"
},
{
"url": "https://github.com/codeigniter4/CodeIgniter4/blob/develop/CHANGELOG.md",
"type": "WEB"
}
],
"schema_version": "1.4.0",
"database_specific": {
"cwe_ids": [
"CWE-434"
],
"severity": "CRITICAL",
"github_reviewed": true,
"nvd_published_at": null,
"github_reviewed_at": "2026-06-11T17:16:09Z"
}
}