What is CWE-434: Unrestricted Upload of File with Dangerous Type?+
CWE-434: Unrestricted Upload of File with Dangerous Type is a Common Weakness Enumeration (CWE) entry maintained by MITRE. The product allows the upload or transfer of dangerous file types that are automatically processed within its environment.
Is CWE-434 in the CWE Top 25 Most Dangerous Software Weaknesses?+
Yes. CWE-434 ranked #6 in the CWE Top 25 for 2024, associated with 322 CVEs that year. The CWE Top 25 highlights the most common and impactful software weaknesses based on real-world vulnerability data.
What are the security consequences of Unrestricted Upload of File with Dangerous Type?+
If exploited, CWE-434 (Unrestricted Upload of File with Dangerous Type) it can compromise Integrity, Confidentiality and Availability, leading to outcomes such as Execute Unauthorized Code or Commands.
How do you prevent or mitigate Unrestricted Upload of File with Dangerous Type?+
Recommended mitigations for CWE-434 include: 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] Consider storing the uploaded files outside of the web document root entirely. Then, use other mechanisms to deliver the files dynamically. [REF-423] 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.
How is Unrestricted Upload of File with Dangerous Type detected?+
CWE-434 can be detected using Dynamic Analysis with Automated Results Interpretation, Dynamic Analysis with Manual Results Interpretation, Manual Static Analysis - Source Code, Automated Static Analysis - Source Code and Architecture or Design Review. Combining automated tooling with manual review typically yields the best coverage.
Which programming languages are affected by Unrestricted Upload of File with Dangerous Type?+
CWE-434 commonly affects ASP.NET, PHP and Not Language-Specific. Note that weaknesses are often language-agnostic patterns, so secure coding practices apply broadly.
What are real-world examples of Unrestricted Upload of File with Dangerous Type?+
MITRE documents real CVEs mapped to CWE-434, including CVE-2023-5227, CVE-2001-0901, CVE-2002-1841, CVE-2005-1868 and CVE-2005-1881. You can look up the full details of each CVE, including CVSS scores and remediation guidance, on our CVE Lookup tool.
What is the difference between a CWE and a CVE?+
A CWE (Common Weakness Enumeration) like CWE-434 describes a category of software weakness — the underlying flaw type. A CVE (Common Vulnerabilities and Exposures) identifies a specific, real-world vulnerability in a particular product. In short, a CWE is the kind of mistake, and a CVE is an instance of that mistake being found in software.