PHPGurukul Dairy Farm Shop Management System SQL Injection Vulnerability in edit-company.php

Vulnerability

A critical SQL injection vulnerability has been identified in PHPGurukul Dairy Farm Shop Management System version 1.3. The issue resides in the edit-company.php file, where the companyname parameter is manipulated to inject malicious SQL code. This unsanitized input is directly used in SQL queries, allowing attackers to alter database queries and execute unauthorized actions. The vulnerability can be exploited remotely, with public knowledge of the exploit available.

Impact

Exploitation of this vulnerability allows attackers to access and manipulate the database, potentially leading to unauthorized data access, data modification or deletion, and disruption of services.

Reproduction

The vulnerability can be reproduced by sending a POST request to the edit-company.php file with a crafted companyname parameter that includes malicious SQL payloads. This can be done using tools like sqlmap, which automates the process of finding and exploiting SQL injection vulnerabilities.

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 that user input meets expected formats, blocking malicious data. Finally, database user permissions should be minimized, granting only necessary privileges to the database account used by the application.

Added: Jul 14, 2025, 9:19 AM
Updated: Jul 14, 2025, 9:19 AM

Vulnerability Rating

Custom Algorithm
spread
0.8
impact
5.0
exploitability
6.2
remediation
0.0
relevance
0.2
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.