Code-Projects Simple Photo Gallery Unrestricted File Upload Vulnerability

Vulnerability

A critical arbitrary file upload vulnerability exists in Code-Projects Simple Photo Gallery version 1.0, specifically within the '/upload-photo.php' file. This vulnerability allows unauthenticated users to upload malicious scripts disguised as images, due to inadequate input validation. The uploaded files are stored in a publicly accessible directory, where they can be executed by the web server, potentially leading to a complete server compromise.

Impact

Exploitation of this vulnerability allows for the upload and execution of arbitrary PHP code on the server, with the potential for remote code execution, full system compromise, data leakage, unauthorized data modification, and disruption of service.

Reproduction

To reproduce this vulnerability, send a POST request to '/upload-photo.php' with the 'file_img' parameter containing a PHP script disguised as an image file. Include an 'img_title' to bypass any additional validation. Once uploaded, the malicious file can be accessed through the '/img/' directory.

Added: Jun 29, 2025, 4:22 AM
Updated: Jun 29, 2025, 4:22 AM

Vulnerability Rating

Custom Algorithm
spread
1.0
impact
10.0
exploitability
9.7
remediation
0.0
relevance
0.2
threat
6.4
urgency
2.9
incentive
10.0

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