Description
CodeIgniter is a PHP full-stack web framework. Prior to 4.7.4, calling UploadedFile::move() without a second argument uses the client-provided filename without sanitization, allowing a remote attacker to use path traversal sequences to write uploaded content outside the intended directory when the application exposes an upload path. This issue is fixed in version 4.7.4.
Published: 2026-07-31
Score: 7.5 High
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

The vulnerability in CodeIgniter 4 allows an attacker to write files to arbitrary locations on the file system. When a developer calls UploadedFile::move() without specifying a destination, the method uses the name supplied by the client without sanitizing it. This permits the insertion of path traversal sequences (such as ../) that escape the intended upload directory. The flaw is a classic Path Traversal weakness, identified as CWE‑22, and can lead to overwriting or creating files in any directory that the web server process can write to, thereby compromising confidentiality, integrity, or availability.

Affected Systems

Any deployment of CodeIgniter 4 built before version 4.7.4 that enables file uploads and uses UploadedFile::move() without a second argument is affected. This includes applications that provide an upload endpoint with a configurable upload path and rely on the framework to create destination directories. The flaw does not apply to sites that always supply a valid destination directory or that sanitize filenames before moving.

Risk and Exploitability

The CVSS base score of 7.5 marks the vulnerability as high severity. The EPSS score of less than 1% suggests that public exploitation is currently unlikely, yet the existence of the flaw means attackers could craft an upload payload that escapes the intended directory. No public exploits are listed, and the vulnerability is not catalogued in CISA’s KEV. The most probable attack vector is a user who can submit a file through the application’s upload interface; by including traversal characters in the filename, the attacker can write the file wherever the web server user has write permission.

Generated by OpenCVE AI on August 2, 2026 at 04:36 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade to CodeIgniter 4 version 4.7.4 or newer, which sanitizes filenames and removes the default unsanitized path behavior.
  • If upgrading is not immediately possible, always supply a second argument to UploadedFile::move() that points to a safe, writable directory within the application and ensure the directory path is absolute and non‑controversial.
  • Strip any path traversal characters from client‑provided filenames before calling move(), or generate a server‑side unique filename instead of trusting user input.
  • Reduce the web server process’ file‑system privileges and set the upload directory permissions so that writable files cannot overwrite critical application files or be executed, and configure the web server to treat the upload directory as non‑executable.

Generated by OpenCVE AI on August 2, 2026 at 04:36 UTC.

Tracking

Sign in to view the affected projects.

Advisories
Source ID Title
Github GHSA Github GHSA GHSA-hhmc-q9hp-r662 CodeIgniter: Path traversal in UploadedFile::move() when using client-provided filenames
History

Sun, 02 Aug 2026 19:45:00 +0000

Type Values Removed Values Added
First Time appeared Codeigniter
Codeigniter codeigniter
Vendors & Products Codeigniter
Codeigniter codeigniter

Fri, 31 Jul 2026 16:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'yes', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}


Fri, 31 Jul 2026 05:30:00 +0000

Type Values Removed Values Added
Description CodeIgniter is a PHP full-stack web framework. Prior to 4.7.4, calling UploadedFile::move() without a second argument uses the client-provided filename without sanitization, allowing a remote attacker to use path traversal sequences to write uploaded content outside the intended directory when the application exposes an upload path. This issue is fixed in version 4.7.4.
Title CodeIgniter: Path traversal in UploadedFile::move() when using client-provided filenames
Weaknesses CWE-22
References
Metrics cvssV3_1

{'score': 7.5, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N'}


Subscriptions

Codeigniter Codeigniter
cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-07-31T15:58:43.539Z

Reserved: 2026-07-15T22:19:06.907Z

Link: CVE-2026-63222

cve-icon Vulnrichment

Updated: 2026-07-31T15:57:10.885Z

cve-icon NVD

Status : Received

Published: 2026-07-31T06:16:31.953

Modified: 2026-07-31T16:17:08.903

Link: CVE-2026-63222

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-08-02T19:30:17Z

Weaknesses
  • CWE-22

    Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')