CVE-2025-5975

4.3 MEDIUM

📋 TL;DR

This cross-site scripting (XSS) vulnerability in PHPGurukul Rail Pass Management System allows attackers to inject malicious scripts via the 'searchdata' parameter in the /rpms/download-pass.php file. The vulnerability can be exploited remotely to execute arbitrary JavaScript in victims' browsers. Organizations using Rail Pass Management System 1.0 are affected.

💻 Affected Systems

Products:
  • PHPGurukul Rail Pass Management System
Versions: 1.0
Operating Systems: All platforms running PHP
Default Config Vulnerable: ⚠️ Yes
Notes: The vulnerability exists in the default installation. Any system with the vulnerable file accessible via web server is affected.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Attackers could steal session cookies, redirect users to malicious sites, perform actions on behalf of authenticated users, or deliver malware payloads to system administrators.

🟠

Likely Case

Attackers inject malicious scripts that steal user session cookies or credentials, potentially leading to account compromise and unauthorized access to the rail pass management system.

🟢

If Mitigated

With proper input validation and output encoding, the XSS payloads would be neutralized, preventing script execution while maintaining search functionality.

🌐 Internet-Facing: HIGH
🏢 Internal Only: MEDIUM

🎯 Exploit Status

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

Exploit details are publicly available on GitHub. The vulnerability requires no authentication and has simple exploitation vectors.

🛠️ 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 workarounds or replacing the software.

🔧 Temporary Workarounds

Input Validation Filter

all

Implement server-side input validation to sanitize the searchdata parameter before processing

Modify /rpms/download-pass.php to include: $searchdata = htmlspecialchars($_GET['searchdata'], ENT_QUOTES, 'UTF-8');

Content Security Policy

all

Implement CSP headers to restrict script execution sources

Add to .htaccess: Header set Content-Security-Policy "default-src 'self'; script-src 'self'"
Add to PHP: header("Content-Security-Policy: default-src 'self'; script-src 'self'");

🧯 If You Can't Patch

  • Implement web application firewall (WAF) rules to block XSS payloads in searchdata parameter
  • Restrict access to /rpms/download-pass.php to authenticated users only

🔍 How to Verify

Check if Vulnerable:

Test by accessing /rpms/download-pass.php?searchdata=<script>alert('XSS')</script> and checking if script executes

Check Version:

Check system documentation or contact vendor. No standard version command available.

Verify Fix Applied:

After implementing fixes, test with same payload and verify script does not execute and input is properly encoded

📡 Detection & Monitoring

Log Indicators:

  • HTTP requests to /rpms/download-pass.php containing script tags or JavaScript in searchdata parameter
  • Unusual search patterns with encoded payloads

Network Indicators:

  • HTTP GET requests with suspicious parameters containing JavaScript or HTML tags

SIEM Query:

source="web_logs" AND uri_path="/rpms/download-pass.php" AND (query="*<script>*" OR query="*javascript:*" OR query="*onerror=*" OR query="*onload=*")

🔗 References

📤 Share & Export