CodeIgniter: Path traversal in UploadedFile::move() when using client-provided filenames
High severity. Published 7 August 2026. Update codeigniter4/framework to 4.7.4 or later: composer update codeigniter4/framework.
Which versions are affected?
| Package | Affected versions | Fixed in |
|---|---|---|
| codeigniter4/framework (opens in a new tab) | < 4.7.4 | 4.7.4 |
What should you do?
Update every affected package you use to its fixed version, then check that nothing else in your project matches an advisory. To see which version you run, and whether anything is still affected:
composer show codeigniter4/framework
composer auditAdvisory details
| Severity | HighCVSS 7.5 |
|---|---|
| Published | |
| Updated | |
| CVE | CVE-2026-63222 (opens in a new tab) |
| GHSA | GHSA-hhmc-q9hp-r662 (opens in a new tab) |
| Weakness | CWE-22 |
What the advisory says
Impact In affected versions, calling UploadedFile::move() without a second argument uses the client-provided filename without sanitization. Depending on the destination path and server configuration, an attacker can supply a filename containing path traversal sequences (e.g. ../../public/shell.php) to write uploaded content outside the intended upload directory.
The patch sanitizes this default (no-argument) path.
Note: The patch only sanitizes the filename when no second argument is passed. If your application explicitly passes a client-provided name as the second argument, you remain responsible for sanitizing it - the patch does not (and cannot) sanitize a caller-supplied filename:
Source: GHSA-hhmc-q9hp-r662 (opens in a new tab) in the GitHub Advisory Database (CC BY 4.0). Data from GitHub (opens in a new tab) as of .
Other recent advisories for this package
- CodeIgniter: Uploaded file extension validation bypass in `is_image` and `mime_in` rules (critical, 7 August 2026)
- CodeIgniter: SQL injection in Query Builder deleteBatch() when used with where() conditions (critical, 7 August 2026)
- CodeIgniter: Spoofable forwarded HTTPS headers in IncomingRequest::isSecure() (opens in a new tab) (medium, 7 August 2026)