# CodeIgniter: Path traversal in UploadedFile::move() when using client-provided filenames

High severity, published 2026-08-07. Update codeigniter4/framework to 4.7.4 or later: composer update codeigniter4/framework.

Canonical URL: https://buzzphp.com/security/ghsa-hhmc-q9hp-r662 · Data from GitHub as of 2026-11-25.

| | |
| --- | --- |
| Severity | high (CVSS 7.5) |
| Published | 2026-08-07 |
| Updated | 2026-08-07 |
| CVE | [CVE-2026-63222](https://nvd.nist.gov/vuln/detail/CVE-2026-63222) |
| GHSA | [GHSA-hhmc-q9hp-r662](https://github.com/advisories/GHSA-hhmc-q9hp-r662) |
| Weakness | CWE-22 |

| Package | Affected versions | Fixed in |
| --- | --- | --- |
| codeigniter4/framework | < 4.7.4 | 4.7.4 |

## What to do

Update codeigniter4/framework to 4.7.4 or later: composer update codeigniter4/framework.

Check which version you run with `composer show codeigniter4/framework`, and every affected package with `composer audit`.

## About this advisory

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:



## Links

- [GHSA-hhmc-q9hp-r662 on GitHub](https://github.com/advisories/GHSA-hhmc-q9hp-r662)
- [CVE-2026-63222 on the National Vulnerability Database](https://nvd.nist.gov/vuln/detail/CVE-2026-63222)
- [All Composer security advisories](https://buzzphp.com/security)
