Skip to content
OpenAdvisories

Weakness (CWE)

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

Variant Incomplete

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).

How to prevent it (3 mitigations)
  1. Architecture and Design

    Use PHP 4 or later.

  2. 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']))

  3. 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.

Source: MITRE CWE-616

5 results · Clear filters · Feed

  • Medium 5.4

    WebErpMesv2 has a File Upload Validation Bypass Leading to RCE

    WebErpMesv2 is a Resource Management and Manufacturing execution system Web for industry. Prior to 1.19, WebErpMesv2 contains a file upload validation bypass vulnerability in multiple controllers that allows authenticated users to upload arbitrary files, incl…

  • Medium 5.4

    Flock Safety Bravo Edge AI Compute Device BRAVO_00.00_local_20241017 accepts the default Thundercomm TurboX 6490 Fireho…

  • Medium 5.4

    File upload vulnerability in WebErpMesv2 1.17 in the app/Http/Controllers/FactoryController.php controller. This flaw a…

  • Medium 6.5

    UnoPim Stored XSS : Cookie hijacking through Create User function

    UnoPim is an open-source Product Information Management (PIM) system built on the Laravel framework. A vulnerability exists in the Create User process, allowing the creation of a new admin account with an option to upload a profile image. An attacker can uplo…

  • Medium 6.5

    File Upload vulnerability in Byzoro Networks Smart multi-service security gateway intelligent management platform versi…