CVE-2025-40695

5.4 MEDIUM

📋 TL;DR

A stored cross-site scripting (XSS) vulnerability in Online Fire Reporting System v1.2 allows authenticated attackers to inject malicious scripts via 'remark', 'status', and 'takeaction' parameters. This could lead to session cookie theft when an authenticated user views the compromised request details. Organizations using PHPGurukul's Online Fire Reporting System v1.2 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; default installations are vulnerable.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

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

🟠

Likely Case

Attackers steal user session cookies to impersonate legitimate users, access sensitive fire reporting data, and modify system records.

🟢

If Mitigated

With proper input validation and output encoding, the attack would fail to execute malicious scripts, limiting impact to data integrity issues.

🌐 Internet-Facing: HIGH
🏢 Internal Only: MEDIUM

🎯 Exploit Status

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

Exploitation requires authenticated access and knowledge of the vulnerable endpoint; stored XSS payloads persist until cleaned.

🛠️ 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. Validate input sanitization in request-details.php. 4. Test functionality after patching.

🔧 Temporary Workarounds

Input Validation and Output Encoding

all

Implement server-side validation and HTML encoding for user inputs in the vulnerable parameters.

Modify /ofrs/admin/request-details.php to sanitize 'remark', 'status', and 'takeaction' inputs using htmlspecialchars() or similar functions.

🧯 If You Can't Patch

  • Implement a web application firewall (WAF) with XSS protection rules to block malicious payloads.
  • Restrict access to the /ofrs/admin/ directory to trusted IP addresses only.

🔍 How to Verify

Check if Vulnerable:

Test by submitting a simple XSS payload like <script>alert('XSS')</script> in the 'remark' field via POST to /ofrs/admin/request-details.php and check if it executes when viewing the page.

Check Version:

Check the system version in the admin panel or review the software documentation/configuration files.

Verify Fix Applied:

After patching, repeat the XSS test; the payload should be displayed as plain text or blocked, not executed.

📡 Detection & Monitoring

Log Indicators:

  • Unusual POST requests to /ofrs/admin/request-details.php with script tags or JavaScript in parameters.
  • Multiple failed login attempts followed by successful access to the admin panel.

Network Indicators:

  • HTTP traffic containing malicious script payloads in POST data to the vulnerable endpoint.

SIEM Query:

source="web_logs" AND uri="/ofrs/admin/request-details.php" AND (post_data LIKE "%<script>%" OR post_data LIKE "%javascript:%")

🔗 References

📤 Share & Export