CVE-2021-41675

7.2 HIGH

📋 TL;DR

This vulnerability allows authenticated attackers to execute arbitrary code on Sourcecodester E-Negosyo System 1.0 servers. Attackers can upload malicious files disguised as images to achieve remote code execution. Only systems running the vulnerable E-Negosyo System are affected.

💻 Affected Systems

Products:
  • Sourcecodester E-Negosyo System
Versions: 1.0
Operating Systems: Any OS running PHP web server
Default Config Vulnerable: ⚠️ Yes
Notes: Requires authenticated access to the admin panel. The vulnerability is in the product upload functionality.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete system compromise allowing attackers to execute arbitrary commands, steal data, install malware, or pivot to other systems.

🟠

Likely Case

Unauthorized access to sensitive business data, defacement of the application, or deployment of ransomware/cryptominers.

🟢

If Mitigated

Limited impact with proper file upload restrictions and network segmentation in place.

🌐 Internet-Facing: HIGH - Web applications exposed to the internet are directly accessible to attackers.
🏢 Internal Only: MEDIUM - Internal attackers or compromised accounts could exploit this vulnerability.

🎯 Exploit Status

Public PoC: ⚠️ Yes
Weaponized: CONFIRMED
Unauthenticated Exploit: ✅ No
Complexity: LOW

Multiple public exploit scripts exist. Attack requires admin credentials or compromised admin account.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Not available

Vendor Advisory: Not available

Restart Required: No

Instructions:

No official patch available. Consider replacing with alternative software or implementing strict workarounds.

🔧 Temporary Workarounds

Restrict file uploads

all

Implement strict file type validation and disable PHP execution in upload directories

# Add to .htaccess in upload directory:
<FilesMatch "\.(php|php5|php7|phtml|phar)$">
    Order Allow,Deny
    Deny from all
</FilesMatch>
# Restrict file extensions in PHP:
$allowed_extensions = ['jpg', 'jpeg', 'png', 'gif'];

Disable vulnerable endpoint

all

Temporarily disable or restrict access to /admin/produts/controller.php

# Apache:
<Location "/admin/produts/controller.php">
    Order deny,allow
    Deny from all
</Location>
# Nginx:
location = /admin/produts/controller.php {
    deny all;
    return 403;
}

🧯 If You Can't Patch

  • Implement web application firewall (WAF) rules to block malicious file uploads
  • Restrict admin panel access to specific IP addresses only

🔍 How to Verify

Check if Vulnerable:

Check if /admin/produts/controller.php exists and contains the doInsert function with getimagesize() validation. Review file upload functionality.

Check Version:

Check application files for version information, typically in README or configuration files

Verify Fix Applied:

Test file upload with PHP extensions to ensure they are blocked. Verify .htaccess or nginx rules are properly applied.

📡 Detection & Monitoring

Log Indicators:

  • Unusual file uploads to /admin/produts/controller.php
  • PHP file uploads with image extensions
  • Multiple failed login attempts to admin panel

Network Indicators:

  • POST requests to /admin/produts/controller.php with file uploads
  • Unexpected outbound connections from web server

SIEM Query:

source="web_logs" AND (uri="/admin/produts/controller.php" OR file_upload="*.php")

🔗 References

📤 Share & Export