CVE-2024-7117

6.3 MEDIUM

📋 TL;DR

This critical SQL injection vulnerability in MD-MAFUJUL-HASAN Online-Payroll-Management-System allows remote attackers to execute arbitrary SQL commands via the 'id' parameter in /shift_viewmore.php. All users running versions up to September 11, 2023 are affected. Attackers can potentially access, modify, or delete sensitive payroll data.

💻 Affected Systems

Products:
  • MD-MAFUJUL-HASAN Online-Payroll-Management-System
Versions: All versions up to 20230911
Operating Systems: Any OS running PHP web server
Default Config Vulnerable: ⚠️ Yes
Notes: Product uses rolling releases with no specific version details. All deployments using the vulnerable /shift_viewmore.php file are affected.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete database compromise leading to theft of all payroll data, financial information, employee PII, and potential system takeover via SQL injection to RCE escalation.

🟠

Likely Case

Data exfiltration of sensitive payroll information, employee records, and potential privilege escalation within the application.

🟢

If Mitigated

Limited impact with proper input validation, parameterized queries, and WAF protection blocking malicious SQL payloads.

🌐 Internet-Facing: HIGH
🏢 Internal Only: MEDIUM

🎯 Exploit Status

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

Exploit code is publicly available on GitHub. Remote exploitation requires no authentication. Simple SQL injection via URL parameter manipulation.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Unknown

Vendor Advisory: None available

Restart Required: No

Instructions:

No official patch available. Vendor was contacted but did not respond. Consider migrating to alternative payroll software.

🔧 Temporary Workarounds

WAF Rule Implementation

all

Deploy web application firewall rules to block SQL injection patterns targeting the /shift_viewmore.php endpoint

# Example ModSecurity rule: SecRule ARGS:id "@detectSQLi" "id:1001,phase:2,deny,status:403"

Input Validation Filter

all

Add server-side validation to only accept numeric values for the 'id' parameter

# PHP example: if(!is_numeric($_GET['id'])) { die('Invalid input'); }

🧯 If You Can't Patch

  • Network segmentation: Isolate the payroll system from internet access and restrict to internal trusted networks only
  • Implement strict access controls and monitor all database queries from the application

🔍 How to Verify

Check if Vulnerable:

Test by accessing /shift_viewmore.php?id=1' OR '1'='1 and observing if SQL error appears or unexpected data returns

Check Version:

Check application files for version indicators or last modified dates of /shift_viewmore.php

Verify Fix Applied:

Verify that SQL injection attempts return proper error messages or are blocked, and that only numeric IDs are accepted

📡 Detection & Monitoring

Log Indicators:

  • SQL syntax errors in web server logs
  • Unusual database queries from web application user
  • Multiple rapid requests to /shift_viewmore.php with varying id parameters

Network Indicators:

  • HTTP requests containing SQL keywords (SELECT, UNION, etc.) in URL parameters
  • Abnormal traffic patterns to the payroll system

SIEM Query:

source="web_logs" AND (url="/shift_viewmore.php" AND (query="*id=*'*" OR query="*id=*%27*" OR query="*id=*SELECT*" OR query="*id=*UNION*"))

🔗 References

📤 Share & Export