CVE-2020-28130
📋 TL;DR
This vulnerability allows attackers to upload arbitrary PHP files to the Online Library Management System, leading to remote code execution. It affects SourceCodester Online Library Management System 1.0 installations with the vulnerable upload component accessible. Attackers can gain full control of affected systems.
💻 Affected Systems
- SourceCodester Online Library Management System
📦 What is this software?
Online Library Management System by Online Library Management System Project
⚠️ Risk & Real-World Impact
Worst Case
Complete system compromise, data theft, ransomware deployment, and lateral movement within the network.
Likely Case
Web server compromise, defacement, data exfiltration, and backdoor installation.
If Mitigated
Limited impact with proper file upload validation and web server hardening.
🎯 Exploit Status
Exploit requires admin access to upload component. Public exploit code available.
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: Unknown
Vendor Advisory: Not available
Restart Required: No
Instructions:
No official patch available. Consider replacing with alternative software or implementing workarounds.
🔧 Temporary Workarounds
Restrict file upload extensions
allModify upload validation to reject .php files and other executable extensions.
Edit admin/borrower/index.php to add file extension validation
Move upload directory outside web root
allRelocate upload directory to prevent direct execution of uploaded files.
Move admin/borrower/photos directory outside web root and update file paths
🧯 If You Can't Patch
- Disable the upload image component entirely
- Implement web application firewall rules to block .php file uploads
🔍 How to Verify
Check if Vulnerable:
Attempt to upload a .php file via admin/borrower/index.php?view=add interface and check if it's saved to admin/borrower/photos/
Check Version:
Check system version in admin panel or readme files
Verify Fix Applied:
Test that .php files are rejected during upload and cannot be executed from upload directory.
📡 Detection & Monitoring
Log Indicators:
- Unusual .php file uploads in web server logs
- Access to admin/borrower/photos/*.php
Network Indicators:
- POST requests to upload endpoints with .php files
- Unexpected outbound connections from web server
SIEM Query:
source="web_server" AND (uri="/admin/borrower/index.php" AND method="POST" AND file_extension=".php")
🔗 References
- https://www.exploit-db.com/exploits/48928
- https://www.sourcecodester.com/php/14545/online-library-management-system-phpmysqli-full-source-code-2020.html
- https://www.exploit-db.com/exploits/48928
- https://www.sourcecodester.com/php/14545/online-library-management-system-phpmysqli-full-source-code-2020.html