Skip to content

Upload validation bypass via trailing dots and embedded PHP extensions

Critical
paulbalandan published GHSA-4hwf-v4mp-hf6c Oct 9, 2026

Package

composer codeigniter4/framework (Composer)

Affected versions

< 4.7.5

Patched versions

4.7.5

Description

Impact

The is_image and mime_in upload rules can accept filenames with trailing dots that conceal a PHP extension. These rules and ext_in can also accept a PHP extension before the final image extension.

Applications may be vulnerable to remote code execution if they preserve such client-supplied filenames in a web-accessible directory whose server configuration executes them as PHP.

Patches

Upgrade to v4.7.5 or later.

Workarounds

  • Store uploads outside the public web root, preferably with $file->store().
  • If uploads must be public, disable script execution in the upload directory and use $file->move($path, $file->getRandomName()).
  • If client filenames must be preserved, reject trailing dots and PHP extensions in any dot-separated part of the filename.

References

Severity

Critical

CVSS overall score

This score calculates overall vulnerability severity from 0 to 10 and is based on the Common Vulnerability Scoring System (CVSS).
/ 10

CVSS v3 base metrics

Attack vector
Network
Attack complexity
Low
Privileges required
None
User interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

CVSS v3 base metrics

Attack vector: More severe the more the remote (logically and physically) an attacker can be in order to exploit the vulnerability.
Attack complexity: More severe for the least complex attacks.
Privileges required: More severe if no privileges are required.
User interaction: More severe when no user interaction is required.
Scope: More severe when a scope change occurs, e.g. one vulnerable component impacts resources in components beyond its security scope.
Confidentiality: More severe when loss of data confidentiality is highest, measuring the level of data access available to an unauthorized user.
Integrity: More severe when loss of data integrity is the highest, measuring the consequence of data modification possible by an unauthorized user.
Availability: More severe when the loss of impacted component availability is highest.
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

CVE ID

No known CVE

Weaknesses

Unrestricted Upload of File with Dangerous Type

The product allows the upload or transfer of dangerous file types that are automatically processed within its environment. Learn more on MITRE.

Credits