CVE-2025-40696

5.4 MEDIUM

📋 TL;DR

This stored cross-site scripting (XSS) vulnerability in Online Fire Reporting System v1.2 allows authenticated attackers to inject malicious scripts into user input fields. When other authenticated users view the compromised reports, their session cookies can be stolen, potentially leading to account takeover. Only systems running the vulnerable PHPGurukul software are affected.

💻 Affected Systems

Products:
  • PHPGurukul Online Fire Reporting System
Versions: v1.2
Operating Systems: Any OS running PHP
Default Config Vulnerable: ⚠️ Yes
Notes: Requires authenticated access to exploit. All installations of v1.2 are vulnerable unless patched.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Attackers steal administrator session cookies, gain full system access, manipulate fire reports, and potentially compromise the entire system or pivot to internal networks.

🟠

Likely Case

Attackers steal regular user session cookies to impersonate them, submit false fire reports, or access sensitive data within the application.

🟢

If Mitigated

With proper input validation and output encoding, malicious scripts are neutralized before execution, preventing session theft.

🌐 Internet-Facing: HIGH
🏢 Internal Only: MEDIUM

🎯 Exploit Status

Public PoC: ✅ No
Weaponized: UNKNOWN
Unauthenticated Exploit: ✅ No
Complexity: MEDIUM

Exploitation requires authenticated access to the reporting system. Attackers must craft malicious payloads for fullname, location, or message parameters.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Unknown - check vendor advisory

Vendor Advisory: https://www.incibe.es/en/incibe-cert/notices/aviso/multiple-vulnerabilities-phpgurukuls-online-fire-reporting-system

Restart Required: No

Instructions:

1. Check vendor advisory for patch details. 2. Apply vendor-provided patch. 3. Implement input validation and output encoding. 4. Test the fix thoroughly.

🔧 Temporary Workarounds

Input Validation Filter

all

Implement server-side input validation to sanitize fullname, location, and message parameters

Add input sanitization in reporting.php before processing POST data

Output Encoding

all

Apply proper HTML encoding when displaying user-controlled data

Use htmlspecialchars() or similar functions when outputting user data

🧯 If You Can't Patch

  • Implement web application firewall (WAF) rules to block XSS payloads
  • Restrict user permissions to minimize impact of session theft

🔍 How to Verify

Check if Vulnerable:

Test by submitting a simple XSS payload like <script>alert('test')</script> in fullname, location, or message fields and check if it executes when viewing reports.

Check Version:

Check system documentation or admin panel for version information

Verify Fix Applied:

Attempt the same XSS payload after patching - it should be displayed as plain text, not executed.

📡 Detection & Monitoring

Log Indicators:

  • Unusual POST requests to /ofrs/reporting.php with script tags or JavaScript in parameters
  • Multiple failed login attempts followed by successful authentication and report submission

Network Indicators:

  • HTTP traffic containing script tags or JavaScript in POST parameters to the vulnerable endpoint

SIEM Query:

source="web_logs" AND (uri_path="/ofrs/reporting.php" AND (param_value="*<script>*" OR param_value="*javascript:*"))

🔗 References

📤 Share & Export