CVE-2025-3239

7.3 HIGH

📋 TL;DR

This critical SQL injection vulnerability in PHPGurukul Online Fire Reporting System 1.2 allows remote attackers to execute arbitrary SQL commands via the editid parameter in /admin/edit-guard-detail.php. Attackers can potentially access, modify, or delete database content. Organizations using this specific version of the fire reporting system are affected.

💻 Affected Systems

Products:
  • PHPGurukul Online Fire Reporting System
Versions: 1.2
Operating Systems: Any OS running PHP
Default Config Vulnerable: ⚠️ Yes
Notes: Requires PHP environment with database connectivity. The /admin/edit-guard-detail.php file must be accessible.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete database compromise leading to data theft, data destruction, or full system takeover via SQL injection to remote code execution.

🟠

Likely Case

Unauthorized access to sensitive fire reporting data, administrative credentials theft, or database manipulation.

🟢

If Mitigated

Limited impact if proper input validation and WAF rules block malicious SQL payloads.

🌐 Internet-Facing: HIGH
🏢 Internal Only: MEDIUM

🎯 Exploit Status

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

Exploit details are publicly available on GitHub. Attack requires access to admin functionality but SQL injection is straightforward.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Unknown

Vendor Advisory: https://phpgurukul.com/

Restart Required: No

Instructions:

1. Check vendor website for security updates. 2. If no patch available, implement workarounds. 3. Consider replacing with alternative software.

🔧 Temporary Workarounds

Input Validation and Sanitization

all

Add parameterized queries or proper input sanitization for editid parameter

Modify /admin/edit-guard-detail.php to use prepared statements: $stmt = $conn->prepare('SELECT * FROM guards WHERE id = ?'); $stmt->bind_param('i', $_GET['editid']);

Access Restriction

linux

Restrict access to admin directory with authentication and IP whitelisting

Add .htaccess to /admin/ directory with: Order Deny,Allow
Deny from all
Allow from 192.168.1.0/24

🧯 If You Can't Patch

  • Implement web application firewall (WAF) with SQL injection rules
  • Isolate the system on separate network segment with strict access controls

🔍 How to Verify

Check if Vulnerable:

Test /admin/edit-guard-detail.php?editid=1' with SQL injection payloads like ' OR '1'='1

Check Version:

Check system documentation or admin panel for version information

Verify Fix Applied:

Test with same payloads and verify no SQL errors or unexpected behavior

📡 Detection & Monitoring

Log Indicators:

  • SQL syntax errors in PHP/application logs
  • Unusual database queries from web server IP
  • Multiple failed login attempts to admin panel

Network Indicators:

  • HTTP requests to /admin/edit-guard-detail.php with SQL keywords in parameters
  • Unusual outbound database connections

SIEM Query:

source="web_logs" AND uri="/admin/edit-guard-detail.php" AND (param="editid" AND value MATCHES "'.*OR.*|UNION|SELECT.*FROM")

🔗 References

📤 Share & Export