Goal Reached Thanks to every supporter — we hit 100%!

Goal: 1000 CNY · Raised: 1000 CNY

100.0%

CWE-434 (危险类型文件的不加限制上传) — Vulnerability Class 2034

2034 vulnerabilities classified as CWE-434 (危险类型文件的不加限制上传). AI Chinese analysis included.

CWE-434 represents a critical input validation weakness where applications permit the upload of file types that are inherently dangerous or automatically processed by the system. Attackers typically exploit this vulnerability by uploading malicious scripts, such as web shells or executable binaries, disguised as legitimate documents or images. Once uploaded, these files are executed by the server, granting the attacker remote code execution capabilities and potentially full system compromise. To mitigate this risk, developers must implement strict allowlists that define only the specific, safe file extensions permitted for upload. Additionally, files should be stored outside the web root directory to prevent direct execution, and content verification techniques, such as checking file headers rather than relying solely on extensions, should be employed to ensure integrity and prevent evasion of basic validation checks.

MITRE CWE Description
The product allows the upload or transfer of dangerous file types that are automatically processed within its environment.
Common Consequences (1)
Integrity, Confidentiality, AvailabilityExecute Unauthorized Code or Commands
Arbitrary code execution is possible if an uploaded file is interpreted and executed as code by the recipient. This is especially true for web-server extensions such as .asp and .php because these file types are often treated as automatically executable, even when file system permissions do not spec…
Mitigations (5)
Architecture and DesignGenerate 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 DesignWhen 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 DesignConsider storing the uploaded files outside of the web document root entirely. Then, use other mechanisms to deliver the files dynamically. [REF-423]
ImplementationAssume 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…
Architecture and DesignDefine 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.
Examples (2)
The following code intends to allow a user to upload a picture to the web server. The HTML code that drives the form on the user end has an input field of type "file".
<form action="upload_picture.php" method="post" enctype="multipart/form-data"> Choose a file to upload: <input type="file" name="filename"/> <br/> <input type="submit" name="submit" value="Submit"/> </form>
Good · HTML
// Define the target location where the picture being // uploaded is going to be saved. $target = "pictures/" . basename($_FILES['uploadedfile']['name']); // Move the uploaded file to the new location. if(move_uploaded_file($_FILES['uploadedfile']['tmp_name'], $target)) { echo "The picture has been successfully uploaded."; } else { echo "There was an error uploading the picture, please try again."; }
Bad · PHP
The following code demonstrates the unrestricted upload of a file with a Java servlet and a path traversal vulnerability. The action attribute of an HTML form is sending the upload file request to the Java servlet.
<form action="FileUploadServlet" method="post" enctype="multipart/form-data"> Choose a file to upload: <input type="file" name="filename"/> <br/> <input type="submit" name="submit" value="Submit"/> </form>
Good · HTML
public class FileUploadServlet extends HttpServlet { ... protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { response.setContentType("text/html"); PrintWriter out = response.getWriter(); String contentType = request.getContentType(); // the starting position of the boundary header int ind = contentType.indexOf("boundary="); String boundary = contentType.substring(ind+9); String pLine = new String(); String uploadLocation = new String(UPLOAD_DIRECTORY_STRING); //Constant value // verify that content type is multipart form data i
Bad · Java
CVE IDTitleCVSSSeverityPublished
CVE-2023-25921 IBM Security Guardium Key Lifecycle Manager file upload — Security Guardium Key Lifecycle Manager 8.5 High2024-02-29
CVE-2023-25922 IBM Security Guardium Key Lifecycle Manager file upload — Security Guardium Key Lifecycle Manager 4.3 Medium2024-02-28
CVE-2024-1932 Unrestricted Upload of File with Dangerous Type in freescout-helpdesk/freescout — freescout-helpdesk/freescout 8.8 -2024-02-28
CVE-2024-1925 Ctcms Upsys.php unrestricted upload — Ctcms 5.0 Medium2024-02-27
CVE-2024-1921 osuuu LightPicture Setup.php unrestricted upload — LightPicture 4.7 Medium2024-02-27
CVE-2024-1918 Byzoro Smart S42 Management Platform userattestation.php unrestricted upload — Smart S42 Management Platform 4.7 Medium2024-02-27
CVE-2024-24714 WordPress Icons Font Loader Plugin <= 1.1.4 is vulnerable to Arbitrary File Upload — Icons Font Loader 7.2 High2024-02-26
CVE-2024-25909 WordPress WP Media folder Plugin <= 5.7.2 is vulnerable to Arbitrary File Upload — WP Media folder 9.9 Critical2024-02-26
CVE-2024-25913 WordPress MoveTo Plugin <= 6.2 is vulnerable to Arbitrary File Upload — MoveTo 10.0 Critical2024-02-26
CVE-2024-25925 WordPress WooCommerce Easy Checkout Field Editor, Fees & Discounts Plugin <= 3.5.12 is vulnerable to Arbitrary File Upload — WooCommerce Easy Checkout Field Editor, Fees & Discounts 10.0 Critical2024-02-26
CVE-2024-1875 SourceCodester Complaint Management System Lodge Complaint Section register-complaint.php unrestricted upload — Complaint Management System 6.3 Medium2024-02-25
CVE-2024-1819 CodeAstro Membership Management System Add Members Tab unrestricted upload — Membership Management System 4.7 Medium2024-02-23
CVE-2024-1818 CodeAstro Membership Management System Logo unrestricted upload — Membership Management System 4.7 Medium2024-02-23
CVE-2024-22393 Apache Answer: Pixel Flood Attack by uploading the large pixel file — Apache Answer 6.5 -2024-02-22
CVE-2024-1644 Suite CRM v7.14.2 - RCE via Local File Inclusion — Suite CRM 9.9 Critical2024-02-19
CVE-2024-25636 Lack of media type verification of Activity Streams objects allows impersonation and takeover of remote accounts — misskey 7.1 High2024-02-19
CVE-2024-25623 Lack of media type verification of Activity Streams objects allows impersonation of remote accounts — mastodon 8.5 High2024-02-19
CVE-2022-42443 Trusteer for mobile file upload — Trusteer iOS SDK 2.2 Low2024-02-17
CVE-2024-22426 Dell RecoverPoint for Virtual Machines 代码问题漏洞 — RecoverPoint for VMs 7.2 High2024-02-16
CVE-2024-23811 Siemens SINEC NMS 代码问题漏洞 — SINEC NMS 8.8 High2024-02-13
CVE-2023-50386 Apache Solr: Backup/Restore APIs allow for deployment of executables in malicious ConfigSets — Apache Solr 9.8 -2024-02-09
CVE-2024-1268 CodeAstro Restaurant POS System update_product.php unrestricted upload — Restaurant POS System 6.3 Medium2024-02-07
CVE-2024-1264 Juanpao JPShop UploadsController.php actionUpdate unrestricted upload — JPShop 6.3 Medium2024-02-06
CVE-2024-1263 Juanpao JPShop API PosterController.php actionUpdate unrestricted upload — JPShop 6.3 Medium2024-02-06
CVE-2024-1262 Juanpao JPShop API MaterialController.php actionUpdate unrestricted upload — JPShop 6.3 Medium2024-02-06
CVE-2024-1261 Juanpao JPShop API ComboController.php actionIndex unrestricted upload — JPShop 6.3 Medium2024-02-06
CVE-2024-1260 Juanpao JPShop API ComboController.php actionIndex unrestricted upload — JPShop 6.3 Medium2024-02-06
CVE-2024-1259 Juanpao JPShop API AppController.php unrestricted upload — JPShop 6.3 Medium2024-02-06
CVE-2024-1253 Byzoro Smart S40 Management Platform Import web.php unrestricted upload — Smart S40 Management Platform 4.7 Medium2024-02-06
CVE-2023-6925 Unlimited Addons for WPBakery Page Builder <= 1.0.42 - Authenticated (Editor+) Arbitrary File Upload — Unlimited Addons for WPBakery Page Builder 7.2 High2024-02-05

Vulnerabilities classified as CWE-434 (危险类型文件的不加限制上传) represent 2034 CVEs. The CWE taxonomy describes the weakness; review individual CVEs for product-specific impact.