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,210 results · Clear filters · Feed

  • High 7.2
    CVE-2023-24249 Public exploit

    laravel-admin has Arbitrary File Upload vulnerability

    An arbitrary file upload vulnerability in laravel-admin v1.8.19 allows attackers to execute arbitrary code via a crafted PHP file.

  • High 7.5

    In affected versions of Octopus Deploy it is possible to upload a zipbomb file as a task which results in Denial of Ser…

  • High 8.4

    SAP BusinessObjects Business Intelligence Platform (CMC) - versions 420, 430, allows an authenticated admin user to upl…

  • High 8.2

    Missing file upload type validation in pimcore/pimcore

    Pimcore is an Open Source Data & Experience Management Platform: PIM, MDM, CDP, DAM, DXP/CMS & Digital Commerce. The upload functionality for updating user profile does not properly validate the file content-type, allowing any authenticated user to bypass thi…

  • High 8.8

    File Upload vulnerability in phpwcms 1.9.25 allows remote attackers to run arbitrary code via crafted file upload to in…

  • High 8.8
    CVE-2022-46604 Public exploit

    An issue in Tecrail Responsive FileManager v9.9.5 and below allows attackers to bypass the file extension check mechani…

  • High 8.8
    CVE-2023-24610 Public exploit

    NOSH 4a5cfdb allows remote authenticated users to execute PHP arbitrary code via the "practice logo" upload feature. Th…

  • High 7.2

    An arbitrary file upload vulnerability in Ftdms v3.1.6 allows attackers to execute arbitrary code via uploading a craft…

  • High 7.2

    OpenMage LTS DataFlow upload remote code execution vulnerability

    OpenMage LTS is an e-commerce platform. Prior to versions 19.4.22 and 20.0.19, an administrator with the permissions to upload files via DataFlow and to create products was able to execute arbitrary code via the convert profile. Versions 19.4.22 and 20.0.19 c…

  • High 7.6
    CVE-2023-0455 Public exploit

    Unrestricted Upload of File with Dangerous Type in unilogies/bumsys

    Unrestricted Upload of File with Dangerous Type in GitHub repository unilogies/bumsys prior to v1.0.3-beta.

  • High 8.8

    File Upload Vulnerability found in Rawchen Blog-ssm v1.0 allowing attackers to execute arbitrary commands and gain esca…

  • High 8.8

    Arbitrary file write in net.mingsoft:ms-mcms

    MCMS v5.2.10 and below was discovered to contain an arbitrary file write vulnerability via the component ms/template/writeFileContent.do.

  • High 8.0

    Unrestricted file upload leading to privilege escalation in act

    act is a project which allows for local running of github actions. The artifact server that stores artifacts from Github Action runs does not sanitize path inputs. This allows an attacker to download and overwrite arbitrary files on the host from a Github Act…

  • High 8.8

    XpressEngine file upload vulnerability

    When uploading an image file to a bulletin board developed with XpressEngine, a vulnerability in which an arbitrary file can be uploaded due to insufficient verification of the file. A remote attacker can use this vulnerability to execute arbitrary code on th…

  • High 8.8

    PopojiCMS v2.0.1 backend plugin function has a file upload vulnerability.

  • High 7.5

    An unauthorized user could alter or write files with full control over the path and content of the file.

  • High 7.2

    Tiki before 24.2 allows lib/importer/tikiimporter_blog_wordpress.php PHP Object Injection by an admin because of an uns…

  • High 8.8
    CVE-2022-46610 EPSS 18%

    72crm v9 was discovered to contain an arbitrary file upload vulnerability via the avatar upload function. This vulnerab…

  • High 7.2

    In b2evolution 7.2.5, if configured with admins_can_manipulate_sensitive_files, arbitrary file upload is allowed for ad…

  • High 8.8

    HWA JIUH DIGITAL TECHNOLOGY LTD. EasyTest - Arbitrary File Upload

    The File Upload function of EasyTest has insufficient filtering for special characters and file type. A remote attacker authenticated as a general user can upload and execute arbitrary files, to manipulate system or disrupt service.

  • High 8.8
    CVE-2022-48194 Public exploit EPSS 33%

    TP-Link TL-WR902AC devices through V3 0.9.1 allow remote authenticated attackers to execute arbitrary code or cause a D…

  • High 7.2

    Some Dahua software products have a vulnerability of unrestricted upload of file. After obtaining the permissions of ad…

  • High 8.8

    An attacker who could have convinced a user to drag and drop an image to a filesystem could have manipulated the result…

  • High 8.8

    An attacker who could have convinced a user to drag and drop an image to a filesystem could have manipulated the result…

  • High 7.8

    Mozilla VPN can load an OpenSSL configuration file from an unsecured directory. A user or attacker with limited privile…

  • High 7.8

    When downloading an HTML file, if the title of the page was formatted as a filename with a malicious extension, Firefox…

  • High 7.2

    In AeroCms v0.0.1, there is an arbitrary file upload vulnerability at /admin/posts.php?source=edit_post , through which…

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

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

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

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

  • High 7.2

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