CVE-2021-42671
📋 TL;DR
CVE-2021-42671 is an incorrect access control vulnerability in Sourcecodester Engineers Online Portal that allows unauthenticated attackers to access all uploaded files on the web server. This affects organizations using the vulnerable PHP application, potentially exposing sensitive uploaded documents.
💻 Affected Systems
- Sourcecodester Engineers Online Portal
📦 What is this software?
Engineers Online Portal by Engineers Online Portal Project
⚠️ Risk & Real-World Impact
Worst Case
Complete exposure of all uploaded files including sensitive documents, credentials, or proprietary information leading to data breach and regulatory violations.
Likely Case
Unauthorized access to uploaded files containing user data, configuration files, or other sensitive information that could be used for further attacks.
If Mitigated
No unauthorized file access; proper authentication and authorization controls prevent exploitation.
🎯 Exploit Status
Exploitation requires direct access to the vulnerable uploads directory path. Multiple public proof-of-concept scripts exist demonstrating the vulnerability.
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: Unknown
Vendor Advisory: https://www.sourcecodester.com/php/13115/engineers-online-portal-php.html
Restart Required: No
Instructions:
No official patch available. Remove or secure the vulnerable application. If using, implement proper access controls in the uploads directory.
🔧 Temporary Workarounds
Implement .htaccess Authentication
linuxAdd authentication requirements to the uploads directory using Apache .htaccess
# Create .htaccess in nia_munoz_monitoring_system/admin/uploads/
AuthType Basic
AuthName "Restricted Access"
AuthUserFile /path/to/.htpasswd
Require valid-user
Restrict Directory Access
allMove uploads directory outside web root or implement proper access controls
# Move uploads directory outside web root
mv /var/www/html/nia_munoz_monitoring_system/admin/uploads /secure/path/
# Update application configuration to use new path
🧯 If You Can't Patch
- Implement web application firewall (WAF) rules to block access to /admin/uploads/ paths
- Monitor and restrict network access to the vulnerable application, limiting exposure to trusted networks only
🔍 How to Verify
Check if Vulnerable:
Attempt to access http://[target]/nia_munoz_monitoring_system/admin/uploads/ without authentication. If file listing or file access is possible, the system is vulnerable.
Check Version:
Check application files for version information or consult vendor documentation. No standard version command available.
Verify Fix Applied:
Attempt the same access after implementing controls; should receive authentication prompt or access denied error.
📡 Detection & Monitoring
Log Indicators:
- Multiple 200/304 HTTP responses to /admin/uploads/ paths from unauthenticated users
- Unusual file access patterns to uploads directory
Network Indicators:
- HTTP GET requests to /nia_munoz_monitoring_system/admin/uploads/ without preceding authentication requests
SIEM Query:
source="web_logs" AND (uri="/nia_munoz_monitoring_system/admin/uploads/*" OR uri CONTAINS "/admin/uploads/") AND NOT (user!="-" OR auth_success="true")
🔗 References
- https://github.com/TheHackingRabbi/CVE-2021-42671
- https://github.com/nu11secur1ty/CVE-mitre/tree/main/CVE-2021-42671
- https://www.sourcecodester.com/php/13115/engineers-online-portal-php.html
- https://github.com/TheHackingRabbi/CVE-2021-42671
- https://github.com/nu11secur1ty/CVE-mitre/tree/main/CVE-2021-42671
- https://www.sourcecodester.com/php/13115/engineers-online-portal-php.html