CWE-434: Unrestricted Upload of File with Dangerous Type
4317 CVEs have CWE-434 as their primary weakness. 26 of them are in the CISA KEV catalog. The highest EPSS score among them is 99.968%.
The product allows the upload or transfer of dangerous file types that are automatically processed within its environment.
Child of CWE-669: Incorrect Resource Transfer Between Spheres
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,…
- 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.
- Implementation: Do not rely exclusively on sanity checks of file contents to ensure that the file is of the expected type and size. It may be possible for an attacker to hide code in some file segments that will still be executed by the server. For example, GIF images may contain a free-form comments field.
- Implementation: Do not rely exclusively on the MIME content type or filename attribute when determining how to render a file. Validating the MIME content type and ensuring that it matches the extension is only a partial solution.
- Architecture and Design Operation: Run your code using the lowest privileges that are required to accomplish the necessary tasks [REF-76]. If possible, create isolated accounts with limited privileges that are only used for a single task. That way, a successful attack will not immediately give the attacker access to the rest of the software or its environment. For example, database applications rarely need to run as the database administrator, especially in day-to-day operations.
- Architecture and Design Operation: Run the code in a jail or similar sandbox environment that enforces strict boundaries between the process and the operating system. This may effectively restrict which files can be accessed in a particular directory or which commands can be executed by the software. OS-level examples include the Unix chroot jail, AppArmor, and SELinux. In general, managed code may provide some protection. For example, java.io.FilePermission in the Java SecurityManager allows the software to specify restrictions on file operations. This may not be a feasible solution, and it only limits the impact to the operating system; the rest of the application may still be subject to compromise. Be careful to avoid CWE-243 and other weaknesses related to jails.
Observed examples
- CVE-2023-5227: PHP-based FAQ management app does not check the MIME type for uploaded images
- CVE-2001-0901: Web-based mail product stores .shtml attachments that could contain SSI
- CVE-2002-1841: PHP upload does not restrict file types
- CVE-2005-1868: upload and execution of .php file
- CVE-2005-1881: upload file with dangerous extension
- CVE-2005-0254: program does not restrict file types
- CVE-2004-2262: improper type checking of uploaded files
- CVE-2006-4558: Double php extension leaves an active php extension in the generated filename.
- CVE-2006-6994: Chain: ASP program allows upload of .asp files (CWE-434) by bypassing client-side checks (CWE-601.
- CVE-2005-3288: ASP file upload
- CVE-2006-2428: ASP file upload
Top released CVEs
KEV first, then the highest EPSS score, the highest CVSS score and the newest.
| CVE | Published | Severity | CVSS | EPSS | Description |
|---|---|---|---|---|---|
| CVE-2017-12617 | 2017-10-03 | HIGH | 8.1 | 99.968% | When running Apache Tomcat versions 9.0.0.M1 to 9.0.0, 8.5.0 to 8.5.22, 8.0.0.RC1 to 8.0.46 and 7.0.0 to 7.0.81 with HTTP PUTs enabled (e.g. via setting the… |
| CVE-2018-15961 | 2018-09-25 | CRITICAL | 9.8 | 99.950% | Adobe ColdFusion versions July 12 release (2018.0.0.310739), Update 6 and earlier, and Update 14 and earlier have an unrestricted file upload vulnerability.… |
| CVE-2021-31207 | 2021-05-11 | MEDIUM | 6.6 | 99.782% | Microsoft Exchange Server Security Feature Bypass Vulnerability |
| CVE-2017-12615 | 2017-09-19 | HIGH | 8.1 | 99.707% | When running Apache Tomcat 7.0.0 to 7.0.79 on Windows with HTTP PUTs enabled (e.g. via setting the readonly initialisation parameter of the Default to false)… |
| CVE-2025-31324 | 2025-04-24 | CRITICAL | 10.0 | 99.486% | SAP NetWeaver Visual Composer Metadata Uploader is not protected with a proper authorization, allowing unauthenticated agent to upload potentially malicious… |
| CVE-2024-50623 | 2024-10-27 | CRITICAL | 9.8 | 98.607% | In Cleo Harmony before 5.8.0.21, VLTrader before 5.8.0.21, and LexiCom before 5.8.0.21, there is an unrestricted file upload and download that could lead to… |
| CVE-2016-3088 | 2016-06-01 | CRITICAL | 9.8 | 98.365% | The Fileserver web application in Apache ActiveMQ 5.x before 5.14.0 allows remote attackers to upload and execute arbitrary files via an HTTP PUT followed by… |
| CVE-2020-25213 | 2020-09-09 | CRITICAL | 10.0 | 97.328% | The File Manager (wp-file-manager) plugin before 6.9 for WordPress allows remote attackers to upload and execute arbitrary PHP code because it renames an… |
| CVE-2020-8260 | 2020-10-28 | HIGH | 7.2 | 96.480% | A vulnerability in the Pulse Connect Secure < 9.1R9 admin web interface could allow an authenticated attacker to perform an arbitrary code execution using… |
| CVE-2026-48908 | 2026-06-20 | CRITICAL | 9.8 | 88.412% | A vulnerability in SP Page Builder for Joomla allows unauthenticated users to upload arbitrary files, ultimately resulting in the upload and execution of PHP… |
| CVE-2025-52691 | 2025-12-29 | CRITICAL | 10.0 | 85.655% | Successful exploitation of the vulnerability could allow an unauthenticated attacker to upload arbitrary files to any location on the mail server, potentially… |
| CVE-2017-11357 | 2017-08-23 | CRITICAL | 9.8 | 77.679% | Progress Telerik UI for ASP.NET AJAX before R2 2017 SP2 does not properly restrict user input to RadAsyncUpload, which allows remote attackers to perform… |
| CVE-2019-8394 | 2019-02-17 | MEDIUM | 6.5 | 63.336% | Zoho ManageEngine ServiceDesk Plus (SDP) before 10.0 build 10012 allows remote attackers to upload arbitrary files via login page customization. |
| CVE-2026-48356 | 2026-07-14 | CRITICAL | 9.3 | 47.472% | Adobe Commerce is affected by an Unrestricted Upload of File with Dangerous Type vulnerability that could result in arbitrary code execution in the context of… |
| CVE-2021-27860 | 2021-12-08 | CRITICAL | 9.8 | 39.680% | 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… |
| CVE-2021-26828 | 2021-06-11 | HIGH | 8.8 | 39.096% | OpenPLC ScadaBR through 0.9.1 on Linux and through 1.12.4 on Windows allows remote authenticated users to upload and execute arbitrary JSP files via… |
| CVE-2020-13671 | 2020-11-20 | HIGH | 8.8 | 32.568% | Drupal core does not properly sanitize certain filenames on uploaded files, which can lead to files being interpreted as the incorrect extension and served as… |
| CVE-2024-57968 | 2025-02-03 | CRITICAL | 9.9 | 32.100% | Advantive VeraCore before 2024.4.2.1 allows remote authenticated users to upload files to unintended folders (e.g., ones that are accessible during web… |
| CVE-2026-56290 | 2026-06-29 | CRITICAL | 9.8 | 30.866% | Joomla Extension - joomlack.fr - Unauthenticated file upload in Page Builder CK extension < 3.6.0 - The Joomla extension Page Builder CK is vulnerable to an… |
| CVE-2018-4063 | 2019-05-06 | HIGH | 8.8 | 27.260% | An exploitable remote code execution vulnerability exists in the upload.cgi functionality of Sierra Wireless AirLink ES450 FW 4.9.3. A specially crafted HTTP… |
Get more CVE data from the API.
curl 'https://api.contrastcyber.com/cwe_lookup/CWE-434'curl 'https://api.contrastcyber.com/cve_search?cwe_id=CWE-434'
Sources
- Vulnerability data from the National Vulnerability Database (NIST) and the CVE Program. CVE records: Copyright © 1999-2026, The MITRE Corporation, used under the CVE Program Terms of Use. CVE® is a registered trademark of The MITRE Corporation.
- CWE definitions: Copyright © 2006-2026, The MITRE Corporation, used under the CWE Terms of Use. CWE is a trademark of The MITRE Corporation.
- EPSS scores by FIRST.org EPSS, used with attribution.
- KEV catalog and SSVC decisions by CISA.
- Advisory data from the GitHub Advisory Database through OSV.dev (CC BY 4.0).
- Exploit metadata from the Exploit Database (GPL-2.0-only, metadata only).
- Nuclei template names from nuclei-templates (MIT).