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

    Unrestricted Upload of File with Dangerous Type in polonel/trudesk

    Unrestricted Upload of File with Dangerous Type in GitHub repository polonel/trudesk prior to 1.2.4.

  • Critical 9.0

    Unrestricted Upload of File with Dangerous Type in inventree/inventree

    Unrestricted Upload of File with Dangerous Type in GitHub repository inventree/inventree prior to 0.7.2.

  • Critical 9.8

    Maxboard multiple vulnerabilities

    SQL injection and file upload attacks are possible due to insufficient validation of input values in some parameters and variables of files compromising Maxboard, which may lead to arbitrary code execution or privilege escalation. Attackers can use these vuln…

  • Critical 9.8

    Code injection in MCMS

    An arbitrary file upload vulnerability was discovered in MCMS 5.2.7, allowing an attacker to execute arbitrary code through a crafted ZIP file.

  • Critical 9.1

    Unrestricted Upload of File with Dangerous Type in publify/publify

    Unrestricted Upload of File with Dangerous Type in GitHub repository publify/publify prior to 9.2.9.

  • Critical 9.0

    Unrestricted Upload of File with Dangerous Type in polonel/trudesk

    Unrestricted Upload of File with Dangerous Type in GitHub repository polonel/trudesk prior to 1.2.2.

  • Critical 9.1

    Unrestructed file upload in yetiforcecompany/yetiforcecrm

    Unrestructed file upload in GitHub repository yetiforcecompany/yetiforcecrm prior to 6.4.0. Attacker can send malicious files to the victims is able to retrieve the stored data from the web application without that data being made safe to render in the browse…

  • Critical 9.8

    Elcomplus SmartPtt Unrestricted Upload of File with Dangerous Type

    Elcomplus SmartPTT is vulnerable as the backup and restore system does not adequately validate upload requests, enabling a malicious user to potentially upload arbitrary files.

  • Critical 9.8

    WordPress VikBooking Hotel Booking Engine & PMS plugin <= 1.5.3 - Arbitrary File Upload leading to RCE

    Arbitrary File Upload leading to RCE in E4J s.r.l. VikBooking Hotel Booking Engine & PMS plugin <= 1.5.3 on WordPress allows attackers to upload and execute dangerous file types (e.g. PHP shell) via the signature upload on the booking form.

  • Critical 9.0

    Stored XSS viva .svg file upload in causefx/organizr

    Stored XSS viva .svg file upload in GitHub repository causefx/organizr prior to 2.1.1810. This allows attackers to execute malicious scripts in the user's browser and it can lead to session hijacking, sensitive data exposure, and worse.

  • Critical 9.8

    Arbitrary file upload in Ghost

    An arbitrary file upload vulnerability in the file upload module of Ghost CMS v4.42.0 allows attackers to execute arbitrary code via a crafted file. NOTE: Vendor states as detailed in Ghost's security documentation, files can only be uploaded and published by…

  • Critical 9.8

    Unrestricted Upload of File with Dangerous Type in Payload

    An arbitrary file upload vulnerability in the file upload module of PayloadCMS v0.15.0 allows attackers to execute arbitrary code via a crafted SVG file.

  • Critical 9.8

    Unrestricted Upload of File with Dangerous Type in Strapi

    An arbitrary file upload vulnerability in the file upload module of Strapi v4.1.5 allows attackers to execute arbitrary code via a crafted file.

  • Critical 9.8

    Unrestricted Upload of File with Dangerous Type in ButterCMS

    An arbitrary file upload vulnerability in the file upload component of ButterCMS v1.2.8 allows attackers to execute arbitrary code via a crafted SVG file.

  • Critical 9.8

    Arbitrary file upload in Ghost

    An arbitrary file upload vulnerability in the file upload module of Ghost v4.39.0 allows attackers to execute arbitrary code via a crafted SVG file. NOTE: Vendor states that as outlined in Ghost's security documentation, upload of SVGs is only possible by tru…

  • Critical 9.8
    CVE-2022-27115 EPSS 29%

    RCE in Studio-42 elFinder on Windows before 2.1.61

    In Studio-42 elFinder 2.1.60, there is a vulnerability that causes remote code execution through file name bypass for file upload.

  • Critical 9.0

    Stored XSS viva .svg file upload in polonel/trudesk

    Stored XSS viva .svg file upload in GitHub repository polonel/trudesk prior to v1.2.0.

  • Critical 9.8
    CVE-2021-43421 Scanner template EPSS 43%

    elFinder Unrestricted File Upload vulnerability

    A File Upload vulnerability exists in Studio-42 elFinder 2.0.4 to 2.1.59 via connector.minimal.php, which allows a remote malicious user to upload arbitrary files and execute PHP code.

  • Critical 9.8
    CVE-2022-0888 EPSS 39%

    Ninja Forms - File Uploads Extension <= 3.3.0 - Arbitrary File Upload

    The Ninja Forms - File Uploads Extension WordPress plugin is vulnerable to arbitrary file uploads due to insufficient input file type validation found in the ~/includes/ajax/controllers/uploads.php file which can be bypassed making it possible for unauthentic…

  • Critical 9.8

    GE UR family Unrestricted Upload of File with Dangerous Type

    GE UR IED firmware versions prior to version 8.1x supports upgrading firmware using UR Setup configuration tool – Enervista UR Setup. This UR Setup tool validates the authenticity and integrity of firmware file before uploading the UR IED. An illegitimate use…

  • Critical 9.1

    There is a Unrestricted Upload of File vulnerability in ShowDoc v2.10.3 in star7th/showdoc

    There is a Unrestricted Upload of File vulnerability in ShowDoc v2.10.3 in GitHub repository star7th/showdoc prior to 2.10.4.

  • Critical 9.9
    CVE-2022-0415 Scanner template EPSS 66%

    Remote Command Execution in uploading repository file in gogs/gogs

    Remote Command Execution in uploading repository file in GitHub repository gogs/gogs prior to 0.12.6.

  • Critical 9.0

    Stored XSS viva axd and cshtml file upload in star7th/showdoc in star7th/showdoc

    Stored XSS viva axd and cshtml file upload in star7th/showdoc in GitHub repository star7th/showdoc prior to v2.10.4.

  • Critical 9.0

    Stored XSS viva .webma file upload in star7th/showdoc

    Stored XSS viva .webma file upload in GitHub repository star7th/showdoc prior to 2.10.4.

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

    Stored XSS viva .properties file upload in star7th/showdoc

    Stored XSS viva .properties file upload in GitHub repository star7th/showdoc prior to 2.10.4.

  • Critical 9.1

    File upload and overwrite to app_data/Config in SmarterTrack v100.0.8019.14010

    With administrator or admin privileges the application can be tricked into overwriting files in app_data/Config folder, e.g. the systemsettings.xml file. THis is possible in SmarterTrack v100.0.8019.14010

  • Critical 9.8

    File upload leading to RCE in MCMS

    An arbitrary file upload vulnerability in the component /ms/file/uploadTemplate.do of MCMS v5.2.4 allows attackers to execute arbitrary code.

  • Critical 9.8

    Unrestricted Upload of File with Dangerous Type in Drupal core

    Drupal's JSON:API and REST/File modules allow file uploads through their HTTP APIs. The modules do not correctly run all file validation, which causes an access bypass vulnerability. An attacker might be able to upload files that bypass the file validation pr…

  • Critical 9.8

    Mingsoft MCMS vulnerable to Remote Code Execution via file upload.

    File upload vulnerability in mingSoft MCMS through 5.2.5, allows remote attackers to execute arbitrary code via a crafted jspx webshell to net.mingsoft.basic.action.web.FileAction#upload.

  • Critical 9.8

    Arbitrary file upload in Mingsoft MCMS

    MCMS v5.2.4 was discovered to contain an arbitrary file upload vulnerability via the component /ms/template/writeFileContent.do.

  • Critical 9.8

    Arbitrary File Upload in Mingsoft MCMS

    MCMS v5.2.4 was discovered to have an arbitrary file upload vulnerability in the New Template module, which allows attackers to execute arbitrary code via a crafted ZIP file.

  • Critical 9.8

    Chain Sea Information Integration Co., Ltd ai chatbot system - Arbitrary File Upload

    Chain Sea ai chatbot system’s file upload function has insufficient filtering for special characters in URLs, which allows a remote attacker to by-pass file type validation, upload malicious script and execute arbitrary code without authentication, in order t…

  • Critical 9.8

    4MOSAn GCB Doctor - Unrestricted Upload of File

    4MOSAn GCB Doctor’s file upload function has improper user privilege control. A remote attacker can upload arbitrary files including webshell files without authentication and execute arbitrary code in order to perform arbitrary system operations or deny of se…

  • Critical 9.8
    CVE-2021-27860 Exploited EPSS 40%

    Arbitrary file upload vulnerability in FatPipe software

    A vulnerability in the web management interface of FatPipe WARP, IPVPN, and MPVPN software prior to versions 10.1.2r60p92 and 10.2.2r44p1 allows a remote, unauthenticated attacker to upload a file to any location on the filesystem. The FatPipe advisory identi…

    KEV Jan 10, 2022
  • Critical 9.8

    Showdoc File Upload Vulnerability

    ShowDoc 2.8.3 ihas a file upload vulnerability, where attackers can use the vulnerability to obtain server permissions.

  • Critical 9.1

    AUVESY Versiondog

    There are multiple API function codes that permit data writing to any file, which may allow an attacker to modify existing files or create new files.

  • Critical 9.1

    InHand Networks IR615 Router

    InHand Networks IR615 Router's Versions 2.3.0.r4724 and 2.3.0.r4870 do not have a filter or signature check to detect or prevent an upload of malicious files to the server, which may allow an attacker, acting as an administrator, to upload malicious files. Th…

  • Critical 9.8

    Tad TadTools - Arbitrary File Upload

    The file extension of the TadTools file upload function fails to filter, thus remote attackers can upload any types of files and execute arbitrary code without logging in.

  • Critical 9.8

    Integria IMS Remote Code Execution

    Integria IMS in its 5.0.92 version is vulnerable to a Remote Code Execution attack through file uploading. An unauthenticated attacker could abuse the AsyncUpload() function in order to exploit the vulnerability.