CVE-2025-9656

4.3 MEDIUM

📋 TL;DR

This is a cross-site scripting (XSS) vulnerability in PHPGurukul Directory Management System 2.0 that allows attackers to inject malicious scripts via the 'fullname' parameter in the /admin/add-directory.php file. The vulnerability can be exploited remotely to steal session cookies, redirect users, or perform other malicious actions. Organizations using PHPGurukul Directory Management System 2.0 are affected.

💻 Affected Systems

Products:
  • PHPGurukul Directory Management System
Versions: 2.0
Operating Systems: All
Default Config Vulnerable: ⚠️ Yes
Notes: The vulnerability exists in the default installation and requires the /admin/add-directory.php endpoint to be accessible.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Attackers could steal administrator session cookies, gain administrative access to the system, manipulate directory data, or redirect users to malicious sites.

🟠

Likely Case

Attackers inject malicious JavaScript to steal user session cookies or credentials, potentially leading to unauthorized access to the directory management system.

🟢

If Mitigated

With proper input validation and output encoding, the malicious scripts would be rendered harmless as text rather than executable code.

🌐 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, making it easy for attackers to weaponize. The vulnerability requires access to the admin interface.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Unknown

Vendor Advisory: https://phpgurukul.com/

Restart Required: No

Instructions:

No official patch is available. Consider implementing input validation and output encoding as a workaround, or replace the software with a secure alternative.

🔧 Temporary Workarounds

Input Validation and Output Encoding

all

Implement server-side validation to sanitize the 'fullname' parameter and encode output to prevent script execution.

Modify /admin/add-directory.php to include: htmlspecialchars($_POST['fullname'], ENT_QUOTES, 'UTF-8');

Web Application Firewall (WAF) Rules

all

Configure WAF to block requests containing malicious script patterns in the 'fullname' parameter.

Add WAF rule: Block requests with <script> tags or JavaScript patterns in POST parameters

🧯 If You Can't Patch

  • Restrict access to the /admin/add-directory.php endpoint using IP whitelisting or authentication.
  • Monitor logs for suspicious activity related to the 'fullname' parameter and implement alerting.

🔍 How to Verify

Check if Vulnerable:

Test by submitting a payload like <script>alert('XSS')</script> in the 'fullname' field of /admin/add-directory.php and check if it executes.

Check Version:

Check the software version in the admin panel or configuration files; look for 'Directory Management System 2.0'.

Verify Fix Applied:

After applying workarounds, test with the same payload to ensure it is sanitized and does not execute.

📡 Detection & Monitoring

Log Indicators:

  • Log entries showing POST requests to /admin/add-directory.php with script tags or unusual characters in the 'fullname' parameter.

Network Indicators:

  • HTTP requests containing malicious scripts in POST data to the vulnerable endpoint.

SIEM Query:

source="web_logs" AND uri="/admin/add-directory.php" AND (fullname CONTAINS "<script>" OR fullname CONTAINS "javascript:")

🔗 References

📤 Share & Export