CVE-2024-40071

9.8 CRITICAL

📋 TL;DR

This vulnerability allows attackers to upload arbitrary PHP files to Sourcecodester Online ID Generator System 1.0, leading to remote code execution. Attackers can take full control of affected systems by uploading malicious PHP files. All installations of version 1.0 are vulnerable.

💻 Affected Systems

Products:
  • Sourcecodester Online ID Generator System
Versions: 1.0
Operating Systems: Any OS running PHP web server
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

Complete system compromise with attacker gaining full administrative access, data theft, ransomware deployment, and use as pivot point for network attacks.

🟠

Likely Case

Webshell installation leading to data exfiltration, credential harvesting, and lateral movement within the network.

🟢

If Mitigated

File upload attempts blocked at web application firewall level with no successful exploitation.

🌐 Internet-Facing: HIGH - Directly exploitable via web interface without authentication.
🏢 Internal Only: MEDIUM - Still exploitable but requires internal network access.

🎯 Exploit Status

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

Public proof-of-concept available on GitHub. Simple HTTP POST request with crafted PHP file payload.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Not available

Vendor Advisory: Not available

Restart Required: No

Instructions:

No official patch available. Consider removing the system or implementing workarounds.

🔧 Temporary Workarounds

File Upload Restriction

all

Implement strict file upload validation in id_generator/classes/SystemSettings.php

Add file extension validation and MIME type checking before accepting uploads

Web Application Firewall Rules

all

Block requests to the vulnerable endpoint or filter PHP file uploads

Configure WAF to block: POST requests to */classes/SystemSettings.php?f=update_settings with file uploads

🧯 If You Can't Patch

  • Remove or disable the vulnerable endpoint id_generator/classes/SystemSettings.php
  • Implement network segmentation to isolate the system from critical assets

🔍 How to Verify

Check if Vulnerable:

Attempt to upload a PHP file via POST to /id_generator/classes/SystemSettings.php?f=update_settings

Check Version:

Check system version in admin panel or readme files

Verify Fix Applied:

Verify file upload validation rejects PHP files and only accepts allowed image formats

📡 Detection & Monitoring

Log Indicators:

  • POST requests to SystemSettings.php with file uploads
  • Unusual file creation in upload directories
  • .php files in image upload directories

Network Indicators:

  • HTTP POST to vulnerable endpoint with multipart/form-data
  • Unexpected outbound connections from web server

SIEM Query:

web.url:*SystemSettings.php* AND http.method:POST AND http.content_type:multipart/form-data

🔗 References

📤 Share & Export