CVE-2025-3783

6.3 MEDIUM

📋 TL;DR

This critical vulnerability in SourceCodester Web-based Pharmacy Product Management System 1.0 allows remote attackers to upload arbitrary files via the Avatar parameter in /add-product.php. This can lead to complete system compromise through web shell deployment. All installations of version 1.0 are affected.

💻 Affected Systems

Products:
  • SourceCodester Web-based Pharmacy Product Management System
Versions: 1.0
Operating Systems: All platforms running PHP web servers
Default Config Vulnerable: ⚠️ Yes
Notes: All default installations are vulnerable. No special configuration required for exploitation.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Full system compromise via web shell leading to data theft, ransomware deployment, or complete system takeover

🟠

Likely Case

Web shell installation enabling backdoor access, data exfiltration, and lateral movement within the network

🟢

If Mitigated

Limited impact if file uploads are restricted to authenticated users with proper file type validation

🌐 Internet-Facing: HIGH - Remote exploitation without authentication makes internet-facing systems immediate targets
🏢 Internal Only: MEDIUM - Internal attackers or compromised internal systems could exploit this vulnerability

🎯 Exploit Status

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

Public exploit available on GitHub. Simple file upload bypass technique documented.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Unknown

Vendor Advisory: https://www.sourcecodester.com/

Restart Required: No

Instructions:

No official patch available. Check vendor website for updates. Consider implementing workarounds or replacing the software.

🔧 Temporary Workarounds

File Upload Restriction

all

Implement strict file type validation and whitelist allowed extensions for uploads

Modify /add-product.php to validate file extensions and MIME types before saving

Authentication Requirement

all

Require authentication before allowing file uploads

Add session validation at the beginning of /add-product.php

🧯 If You Can't Patch

  • Block access to /add-product.php via web application firewall or .htaccess
  • Implement network segmentation to isolate the vulnerable system from critical assets

🔍 How to Verify

Check if Vulnerable:

Attempt to upload a file with .php extension via /add-product.php Avatar parameter. If successful, system is vulnerable.

Check Version:

Check system version in admin panel or footer. Look for 'Web-based Pharmacy Product Management System 1.0'

Verify Fix Applied:

Test file upload with restricted extensions. PHP files should be rejected with proper error messages.

📡 Detection & Monitoring

Log Indicators:

  • Multiple failed upload attempts with unusual file extensions
  • Successful upload of .php, .phtml, or other executable files
  • Access to /add-product.php from unusual IP addresses

Network Indicators:

  • POST requests to /add-product.php with file uploads
  • Subsequent requests to uploaded files with suspicious parameters

SIEM Query:

source="web_logs" AND (uri="/add-product.php" AND method="POST") AND (file_extension="php" OR file_extension="phtml" OR file_extension="jsp")

🔗 References

📤 Share & Export