CVE-2020-24195

9.1 CRITICAL

📋 TL;DR

This vulnerability allows authenticated administrators in Online Bike Rental v1.0 to upload arbitrary files, including malicious scripts, leading to remote code execution. Attackers who compromise admin credentials can take full control of affected systems. Only systems running this specific software version are affected.

💻 Affected Systems

Products:
  • Sourcecodester Online Bike Rental
Versions: 1.0
Operating Systems: Any OS running PHP
Default Config Vulnerable: ⚠️ Yes
Notes: Requires authenticated administrator access to exploit. PHP-based web application with MySQL database.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Full system compromise with attacker gaining complete control over the web server, potentially leading to data theft, ransomware deployment, or use as a pivot point for internal network attacks.

🟠

Likely Case

Attackers upload web shells to execute arbitrary commands, steal sensitive data, deface websites, or install backdoors for persistent access.

🟢

If Mitigated

With proper file upload validation and admin credential protection, exploitation risk is significantly reduced, though the vulnerability remains present.

🌐 Internet-Facing: HIGH
🏢 Internal Only: MEDIUM

🎯 Exploit Status

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

Exploit code is publicly available on Packet Storm. Requires admin credentials but upload process is straightforward.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Not available

Vendor Advisory: Not available

Restart Required: No

Instructions:

No official patch exists. Consider replacing with alternative software or implementing custom security fixes.

🔧 Temporary Workarounds

Implement File Upload Validation

all

Add server-side validation to restrict uploaded files to specific extensions (jpg, png, gif) and verify file content types.

Restrict Upload Directory Permissions

linux

Set upload directory permissions to prevent execution of uploaded files and store them outside web root.

chmod 644 /path/to/upload/directory/*
chown www-data:www-data /path/to/upload/directory

🧯 If You Can't Patch

  • Implement web application firewall (WAF) rules to block file uploads with dangerous extensions (.php, .phtml, .exe)
  • Strengthen admin authentication with multi-factor authentication and strong password policies

🔍 How to Verify

Check if Vulnerable:

Check if you're running Online Bike Rental v1.0 by examining the software version in admin panel or source code.

Check Version:

Check admin panel or look for version information in source files like config.php or readme files.

Verify Fix Applied:

Test file upload functionality with non-image files - if rejected, fix may be working. Attempt to upload a PHP file to verify.

📡 Detection & Monitoring

Log Indicators:

  • Unusual file uploads with non-image extensions
  • Multiple failed login attempts to admin panel
  • Execution of unexpected PHP files in upload directory

Network Indicators:

  • POST requests to upload endpoints with suspicious file types
  • Traffic to unexpected URLs in upload directories

SIEM Query:

source="web_server" AND (uri="/admin/upload*" OR uri="*/upload*") AND (file_extension="php" OR file_extension="phtml" OR file_extension="exe")

🔗 References

📤 Share & Export