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

3,441 results · Feed

  • High 8.8

    File upload vulnerability in function upload in action/Core.class.php in zhimengzhe iBarn 1.5 allows remote attackers t…

  • High 7.6

    Unrestricted Upload of File with Dangerous Type in openemr/openemr

    Unrestricted Upload of File with Dangerous Type in GitHub repository openemr/openemr prior to 7.0.0.2.

  • High 7.8

    An arbitrary file upload vulnerability in the profile picture upload function of Exact Synergy Enterprise 267 before 26…

  • Medium 5.4

    FeehiCMS Unrestricted Upload vulnerability

    File Upload vulnerability in Feehi CMS thru 2.1.1 allows attackers to run arbitrary code via crafted image upload.

  • Critical 9.9

    SAP Business Objects Platform - versions 420, and 430, allows an attacker with normal BI user privileges to upload/repl…

  • High 7.2
    CVE-2022-45275 EPSS 15%

    An arbitrary file upload vulnerability in /queuing/admin/ajax.php?action=save_settings of Dynamic Transaction Queuing S…

  • High 8.8

    AList vulnerable to Improper Preservation of Permissions

    Alist v3.4.0 is vulnerable to File Upload. A user with only file upload permission can upload any file to any folder (even a password protected one).

  • High 8.8

    Remote php code execution in Akeneo PIM

    Akeneo PIM is an open source Product Information Management (PIM). Akeneo PIM Community Edition versions before v5.0.119 and v6.0.53 allows remote authenticated users to execute arbitrary PHP code on the server by uploading a crafted image. Akeneo PIM Communi…

  • High 7.2

    Online Leave Management System v1.0 was discovered to contain an arbitrary file upload vulnerability at /leave_system/c…

  • Critical 9.8
    CVE-2022-45359 EPSS 14%

    WordPress YITH WooCommerce Gift Cards Premium Plugin <= 3.19.0 is vulnerable to Arbitrary File Upload

    Unauth. Arbitrary File Upload vulnerability in YITH WooCommerce Gift Cards premium plugin <= 3.19.0 on WordPress.

  • High 8.8

    AyaCMS v3.1.2 has an Arbitrary File Upload vulnerability.

  • High 8.8

    Thinkphp has a code logic error

    Thinkphp 5.1.41 and 5.0.24 has a code logic error which causes file upload getshell.

  • High 7.2

    An issue was discovered in Zimbra Collaboration (ZCS) 8.8.15 and 9.0. Remote code execution can occur through ClientUpl…

  • High 8.8
    CVE-2022-45771 Public exploit

    An issue in the /api/audits component of Pwndoc v0.5.3 allows attackers to escalate privileges and execute arbitrary co…

  • Critical 9.8

    An arbitrary file upload vulnerability in Rocket TRUfusion Enterprise before 7.9.6.1 allows unauthenticated attackers t…

  • Critical 9.8

    SolarView Compact 4.0 and 5.0 is vulnerable to Unrestricted File Upload via a crafted php file.

  • High 7.6

    WordPress SEO Plugin by Squirrly SEO Plugin <= 12.1.10 is vulnerable to Arbitrary File Upload

    Auth. (contributor+) Arbitrary File Upload in SEO Plugin by Squirrly SEO plugin <= 12.1.10 on WordPress.

  • Critical 9.8

    Purchase Order Management System v1.0 contains a file upload vulnerability via /purchase_order/admin/?page=system_info.

  • Critical 9.8

    Online Tours & Travels Management System v1.0 contains an arbitrary file upload vulnerability via /tour/admin/file.php.

  • Critical 9.8

    Tiny File Manager version 2.4.8 executes the code of files uploaded by users of the application, instead of just return…

  • High 7.2

    An arbitrary file upload vulnerability in the Server Settings module of WBCE CMS v1.5.4 allows attackers to execute arb…

  • Critical 9.8

    Badaso vulnerable to Remote Code Execution (RCE)

    Badaso version 2.6.3 allows an unauthenticated remote attacker to execute arbitrary code remotely on the server. This is possible because the application does not properly validate the data uploaded by users.

  • 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 …

  • High 8.8
    CVE-2021-43258 Public exploit EPSS 12%

    CartView.php in ChurchInfo 1.3.0 allows attackers to achieve remote code execution through insecure uploads. This requi…

  • Medium 5.9

    Emerson Electric's Proficy Machine Edition Version 9.00 and prior is vulnerable to CWE-434 Unrestricted Upload of File …

  • High 7.2

    File upload vulnerability in asith-eranga ISIC tour booking through version published on Feb 13th 2018, allows attacker…

  • Critical 9.8

    WordPress Api2Cart Bridge Connector plugin <= 1.1.0 - Arbitrary File Upload vulnerability

    Unauth. Arbitrary File Upload vulnerability in WordPress Api2Cart Bridge Connector plugin <= 1.1.0 on WordPress.

  • Critical 9.9

    WordPress wpForo Forum plugin <= 2.0.9 - Auth. Arbitrary File Upload vulnerability

    Auth. (subscriber+) Arbitrary File Upload vulnerability in wpForo Forum plugin <= 2.0.9 on WordPress.

  • High 8.8
    CVE-2022-44384 Public exploit

    An arbitrary file upload vulnerability in rconfig v3.9.6 allows attackers to execute arbitrary code via a crafted PHP f…

  • Medium 6.7

    An arbitrary file upload vulnerability in the component /dede/file_manage_control.php of Dedecms v5.7.101 allows attack…

  • Critical 9.8

    An arbitrary file upload vulnerability in the /attachments component of Hoosk v1.8 allows attackers to execute arbitrar…

  • Critical 9.8

    An arbitrary file upload vulnerability in the component /pages/save_user.php of Canteen Management System v1.0 allows a…

  • High 7.2

    An arbitrary file upload vulnerability in the image upload function of Canteen Management System v1.0 allows attackers …

  • Medium 5.9

    ETIC Telecom Remote Access Server Unrestricted Upload of File with Dangerous Type

    All versions of ETIC Telecom Remote Access Server (RAS) 4.5.0 and prior is vulnerable to malicious file upload. An attacker could take advantage of this to store malicious files on the server, which could override sensitive and useful existing files on the fi…

  • Critical 9.8

    FLOWRING Agentflow BPM - Arbitrary File Upload

    The file upload function of Agentflow BPM has insufficient filtering for special characters in URLs. An unauthenticated remote attacker can exploit this vulnerability to upload arbitrary file and execute arbitrary code to manipulate system or disrupt service.

  • Critical 9.8

    AyaCMS v3.1.2 was discovered to contain an arbitrary file upload vulnerability via the component /admin/fst_upload.inc.…

  • Critical 9.8

    Roxy Fileman 1.4.6 allows Remote Code Execution via a .phar upload, because the default FORBIDDEN_UPLOADS value in conf…

  • High 7.2

    Canteen Management System v1.0 was discovered to contain an arbitrary file upload vulnerability via ip/youthappam/php_a…

  • High 8.8

    Role Based Pricing for WooCommerce < 1.6.2 - Subscriber+ Arbitrary File Upload

    The Role Based Pricing for WooCommerce WordPress plugin before 1.6.2 does not have authorisation and proper CSRF checks, and does not validate files to be uploaded, allowing any authenticated users like subscriber to upload arbitrary files, such as PHP

  • Critical 9.8

    The d8s-xml for python, as distributed on PyPI, included a potential code-execution backdoor inserted by a third party.…