Framework: CodeIgniter: Path traversal in UploadedFile::move() when using client-provided filenames (CVE-2026-63222)
CodeIgniter versions prior to 4.7.4 have a path traversal vulnerability in the UploadedFile::move() method when called without a second argument. The method uses the client-provided filename without sanitization, allowing an attacker to supply filenames with path traversal sequences to write files outside the intended directory. The vulnerability is fixed in version 4.7.4 by sanitizing the default filename. Applications explicitly passing client filenames as the second argument remain responsible for sanitizing those names.
AI Analysis
Technical Summary
In affected CodeIgniter versions before 4.7.4, calling UploadedFile::move() without a second argument results in using the client-provided filename without sanitization. This allows an attacker to include path traversal sequences (e.g., '../../public/shell.php') in the filename, potentially writing files outside the designated upload directory depending on server configuration. The patch in version 4.7.4 sanitizes the default filename used when no second argument is provided. However, if an application explicitly passes a client-provided filename as the second argument, the patch does not sanitize it, leaving responsibility to the application developer. Workarounds include using generated filenames or sanitizing client filenames before passing them to move().
Potential Impact
An attacker can exploit this vulnerability to write files outside the intended upload directory by supplying crafted filenames with path traversal sequences. This can lead to unauthorized file writes, potentially allowing code injection or other malicious actions depending on the server environment. The vulnerability does not affect confidentiality but impacts integrity by allowing unauthorized file modification.
Mitigation Recommendations
Upgrade CodeIgniter to version 4.7.4 or later, where the vulnerability is patched by sanitizing the default filename in UploadedFile::move(). If immediate upgrade is not possible, use generated filenames (e.g., getRandomName()) or sanitize client-provided filenames before passing them as the second argument to move(). Note that the patch only sanitizes the filename when no second argument is passed; explicit client filenames must be sanitized by the application.
Framework: CodeIgniter: Path traversal in UploadedFile::move() when using client-provided filenames (CVE-2026-63222)
Description
CodeIgniter versions prior to 4.7.4 have a path traversal vulnerability in the UploadedFile::move() method when called without a second argument. The method uses the client-provided filename without sanitization, allowing an attacker to supply filenames with path traversal sequences to write files outside the intended directory. The vulnerability is fixed in version 4.7.4 by sanitizing the default filename. Applications explicitly passing client filenames as the second argument remain responsible for sanitizing those names.
CVSS v3.1
Score 7.5high
Affected software
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
In affected CodeIgniter versions before 4.7.4, calling UploadedFile::move() without a second argument results in using the client-provided filename without sanitization. This allows an attacker to include path traversal sequences (e.g., '../../public/shell.php') in the filename, potentially writing files outside the designated upload directory depending on server configuration. The patch in version 4.7.4 sanitizes the default filename used when no second argument is provided. However, if an application explicitly passes a client-provided filename as the second argument, the patch does not sanitize it, leaving responsibility to the application developer. Workarounds include using generated filenames or sanitizing client filenames before passing them to move().
Potential Impact
An attacker can exploit this vulnerability to write files outside the intended upload directory by supplying crafted filenames with path traversal sequences. This can lead to unauthorized file writes, potentially allowing code injection or other malicious actions depending on the server environment. The vulnerability does not affect confidentiality but impacts integrity by allowing unauthorized file modification.
Mitigation Recommendations
Upgrade CodeIgniter to version 4.7.4 or later, where the vulnerability is patched by sanitizing the default filename in UploadedFile::move(). If immediate upgrade is not possible, use generated filenames (e.g., getRandomName()) or sanitize client-provided filenames before passing them as the second argument to move(). Note that the patch only sanitizes the filename when no second argument is passed; explicit client filenames must be sanitized by the application.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- GHSA-hhmc-q9hp-r662
- Osv Schema Version
- 1.4.0
- Aliases
- ["CVE-2026-63222"]
- Ecosystems
- ["Packagist"]
- Database Specific Severity
- HIGH
- Cvss Version
- 3.1
Threat ID: 6a7742a8bf8831d539b08ce8
Added to database: 08/08/2026, 14:52:24 UTC
Last enriched: 08/08/2026, 15:20:01 UTC
Last updated: 08/09/2026, 00:41:16 UTC
Views: 3
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.