Weakness (CWE)
CWE-434: Unrestricted Upload of File with Dangerous Type
The product allows the upload or transfer of dangerous file types that are automatically processed within its environment.
How to prevent it (8 mitigations)
-
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]
-
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.
-
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]
-
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.
-
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.
-
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]
-
Implementation
When running on a web server that supports case-insensitive filenames, perform case-insensitive evaluations of the extensions that are provided.
-
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
Raffle Draw System v1.0 was discovered to contain a local file inclusion vulnerability via the page parameter in index.…
-
Critical 9.8
Monnai aaPanel host system v1.5 contains an access control issue which allows attackers to escalate privileges and exec…
-
Critical 9.1CVE-2023-0587 EPSS 60%
A file upload vulnerability in exists in Trend Micro Apex One server build 11110. Using a malformed Content-Length head…
-
Critical 9.8
A CWE-434: Unrestricted Upload of File with Dangerous Type vulnerability exists that could cause remote code execution …
-
Critical 9.8
An arbitrary file write vulnerability in Serenissima Informatica Fast Checkin v1.0 allows unauthenticated attackers to …
-
Critical 9.8
i-librarian 4.10 is vulnerable to Arbitrary file upload in ajaxsupplement.php.
-
Critical 9.8
An arbitrary file upload vulnerability in taocms v3.0.2 allows attackers to execute arbitrary code via a crafted PHP fi…
-
Critical 9.8
An arbitrary file upload vulnerability in the plugin manager of LimeSurvey v5.4.15 allows attackers to execute arbitrar…
-
Critical 9.8
An issue discovered in Rawchen blog-ssm v1.0 allows remote attacker to escalate privileges and execute arbitrary comman…
-
Critical 9.8
Unrestricted file upload leads to Remote Code Execution in erohtar/Dasherr
erohtar/Dasherr is a dashboard for self-hosted services. In affected versions unrestricted file upload allows any unauthenticated user to execute arbitrary code on the server. The file /www/include/filesave.php allows for any file to uploaded to anywhere. If …
-
Critical 9.8
Planet eStream before 6.72.10.07 allows unauthenticated upload of arbitrary files: Choose a Video / Related Media or Up…
-
Critical 9.8
Default version of nbnbk was discovered to contain an arbitrary file upload vulnerability via the component /api/User/d…
-
Critical 9.8
AyaCMS 3.1.2 is vulnerable to Arbitrary file upload via /aya/module/admin/fst_down.inc.php
-
Critical 9.8
here is an arbitrary file upload vulnerability in the file management function module of Classcms3.5.
-
Critical 9.8
WBCE CMS v1.5.4 can implement getshell by modifying the upload file type.
-
Critical 9.9
SAP Business Objects Platform - versions 420, and 430, allows an attacker with normal BI user privileges to upload/repl…
-
Critical 9.8CVE-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.
-
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.
-
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…
-
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.8CVE-2020-23591 Public exploit
A vulnerability in OPTILINK OP-XT71000N Hardware Version: V2.2 , Firmware Version: OP_V3.3.1-191028 allows an 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.
-
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…
-
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…
-
Critical 9.8
The d8s-xml for python, as distributed on PyPI, included a potential code-execution backdoor inserted by a third party.…
-
Critical 9.8
The d8s-urls for python, as distributed on PyPI, included a potential code-execution backdoor inserted by a third party…
-
Critical 9.8
The d8s-stats for python, as distributed on PyPI, included a potential code-execution backdoor inserted by a third part…
-
Critical 9.8
The d8s-dates for python, as distributed on PyPI, included a potential code-execution backdoor inserted by a third part…
-
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
The d8s-networking for python, as distributed on PyPI, included a potential code-execution backdoor inserted by a third…
-
Critical 9.8
The d8s-networking for python, as distributed on PyPI, included a potential code-execution backdoor inserted by a third…
-
Critical 9.8
The d8s-timer for python, as distributed on PyPI, included a potential code-execution backdoor inserted by a third part…
-
Critical 9.8
The d8s-python for python, as distributed on PyPI, included a potential code-execution backdoor inserted by a third par…