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

1,154 results · Clear filters · Feed

  • Critical 9.8

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

  • Critical 9.8

    Frauscher Sensortechnik Diagnostic System FDS102 for FAdC R2 and FAdCi R2 configuration upload vulnerability

    Frauscher Sensortechnik GmbH FDS102 for FAdC R2 and FAdCi R2 v2.8.0 to v2.9.1 are vulnerable to malicious code upload without authentication by using the configuration upload function. This could lead to a complete compromise of the FDS102 device.

  • Critical 9.9

    File Upload vulnerability in Forma LMS

    There is a vulnerability on Forma LMS version 3.1.0 and earlier that could allow an authenticated attacker (with the role of student) to privilege escalate in order to upload a Zip file through the SCORM importer feature. The exploitation of this vulnerabilit…

  • Critical 9.9

    Unrestricted Upload of File with Dangerous Type in Forma LMS

    There is a vulnerability on Forma LMS version 3.1.0 and earlier that could allow an authenticated attacker (with the role of student) to privilege escalate in order to upload a Zip file through the plugin upload component. The exploitation of this vulnerabili…

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

    Honeywell Experion PKS and ACE Controllers Unrestricted Upload of File with Dangerous Type

    Honeywell Experion PKS C200, C200E, C300, and ACE controllers are vulnerable to unrestricted file uploads, which may allow an attacker to remotely execute arbitrary code and cause a denial-of-service condition.

  • Critical 9.8

    A vulnerability in the web conferencing component of Mitel MiCollab through 9.5.0.101 could allow an unauthenticated at…

  • Critical 9.8

    Badaso vulnerable to Remote Code Execution via malicious file upload

    Badaso version 2.6.0 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

    Gin-vue-admin vulnerable to Unrestricted Upload of File with Dangerous Type

    Gin-vue-admin is a backstage management system based on vue and gin, which separates the front and rear of the full stack. Versions prior to 2.5.4 contain a file upload ability. The affected code fails to validate fileMd5 and fileName parameters, resulting in…

  • Critical 10.0

    ZGR TPS200 NG Missing Reference to Active Allocated Resource

    In ZGR TPS200 NG 2.00 firmware version and 1.01 hardware version, the firmware upload process does not perform any type of restriction. This allows an attacker to modify it and re-upload it via web with malicious modifications, rendering the device unusable.

  • Critical 9.0

    Gin-vue-admin - Unrestricted File Upload

    In "Gin-Vue-Admin", versions v2.5.1 through v2.5.3b are vulnerable to Unrestricted File Upload that leads to execution of javascript code, through the "Compress Upload" functionality to the Media Library. When an admin user views the uploaded file, a low priv…

  • Critical 9.8

    An arbitrary file upload vulnerability in the component /apiadmin/upload/attach of 74cmsSE v3.13.0 allows attackers to …

  • Critical 9.0

    Gin-vue-admin - Unrestricted File Upload

    In "Gin-Vue-Admin", versions v2.5.1 through v2.5.3beta are vulnerable to Unrestricted File Upload that leads to execution of javascript code, through the 'Normal Upload' functionality to the Media Library. When an admin user views the uploaded file, a low pri…

  • Critical 9.8

    The d8s-archives package for Python, as distributed on PyPI, included a potential code-execution backdoor inserted by a…

  • Critical 9.8

    The d8s-utility package for Python, as distributed on PyPI, included a potential code-execution backdoor inserted by a …

  • Critical 9.8

    The d8s-yaml package for Python, as distributed on PyPI, included a potential code-execution backdoor inserted by a thi…

  • Critical 9.8

    The d8s-html package for Python, as distributed on PyPI, included a potential code-execution backdoor inserted by a thi…

  • Critical 9.8

    The d8s-pdfs package for Python, as distributed on PyPI, included a potential code-execution backdoor inserted by a thi…

  • Critical 9.8

    The d8s-domains package for Python, as distributed on PyPI, included a potential code-execution backdoor inserted by a …

  • Critical 9.8

    The d8s-utility package for Python, as distributed on PyPI, included a potential code-execution backdoor inserted by a …

  • Critical 9.8

    The d8s-json package for Python, as distributed on PyPI, included a potential code-execution backdoor inserted by a thi…

  • Critical 9.8

    The d8s-algorithms package for Python, as distributed on PyPI, included a potential code-execution backdoor inserted by…

  • Critical 9.8

    The d8s-asns package for Python, as distributed on PyPI, included a potential code-execution backdoor inserted by a thi…

  • Critical 9.8

    The d8s-xml package for Python, as distributed on PyPI, included a potential code-execution backdoor inserted by a thir…

  • Critical 9.8

    The d8s-ip-addresses package for Python, as distributed on PyPI, included a potential code-execution backdoor inserted …

  • Critical 9.8

    The d8s-asns package for Python, as distributed on PyPI, included a potential code-execution backdoor inserted by a thi…

  • Critical 9.8

    The d8s-lists package for Python, as distributed on PyPI, included a potential code-execution backdoor inserted by a th…

  • Critical 9.1

    Discourse vulnerable to RCE via admins uploading maliciously zipped file

    Discourse is an open source discussion platform. In versions prior to 2.8.9 on the `stable` branch and prior to 2.9.0.beta10 on the `beta` and `tests-passed` branches, admins can upload a maliciously crafted Zip or Gzip Tar archive to write files at arbitrary…

  • Critical 9.8

    EC-CUBE plugin 'Product Image Bulk Upload Plugin' 1.0.0 and 4.1.0 contains an insufficient verification vulnerability w…

  • Critical 9.8

    ZFile v4.1.1 was discovered to contain an arbitrary file upload vulnerability via the component /file/upload/1.

  • Critical 9.8

    Simple College Website v1.0 was discovered to contain an arbitrary file write vulnerability via the function file_put_c…

  • Critical 9.1

    WordPress Import any XML or CSV File to WordPress plugin <= 3.6.7 - Authenticated Arbitrary Code Execution vulnerability

    Authenticated Arbitrary Code Execution vulnerability in Soflyy Import any XML or CSV File to WordPress plugin <= 3.6.7 at WordPress.

  • Critical 9.8
    CVE-2022-38916 EPSS 19%

    Pagekit vulnerable to Unrestricted Upload of File with Dangerous Type

    A file upload vulnerability exists in the storage feature of pagekit 1.0.18, which allows an attacker to upload malicious files

  • Critical 9.8

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

  • Critical 9.8

    FeehiCMS has an arbitrary file upload vulnerability

    There is an arbitrary file upload vulnerability in FeehiCMS 2.0.8 at the head image upload, that allows attackers to execute relevant PHP code.

  • Critical 9.8

    Dataease v1.11.1 SQL Injection via parameter dataSourceId

    DataEase v1.11.1 was discovered to contain a arbitrary file write vulnerability via the parameter dataSourceId.

  • Critical 9.1

    WordPress GiveWP plugin <= 2.20.2 - Authenticated Arbitrary File Creation via Export function vulnerability

    Authenticated Arbitrary File Creation via Export function vulnerability in GiveWP's GiveWP plugin <= 2.20.2 at WordPress.

  • 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

    Unrestricted Upload of File with Dangerous Type in MCMS

    MCMS v5.2.8 was discovered to contain an arbitrary file upload vulnerability.

  • Critical 10.0

    LRM does not restrict the types of files that can be uploaded to the affected product. A malicious actor can upload any…