CVE-2025-4074

7.3 HIGH

📋 TL;DR

This critical SQL injection vulnerability in PHPGurukul Curfew e-Pass Management System 1.0 allows remote attackers to execute arbitrary SQL commands via the fromdate/todate parameters in /admin/pass-bwdates-report.php. This affects all systems running the vulnerable version of this software, potentially compromising the entire database.

💻 Affected Systems

Products:
  • PHPGurukul Curfew e-Pass Management System
Versions: 1.0
Operating Systems: All platforms running PHP
Default Config Vulnerable: ⚠️ Yes
Notes: Affects the /admin/pass-bwdates-report.php file specifically. Requires PHP environment with database connectivity.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete database compromise leading to data theft, data manipulation, authentication bypass, and potential remote code execution via database functions.

🟠

Likely Case

Unauthorized data access and extraction of sensitive information including user credentials, personal data, and administrative records.

🟢

If Mitigated

Limited impact with proper input validation and database permissions, potentially only allowing data viewing without modification.

🌐 Internet-Facing: HIGH - The vulnerability is remotely exploitable and affects a web application component.
🏢 Internal Only: MEDIUM - While still exploitable internally, the attack surface is reduced compared to internet-facing deployments.

🎯 Exploit Status

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

Exploit details are publicly available on GitHub. Attack requires access to the admin interface but SQL injection is straightforward once authenticated.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Unknown

Vendor Advisory: https://phpgurukul.com/

Restart Required: No

Instructions:

No official patch available. Check vendor website for updates. Consider implementing input validation and parameterized queries manually.

🔧 Temporary Workarounds

Input Validation and Sanitization

all

Add server-side validation for fromdate and todate parameters to only accept expected date formats

Modify /admin/pass-bwdates-report.php to validate date parameters before SQL query construction

Web Application Firewall Rules

all

Implement WAF rules to block SQL injection patterns in date parameters

Add WAF rule: Detect SQL keywords in fromdate/todate parameters

🧯 If You Can't Patch

  • Restrict access to /admin/pass-bwdates-report.php using IP whitelisting or additional authentication
  • Implement database user with minimal permissions (read-only if possible) for the application

🔍 How to Verify

Check if Vulnerable:

Test the /admin/pass-bwdates-report.php endpoint with SQL injection payloads in fromdate or todate parameters

Check Version:

Check application version in admin panel or readme files

Verify Fix Applied:

Verify that SQL injection attempts no longer succeed and that date parameters are properly validated

📡 Detection & Monitoring

Log Indicators:

  • Unusual SQL queries in database logs
  • Multiple failed login attempts followed by access to pass-bwdates-report.php
  • Requests with SQL keywords in date parameters

Network Indicators:

  • HTTP POST/GET requests to /admin/pass-bwdates-report.php with suspicious parameters
  • Unusual database connection patterns from web server

SIEM Query:

source="web_logs" AND uri="/admin/pass-bwdates-report.php" AND (param="fromdate" OR param="todate") AND (value="*UNION*" OR value="*SELECT*" OR value="*OR*" OR value="*--*")

🔗 References

📤 Share & Export