Advisory Database
  • Advisories
  • Dependency Scanning
  1. composer
  2. ›
  3. codeigniter4/framework
  4. ›
  5. CVE-2026-63222

CVE-2026-63222: CodeIgniter: Path traversal in UploadedFile::move() when using client-provided filenames

August 7, 2026

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:

// Unsafe - even after upgrading:
$file->move(WRITEPATH . 'uploads', $file->getName());
$file->move(WRITEPATH . 'uploads', $file->getClientName());

References

  • github.com/advisories/GHSA-hhmc-q9hp-r662
  • github.com/codeigniter4/CodeIgniter4/commit/20ebcf4694d96d3c97fbc3938e360730e4f54618
  • github.com/codeigniter4/CodeIgniter4/releases/tag/v4.7.4
  • github.com/codeigniter4/CodeIgniter4/security/advisories/GHSA-hhmc-q9hp-r662
  • nvd.nist.gov/vuln/detail/CVE-2026-63222

Code Behaviors & Features

Detect and mitigate CVE-2026-63222 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions before 4.7.4

Fixed versions

  • 4.7.4

Solution

Upgrade to version 4.7.4 or above.

Impact 7.5 HIGH

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N

Learn more about CVSS

Weakness

  • CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')

Source file

packagist/codeigniter4/framework/CVE-2026-63222.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Sat, 08 Aug 2026 12:16:45 +0000.