Skip to content
OpenAdvisories

Weakness (CWE)

CWE-434: Unrestricted Upload of File with Dangerous Type

Base Draft

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

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

    Generate a new, unique filename for an uploaded file instead of using the user-supplied filename, so that no external input is used at all.[REF-422] [REF-423]

  2. Architecture and Design

    When the set of acceptable objects, such as filenames or URLs, is limited or known, create a mapping from a set of fixed input values (such as numeric IDs) to the actual filenames or URLs, and reject all other inputs.

  3. Architecture and Design

    Consider storing the uploaded files outside of the web document root entirely. Then, use other mechanisms to deliver the files dynamically. [REF-423]

  4. Implementation

    Assume all input is malicious. Use an "accept known good" input validation strategy, i.e., use a list of acceptable inputs that strictly conform to specifications. Reject any input that does not strictly conform to specifications, or transform it into something that does.

    When performing input validation, consider all potentially relevant properties, including length, type of input, the full range of acceptable values, missing or extra inputs, syntax, consistency across related fields, and conformance to business rules. As an example of business rule logic, "boat" may be syntactically valid because it only contains alphanumeric characters, but it is not valid if the input is only expected to contain colors such as "red" or "blue."

    Do not rely exclusively on looking for malicious or malformed inputs. This is likely to miss at least one undesirable input, especially if the code's environment changes. This can give attackers enough room to bypass the intended validation. However, denylists can be useful for detecting potential attacks or determining which inputs are so malformed that they should be rejected outright.

    For example, limiting filenames to alphanumeric characters can help to restrict the introduction of unintended file extensions.

  5. Architecture and Design

    Define a very limited set of allowable extensions and only generate filenames that end in these extensions. Consider the possibility of XSS (CWE-79) before allowing .html or .htm file types.

  6. Implementation

    Ensure that only one extension is used in the filename. Some web servers, including some versions of Apache, may process files based on inner extensions so that "filename.php.gif" is fed to the PHP interpreter.[REF-422] [REF-423]

  7. Implementation

    When running on a web server that supports case-insensitive filenames, perform case-insensitive evaluations of the extensions that are provided.

  8. Architecture and Design

    For any security checks that are performed on the client side, ensure that these checks are duplicated on the server side, in order to avoid CWE-602. Attackers can bypass the client-side checks by modifying values after the checks have been performed, or by changing the client to remove the client-side checks entirely. Then, these modified values would be submitted to the server.

Source: MITRE CWE-434

145 results · Clear filters · Feed

  • High 7.2
    CVE-2022-42092 Public exploit

    Backdrop CMS Unrestricted File Upload vulnerability

    Backdrop CMS 1.22.0 has Unrestricted File Upload vulnerability via 'themes' that allows attackers to Remote Code Execution. Note: Third parties dispute this and argue that advanced permissions are required.

  • High 7.2
    CVE-2022-1565 Public exploit EPSS 15%

    Import any XML or CSV File to WordPress <= 3.6.7 - Admin+ Malicious File Upload

    The plugin WP All Import is vulnerable to arbitrary file uploads due to missing file type validation via the wp_all_import_get_gz.php file in versions up to, and including, 3.6.7. This makes it possible for authenticated attackers, with administrator level pe…

  • High 8.8
    CVE-2022-1329 Public exploit Scanner template EPSS 93%

    Elementor Website Builder 3.6.0 - 3.6.2 - Missing Authorization to Remote Code Execution

    The Elementor Website Builder plugin for WordPress is vulnerable to unauthorized execution of several AJAX actions due to a missing capability check in the ~/core/app/modules/onboarding/module.php file that make it possible for attackers to modify site data i…

  • High 8.8
    CVE-2021-40905 Public exploit

    The web management console of CheckMK Enterprise Edition (versions 1.5.0 to 2.0.0p9) does not properly sanitise the upl…

  • High 8.8
    CVE-2021-44673 Public exploit

    Unrestricted Upload of File with Dangerous Type in Croogo

    A Remote Code Execution (RCE) vulnerability exists in Croogo 3.0.2via admin/file-manager/attachments, which lets a malicoius user upload a web shell script.

  • High 7.2
    CVE-2022-26149 Public exploit

    Unrestricted Upload of File with Dangerous Type in MODX Revolution

    MODX Revolution through 2.8.3-pl allows remote authenticated administrators to execute arbitrary code by uploading an executable file, because the Uploadable File Types setting can be changed by an administrator.

  • High 7.2
    CVE-2021-44255 Public exploit

    Unrestricted Upload of File with Dangerous Type in motionEye

    Authenticated remote code execution in MotionEye <= 0.42.1 and MotioneEyeOS <= 20200606 allows a remote attacker to upload a configuration backup file containing a malicious python pickle file which will execute arbitrary code on the server.

  • High 8.8
    CVE-2021-42362 Public exploit EPSS 80%

    WordPress Popular Posts <= 5.3.2 Authenticated Arbitrary File Upload

    The WordPress Popular Posts WordPress plugin is vulnerable to arbitrary file uploads due to insufficient input file type validation found in the ~/src/Image.php file which makes it possible for attackers with contributor level access and above to upload malic…

  • High 7.2
    CVE-2021-39352 Public exploit EPSS 56%

    Catch Themes Demo Import <= 1.7 Admin+ Arbitrary File Upload

    The Catch Themes Demo Import WordPress plugin is vulnerable to arbitrary file uploads via the import functionality found in the ~/inc/CatchThemesDemoImport.php file, in versions up to and including 1.7, due to insufficient file type validation. This makes it …

  • High 8.5
    CVE-2021-39141 Public exploit Scanner template EPSS 16%

    XStream is vulnerable to an Arbitrary Code Execution attack

    XStream is a simple library to serialize objects to XML and back again. In affected versions this vulnerability may allow a remote attacker to load and execute arbitrary code from a remote host only by manipulating the processed input stream. No user is affec…

  • High 8.1
    CVE-2021-23394 Public exploit Scanner template EPSS 19%

    Remote Code Execution (RCE)

    The package studio-42/elfinder before 2.1.58 are vulnerable to Remote Code Execution (RCE) via execution of PHP code in a .phar file. NOTE: This only applies if the server parses .phar files as PHP.

  • High 8.8
    CVE-2021-26828 Exploited Public exploit EPSS 39%

    OpenPLC ScadaBR through 0.9.1 on Linux and through 1.12.4 on Windows allows remote authenticated users to upload and ex…

    KEV Dec 3, 2025
  • High 8.8
    CVE-2020-13671 Exploited Public exploit EPSS 31%

    Drupal core Unrestricted Upload of File with Dangerous Type

    Drupal core does not properly sanitize certain filenames on uploaded files, which can lead to files being interpreted as the incorrect extension and served as the wrong MIME type or executed as PHP for certain hosting configurations. This issue affects: Drupa…

    KEV Jan 18, 2022
  • High 7.2
    CVE-2020-8260 Exploited Public exploit EPSS 96%

    A vulnerability in the Pulse Connect Secure < 9.1R9 admin web interface could allow an authenticated attacker to perfor…

    KEV Nov 3, 2021
  • High 8.8
    CVE-2020-14209 Public exploit EPSS 27%

    Dolibarr Unrestricted Upload of File with Dangerous Type

    Dolibarr before 11.0.5 allows low-privilege users to upload files of dangerous types, leading to arbitrary code execution. This occurs because .pht and .phar files can be uploaded. Also, a .htaccess file can be uploaded to reconfigure access control (e.g., to…

  • High 7.5
    CVE-2020-8162 Public exploit

    Circumvention of file size limits in ActiveStorage

    A client side enforcement of server side security vulnerability exists in rails < 5.2.4.2 and rails < 6.0.3.1 ActiveStorage's S3 adapter that allows the Content-Length of a direct file upload to be modified by an end user bypassing upload limits.

  • High 7.2
    CVE-2020-10963 Public exploit EPSS 15%

    FrozenNode Laravel-Administrator unrestricted file upload

    FrozenNode Laravel-Administrator through 5.0.12 allows unrestricted file upload (and consequently Remote Code Execution) via admin/tips_image/image/file_upload image upload with PHP content within a GIF image that has the .php extension. NOTE: this product is…

  • High —
    CVE-2014-8739 Public exploit Scanner template EPSS 92%

    jQuery File Upload Plugin Unrestricted file upload vulnerability

    Unrestricted file upload vulnerability in server/php/UploadHandler.php in the jQuery File Upload Plugin 6.4.4 for jQuery, as used in the Creative Solutions Creative Contact Form (formerly Sexy Contact Form) before 1.0.0 for WordPress and before 2.0.1 for Joom…

  • High 8.8
    CVE-2012-1592 Public exploit EPSS 29%

    Unrestricted Upload of File with Dangerous Type in Apache Struts2

    A local code execution issue exists in Apache Struts2 when processing malformed XSLT files, which could let a malicious user upload and execute arbitrary files.

  • High 7.5
    CVE-2019-8394 Exploited Public exploit EPSS 63%

    Zoho ManageEngine ServiceDesk Plus (SDP) before 10.0 build 10012 allows remote attackers to upload arbitrary files via …

    KEV Nov 3, 2021
  • High 7.2
    CVE-2018-19422 Public exploit EPSS 65%

    Subrion CMS RCE Vulnerability

    /panel/uploads in Subrion CMS 4.2.1 allows remote attackers to execute arbitrary PHP code via a .pht or .phar file, because the .htaccess file omits these.

  • High 7.2
    CVE-2017-1000119 Public exploit EPSS 61%

    October CMS PHP Code Execution

    October CMS build 412 is vulnerable to PHP code execution in the file upload functionality resulting in site compromise and possibly other applications on the server.

  • High 8.1
    CVE-2017-12617 Exploited Public exploit Scanner template EPSS 100%

    Unrestricted Upload of File with Dangerous Type Apache Tomcat

    When running Apache Tomcat versions 9.0.0.M1 to 9.0.0, 8.5.0 to 8.5.22, 8.0.0.RC1 to 8.0.46 and 7.0.0 to 7.0.81 with HTTP PUTs enabled (e.g. via setting the readonly initialisation parameter of the Default servlet to false) it was possible to upload a JSP fil…

    KEV Mar 25, 2022
  • High 8.1
    CVE-2017-12615 Exploited · Ransomware Public exploit Scanner template EPSS 100%

    When running Apache Tomcat on Windows with HTTP PUTs enabled it was possible to upload a JSP file to the server

    When running Apache Tomcat 7.0.0 to 7.0.79 on Windows with HTTP PUTs enabled (e.g. via setting the readonly initialisation parameter of the Default to false) it was possible to upload a JSP file to the server via a specially crafted request. This JSP could th…

    KEV Mar 25, 2022
  • High 8.4
    CVE-1999-0036 Public exploit

    IRIX login program with a nonzero LOCKOUT parameter allows creation or damage to files.