SourceCodester Farm Management System SQL Injection Vulnerability in uploadProduct.php

Vulnerability

A SQL injection vulnerability has been identified in SourceCodester Farm Management System version 1.0, specifically within the uploadProduct.php file. The issue arises from inadequate validation of user input in the 'type' parameter, allowing attackers to inject malicious SQL queries. This vulnerability can be exploited remotely, potentially leading to unauthorized access to the database, data manipulation, and disruption of service.

Impact

Exploitation of this vulnerability allows for SQL injection, enabling attackers to interfere with database queries. This could result in unauthorized data access, data modification or deletion, and in some cases, executing administrative operations on the database.

Reproduction

To reproduce this vulnerability, send a POST request to uploadProduct.php with the 'type' parameter manipulated to include a crafted SQL payload. The injection can be verified by using a payload that, for example, attempts to extract database information or introduces a time-based delay, indicating successful exploitation.

Remediation

It is recommended to use prepared statements and parameter binding to prevent SQL injection. Additionally, input validation and filtering should be implemented to ensure user input conforms to expected formats. Minimizing database user permissions and conducting regular security audits can further enhance security.

Added: Oct 8, 2025, 6:24 PM
Updated: Oct 8, 2025, 8:30 PM

Vulnerability Rating

Custom Algorithm
spread
0.0
impact
7.5
exploitability
8.7
remediation
0.0
relevance
0.7
threat
6.4
urgency
2.9
incentive
5.8

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