Code-Projects Shopping Portal Arbitrary File Upload Vulnerability in insert-product.php

Vulnerability

A vulnerability allowing arbitrary file uploads has been identified in the Code-Projects Shopping Portal version 1.0, specifically on the insert-product.php page. This issue arises because the application does not properly validate or restrict the types of files that can be uploaded. As a result, attackers can upload malicious files, such as PHP scripts, which could be executed to gain unauthorized access to the server.

Impact

Exploitation of this vulnerability could lead to the upload and execution of malicious files, such as Trojans, allowing attackers to gain control over the server and its resources.

Reproduction

To reproduce this vulnerability, log into the admin panel of the shopping portal. Navigate to the 'Insert Product' section. Use the file upload feature to upload a file. The system does not properly validate the file type, allowing for the upload of executable PHP files. Once uploaded, these files can be executed on the server, potentially leading to a compromise.

Remediation

To address this vulnerability, implement file type restrictions by allowing only necessary file extensions. Verify the actual file type using Content Disarmament and Reconstruction (CDR) technology, rather than relying solely on file extensions or 'magic numbers'. Avoid passing user-supplied filenames directly to the filesystem API, and store uploaded files securely, preferably outside the web root.

Added: Jun 9, 2025, 7:46 PM
Updated: Jun 9, 2025, 7:46 PM

Vulnerability Rating

Custom Algorithm
spread
0.0
impact
10.0
exploitability
4.2
remediation
0.0
relevance
0.0
threat
6.4
urgency
2.9
incentive
1.7

Our algorithm analyzes dozens of metrics to generate these 8 key vulnerability categories, which are then combined to calculate the overall risk score.