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 7.5
    CVE-2021-40324 EPSS 69%

    Cobbler before 3.3.0 allows arbitrary file write operations via upload_log_data.

    Cobbler before 3.3.0 allows arbitrary file write operations via upload_log_data.

  • Critical 9.8

    ECOA BAS controller - Path Traversal-1

    ECOA BAS controller suffers from an arbitrary file write and path traversal vulnerability. Using the POST parameters, unauthenticated attackers can remotely set arbitrary values for location and content type and gain the possibility to execute arbitrary code …

  • Unscored —

    Simple School Staff Directory <= 1.1 - Admin+ Arbitrary File Upload

    The Simple Schools Staff Directory WordPress plugin through 1.1 does not validate uploaded logo pictures to ensure that are indeed images, allowing high privilege users such as admin to upload arbitrary file like PHP, leading to RCE

  • High —

    Arbitrary Code Execution in feehi/cms

    An arbitrary file upload vulnerability in Feehi CMS v2.0.8 and below allows attackers to execute arbitrary code via a crafted PHP file.

  • Critical 9.9

    SAP Business One, version - 10.0, allows an attacker with business authorization to upload any files (including script …

  • Unscored —

    Simple eCommerce <= 2.2.5 - Arbitrary File Upload

    The WordPress Simple Ecommerce Shopping Cart Plugin- Sell products through Paypal plugin through 2.2.5 does not check for the uploaded Downloadable Digital product file, allowing any file, such as PHP to be uploaded by an administrator. Furthermore, as there …

  • Unscored —

    Shopp eCommerce <= 1.4 - Unauthenticated Arbitrary File Upload

    The shopp_upload_file AJAX action of the Shopp WordPress plugin through 1.4, available to both unauthenticated and authenticated user does not have any security measure in place to prevent upload of malicious files, such as PHP, allowing unauthenticated users…

  • Unscored —

    Email Artillery <= 4.1 - Arbitrary File Upload

    The Email Artillery (MASS EMAIL) WordPress plugin through 4.1 does not properly check the uploaded files from the Import Emails feature, allowing arbitrary files to be uploaded. Furthermore, the plugin is also lacking any CSRF check, allowing such issue to be…

  • Critical 9.8

    Unrestricted File Upload in ShowDoc v2.9.5

    Unrestricted File Upload in ShowDoc v2.9.5 allows remote attackers to execute arbitrary code via the 'file_url' parameter in the component AdminUpdateController.class.php'.

  • Unscored —
    CVE-2021-32955 EPSS 37%

    Delta Electronics DIAEnergie Version 1.7.5 and prior allows unrestricted file uploads, which may allow an attacker to r…

  • High 8.5

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

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

    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.5
    CVE-2021-39146 Scanner template EPSS 14%

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

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

    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, if using the ver…

  • High 8.5

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

    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. A user is only a…

  • High 8.5

    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…

  • Unscored —

    Arbitrary file upload vulnerability in OFBiz

    Unrestricted Upload of File with Dangerous Type vulnerability in Apache OFBiz allows an attacker to execute remote commands. This issue affects Apache OFBiz version 17.12.07 and prior versions. Upgrade to at least 17.12.08 or apply patches at https://issues.a…

  • Unscored —

    A vulnerability in Pulse Connect Secure before 9.1R12 could allow an authenticated administrator to perform a file writ…

  • Critical 9.8

    Unrestricted Upload of File with Dangerous Type in django-widgy

    Unrestricted Upload of File with Dangerous Type in Django-Widgy v0.8.4 allows remote attackers to execute arbitrary code via the 'image' widget in the component 'Change Widgy Page'.

  • High 7.8

    Command injection in Yamale

    23andMe Yamale before 3.0.8 allows remote attackers to execute arbitrary code via a crafted schema file. The schema parser uses eval as part of its processing, and tries to protect from malicious expressions by limiting the builtins that are passed to the eva…

  • Unscored —
    CVE-2021-24499 Public exploit Scanner template EPSS 60%

    Workreap theme < 2.2.2 - Unauthenticated Upload Leading to Remote Code Execution

    The Workreap WordPress theme before 2.2.2 AJAX actions workreap_award_temp_file_uploader and workreap_temp_file_uploader did not perform nonce checks, or validate that the request is from a valid user in any other way. The endpoints allowed for uploading arbi…

  • Critical —

    Jeecg-Boot CMS arbitrary file upload vulnerability

    An arbitrary file upload vulnerability in /jeecg-boot/sys/common/upload of jeecg-boot CMS 2.3 allows attackers to execute arbitrary code.

  • High 8.8
    CVE-2021-36741 Exploited

    An improper input validation vulnerability in Trend Micro Apex One, Apex One as a Service, OfficeScan XG, and Worry-Fre…

    KEV Nov 3, 2021
  • High 8.8

    Cross-Site Request Forgery in WooCommerce Stock Manager WordPress Plugin

    The WooCommerce Stock Manager WordPress plugin is vulnerable to Cross-Site Request Forgery leading to Arbitrary File Upload in versions up to, and including, 2.5.7 due to missing nonce and file validation in the /woocommerce-stock-manager/trunk/admin/views/im…

  • Critical 9.8

    Learningdigital.com, Inc. Orca HCM - Unrestricted Upload of File with Dangerous Type

    The specific parameter of upload function of the Orca HCM digital learning platform does not filter file format, which allows remote unauthenticated attackers to upload files containing malicious script to execute RCE attacks.

  • Critical 9.8

    ARTWARE CMS - Unrestricted Upload of File

    ARTWARE CMS parameter of image upload function does not filter the type of upload files which allows remote attackers can upload arbitrary files without logging in, and further execute code unrestrictedly.

  • High 8.8

    Arbitrary file upload in Fork CMS

    Arbitrary file upload vulnerability in Fork CMS 5.9.2 allows attackers to create or replace arbitrary files in the /themes directory via a crafted zip file uploaded to the Themes panel.

  • Critical 9.8
    CVE-2021-34624 Scanner template

    ProfilePress 3.0 - 3.1.3 - Arbitrary File Upload in File Uploader Component

    A vulnerability in the file uploader component found in the ~/src/Classes/FileUploader.php file of the ProfilePress WordPress plugin made it possible for users to upload arbitrary files during user registration or during profile updates. This issue affects ve…

  • Critical 9.8

    ProfilePress 3.0 - 3.1.3 - Arbitrary File Upload in Image Uploader Component

    A vulnerability in the image uploader component found in the ~/src/Classes/ImageUploader.php file of the ProfilePress WordPress plugin made it possible for users to upload arbitrary files during user registration or during profile updates. This issue affects …

  • Unscored —

    Joomla! Core is prone to a vulnerability that lets attackers upload arbitrary files because the application fails to pr…

  • Unscored —

    Autoptimize < 2.7.8 - Arbitrary File Upload via "Import Settings"

    The Autoptimize WordPress plugin before 2.7.8 attempts to delete malicious files (such as .php) form the uploaded archive via the "Import Settings" feature, after its extraction. However, the extracted folders are not checked and it is possible to upload a zi…

  • Unscored —
    CVE-2021-24370 Scanner template EPSS 47%

    Fancy Product Designer < 4.6.9 - Unauthenticated Arbitrary File Upload and RCE

    The Fancy Product Designer WordPress plugin before 4.6.9 allows unauthenticated attackers to upload arbitrary files, resulting in remote code execution.

  • High 8.1

    Remote Code Execution vulnerability in PHPMailer 6.4.1 running on Windows

    PHPMailer before 6.5.0 on Windows allows remote code execution if lang_path is untrusted data and has a UNC pathname.

  • Unscored —

    ZOLL Defibrillator Dashboard, v prior to 2.2, The web application allows a non-administrative user to upload a maliciou…

  • High 7.8

    Raonwiz DEXT5 Editor File upload and Execution vulnerability

    Parameter manipulation can bypass authentication to cause file upload and execution. This will execute the remote code. This issue affects: Raonwiz DEXT5Editor versions prior to 3.5.1405747.1100.03.

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