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

220 results · Clear filters · Feed

  • Critical 10.0
    CVE-2023-29384 Public exploit

    WordPress WordPress Job Board and Recruitment Plugin – JobWP Plugin <= 2.0 is vulnerable to Arbitrary File Upload

    Unrestricted Upload of File with Dangerous Type vulnerability in HM Plugin WordPress Job Board and Recruitment Plugin – JobWP.This issue affects WordPress Job Board and Recruitment Plugin – JobWP: from n/a through 2.0.

  • Critical 9.8
    CVE-2023-4596 Public exploit Scanner template EPSS 14%

    Forminator <= 1.24.6 - Unauthenticated Arbitrary File Upload

    The Forminator plugin for WordPress is vulnerable to arbitrary file uploads due to file type validation occurring after a file has been uploaded to the server in the upload_post_image() function in versions up to, and including, 1.24.6. This makes it possible…

  • Critical 9.8
    CVE-2023-31541 Public exploit

    A unrestricted file upload vulnerability was discovered in the ‘Browse and upload images’ feature of the CKEditor v1.2.…

  • Critical 9.8
    CVE-2023-30185 Public exploit

    CRMEB v4.4 to v4.6 was discovered to contain an arbitrary file upload vulnerability via the component \attachment\Syste…

  • Critical 9.1
    CVE-2022-47878 Public exploit EPSS 36%

    Incorrect input validation for the default-storage-path in the settings page in Jedox 2020.2.5 allows remote, authentic…

  • Critical 9.8
    CVE-2022-34128 Public exploit

    The Cartography (aka positions) plugin before 6.0.1 for GLPI allows remote code execution via PHP code in the POST data…

  • Critical 9.8
    CVE-2020-23591 Public exploit

    A vulnerability in OPTILINK OP-XT71000N Hardware Version: V2.2 , Firmware Version: OP_V3.3.1-191028 allows an attacker …

  • Critical 9.8
    CVE-2022-40471 Public exploit EPSS 28%

    Remote Code Execution in Clinic's Patient Management System v 1.0 allows Attacker to Upload arbitrary php webshell via …

  • Critical 9.8
    CVE-2021-36711 Public exploit EPSS 17%

    Octobot mishandles Tentacles upload

    WebInterface in OctoBot before 0.4.4 allows remote code execution because Tentacles upload is mishandled.

  • Critical 9.8
    CVE-2021-42171 Public exploit

    Unrestricted Upload of File with Dangerous Type in Zenario CMS

    Zenario CMS 9.0.54156 is vulnerable to File Upload. The web server can be compromised by uploading and executing a web-shell which can run commands, browse system files, browse local resources, attack other servers, and exploit the local vulnerabilities, and …

  • Critical 9.1
    CVE-2021-21014 Public exploit

    Magento Commerce Arbitrary Folder Empty Could Lead To Arbitrary Code Execution

    Magento versions 2.4.1 (and earlier), 2.4.0-p1 (and earlier) and 2.3.6 (and earlier) are vulnerable to a file upload restriction bypass. Successful exploitation could lead to arbitrary code execution by an authenticated attacker. Access to the admin console i…

  • Critical 10.0
    CVE-2020-25213 Exploited Public exploit Scanner template EPSS 97%

    The File Manager (wp-file-manager) plugin before 6.9 for WordPress allows remote attackers to upload and execute arbitr…

    KEV Nov 3, 2021
  • Critical 9.8
    CVE-2019-19634 Public exploit

    class.upload.php in verot.net omits .pht from the set of dangerous file extensions

    class.upload.php in verot.net class.upload through 1.0.3 and 2.x through 2.0.4, as used in the K2 extension for Joomla! and other products, omits .pht from the set of dangerous file extensions, a similar issue to CVE-2019-19576.

  • Critical 9.8
    CVE-2019-19576 Public exploit EPSS 26%

    Remote code execution in verot/class.upload.php

    class.upload.php in verot.net class.upload before 1.0.3 and 2.x before 2.0.4, as used in the K2 extension for Joomla! and other products, omits .phar from the set of dangerous file extensions.

  • Critical 9.8
    CVE-2019-12409 Public exploit EPSS 22%

    Unrestricted upload of file with dangerous type in Apache Solr

    The 8.1.1 and 8.2.0 releases of Apache Solr contain an insecure setting for the ENABLE_REMOTE_JMX_OPTS configuration option in the default solr.in.sh configuration file shipping with Solr. If you use the default solr.in.sh file from the affected releases, the…

  • Critical 9.8
    CVE-2018-9207 Public exploit

    Unrestricted Upload of File with Dangerous Type in jquery-file-upload

    Arbitrary file upload in jQuery Upload File <= 4.0.2

  • Critical 9.8
    CVE-2018-9206 Public exploit Scanner template EPSS 97%

    Unrestricted Upload of File with Dangerous Type in blueimp-file-upload

    Unauthenticated arbitrary file upload vulnerability in Blueimp jQuery-File-Upload <= v9.22.0

  • Critical 9.8
    CVE-2018-15961 Exploited Public exploit Scanner template EPSS 100%

    Adobe ColdFusion versions July 12 release (2018.0.0.310739), Update 6 and earlier, and Update 14 and earlier have an un…

    KEV Nov 3, 2021
  • Critical 9.8
    CVE-2017-11357 Exploited · Ransomware Public exploit EPSS 78%

    Progress Telerik UI for ASP.NET AJAX before R2 2017 SP2 does not properly restrict user input to RadAsyncUpload, which …

    KEV Jan 26, 2023
  • Critical 9.8
    CVE-2016-3088 Exploited Public exploit Scanner template EPSS 98%

    Improper Input Validation in Apache ActiveMQ

    The Fileserver web application in Apache ActiveMQ 5.x before 5.14.0 allows remote attackers to upload and execute arbitrary files via an HTTP PUT followed by an HTTP MOVE request.

    KEV Feb 10, 2022