CVE-2025-5574

7.3 HIGH

📋 TL;DR

This critical SQL injection vulnerability in PHPGurukul Dairy Farm Shop Management System 1.3 allows remote attackers to execute arbitrary SQL commands via the companyname parameter in /add-company.php. This affects all organizations using the vulnerable version of this software, potentially leading to data theft, modification, or system compromise.

💻 Affected Systems

Products:
  • PHPGurukul Dairy Farm Shop Management System
Versions: 1.3
Operating Systems: All platforms running PHP
Default Config Vulnerable: ⚠️ Yes
Notes: Affects the web application component accessible via HTTP/HTTPS

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete database compromise including data exfiltration, data manipulation, privilege escalation to administrative access, and potential remote code execution on the underlying server.

🟠

Likely Case

Unauthorized access to sensitive business data stored in the database, including customer information, financial records, and operational data.

🟢

If Mitigated

Limited impact with proper input validation, parameterized queries, and database user privilege restrictions in place.

🌐 Internet-Facing: HIGH
🏢 Internal Only: MEDIUM

🎯 Exploit Status

Public PoC: ⚠️ Yes
Weaponized: LIKELY
Unauthenticated Exploit: ⚠️ Yes
Complexity: LOW

Exploit details are publicly available on GitHub, making this easily exploitable by attackers with basic SQL injection knowledge

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Unknown

Vendor Advisory: https://phpgurukul.com/

Restart Required: No

Instructions:

No official patch available. Consider implementing input validation and parameterized queries in the source code, or replace with alternative software.

🔧 Temporary Workarounds

Web Application Firewall (WAF)

all

Deploy a WAF with SQL injection protection rules to block malicious requests

Input Validation Filter

all

Implement input validation to sanitize the companyname parameter

🧯 If You Can't Patch

  • Isolate the system from the internet and restrict access to trusted networks only
  • Implement strict database user permissions with least privilege principle

🔍 How to Verify

Check if Vulnerable:

Test the /add-company.php endpoint with SQL injection payloads in the companyname parameter

Check Version:

Check the software version in the application interface or configuration files

Verify Fix Applied:

Verify that SQL injection attempts no longer succeed and that input validation is properly implemented

📡 Detection & Monitoring

Log Indicators:

  • Unusual SQL error messages in application logs
  • Multiple failed login attempts or unusual parameter values in access logs

Network Indicators:

  • HTTP requests to /add-company.php with SQL keywords in parameters
  • Unusual database query patterns from the application server

SIEM Query:

source="web_logs" AND uri="/add-company.php" AND (param="companyname" AND value CONTAINS "' OR '1'='1" OR value CONTAINS "UNION SELECT" OR value CONTAINS "--" OR value CONTAINS ";")

🔗 References

📤 Share & Export