CWEweakness

CWE-616 Incomplete Identification of Uploaded File Variables (PHP)

Official page ↗
Abstraction
Variant
Structure
Simple
Status
Incomplete
Languages
PHP
CWE version
5.0

Description

The PHP application uses an old method for processing uploaded files by referencing the four global variables that are set for each file (e.g. $varname, $varname_size, $varname_name, $varname_type).

Common consequences

• Confidentiality, Integrity: Read Files or Directories, Modify Files or Directories — These variables could be overwritten by attackers via POST requests, cookies, or other methods, causing the application to read or process unauthorized files.

Potential mitigations

• [Architecture and Design] Use PHP 4 or later. • [Architecture and Design] If you must support older PHP versions, write your own version of is_uploaded_file() and run it against $HTTP_POST_FILES['userfile'])) • [Implementation] For later PHP versions, reference uploaded files using the $HTTP_POST_FILES or $_FILES variables, and use is_uploaded_file() or move_uploaded_file() to ensure that you are dealing with an uploaded file.

Observed examples

• CVE-2002-1460: Forum does not properly verify whether a file was uploaded or if the associated variables were set by POST, allowing remote attackers to read arbitrary files. • CVE-2002-1759: Product doesn't check if the variables for an upload were set by uploading the file, or other methods such as $_POST. • CVE-2002-1710: Product does not distinguish uploaded file from other files.

Related

Observed example · CVE (3)

  • CVE-2002-1460 L-Forum 2.40 and earlier does not properly verify whether a file was uploaded or if the associated variables were set by POST (attachment,… vulnerability
  • CVE-2002-1710 The attachment capability in Compose Mail in BasiliX Webmail 1.1.0 does not check whether the attachment was uploaded by the user or came… vulnerability
  • CVE-2002-1759 The upload function in PHProjekt 2.0 through 3.1 does not properly verify certain variables related to uploaded data, which allows remote… vulnerability

Child of · CWE (1)

  • CWE-345 Insufficient Verification of Data Authenticity weakness

Peer of · CWE (1)

  • CWE-473 PHP External Variable Modification weakness

Referenced by CVE · weakness (11)

  • CVE-2026-105630 Plane is an open-source project management tool. vulnerability
  • CVE-2026-67198 Perspective 5.0.0 contains a denial-of-service vulnerability in the VirtualServer protocol dispatcher that allows unauthenticated remote… vulnerability
  • CVE-2025-67084 File upload vulnerability in InvoicePlane through 1.6.3 allows authenticated attackers to upload arbitrary PHP files into attachments,… vulnerability
  • CVE-2026-22789 WebErpMesv2 is a Resource Management and Manufacturing execution system Web for industry. vulnerability
  • CVE-2025-59402 Flock Safety Bravo Edge AI Compute Device BRAVO_00.00_local_20241017 accepts the default Thundercomm TurboX 6490 Firehose loader in EDL/QDL… vulnerability
  • CVE-2025-52130 File upload vulnerability in WebErpMesv2 1.17 in the app/Http/Controllers/FactoryController.php controller. vulnerability
  • CVE-2024-52305 UnoPim is an open-source Product Information Management (PIM) system built on the Laravel framework. vulnerability
  • CVE-2024-31601 An issue in Beijing Panabit Network Software Co., Ltd Panalog big data analysis platform v. vulnerability
  • CVE-2024-28520 File Upload vulnerability in Byzoro Networks Smart multi-service security gateway intelligent management platform version S210, allows an… vulnerability
  • CVE-2024-29858 In MISP before 2.4.187, __uploadLogo in app/Controller/OrganisationsController.php does not properly check for a valid logo upload. vulnerability
  • CVE-2023-38947 An arbitrary file upload vulnerability in the /languages/install.php component of WBCE CMS v1.6.1 allows attackers to execute arbitrary… vulnerability