CVE-2025-9755

4.3 MEDIUM

📋 TL;DR

This CVE describes a cross-site scripting (XSS) vulnerability in the Khanakag-17 Library Management System where the 'msg' parameter in /index.php is not properly sanitized. Attackers can inject malicious scripts that execute in users' browsers when they visit the vulnerable page. All installations up to commit 60ed174506094dcd166e34904a54288e5d10ff24 are affected.

💻 Affected Systems

Products:
  • Khanakag-17 Library Management System
Versions: All versions up to commit 60ed174506094dcd166e34904a54288e5d10ff24
Operating Systems: Any
Default Config Vulnerable: ⚠️ Yes
Notes: This product follows rolling release delivery, so specific version numbers are not provided. The vulnerability exists in the default configuration.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Attackers could steal session cookies, perform actions as authenticated users, redirect to malicious sites, or install malware on users' systems.

🟠

Likely Case

Attackers inject malicious JavaScript to steal session cookies or credentials from users who visit the vulnerable page.

🟢

If Mitigated

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

🌐 Internet-Facing: HIGH
🏢 Internal Only: MEDIUM

🎯 Exploit Status

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

Remote exploitation is possible without authentication. The exploit has been publicly disclosed in GitHub gists.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Versions after commit 60ed174506094dcd166e34904a54288e5d10ff24

Vendor Advisory: Not available

Restart Required: No

Instructions:

1. Update to the latest version from the official repository. 2. Verify the fix by checking that the commit hash is newer than 60ed174506094dcd166e34904a54288e5d10ff24. 3. Test the msg parameter functionality to ensure XSS is prevented.

🔧 Temporary Workarounds

Input Validation and Output Encoding

all

Implement proper input validation and output encoding for the msg parameter in /index.php

Web Application Firewall (WAF)

all

Deploy a WAF with XSS protection rules to filter malicious input

🧯 If You Can't Patch

  • Implement Content Security Policy (CSP) headers to restrict script execution
  • Disable or restrict access to the vulnerable /index.php endpoint if not essential

🔍 How to Verify

Check if Vulnerable:

Test the msg parameter in /index.php with XSS payloads like <script>alert('XSS')</script> and check if it executes

Check Version:

git log --oneline -1 | grep -o '[0-9a-f]\{40\}'

Verify Fix Applied:

After updating, test the same XSS payloads to confirm they are properly sanitized and don't execute

📡 Detection & Monitoring

Log Indicators:

  • Unusual long or encoded strings in msg parameter values
  • Multiple requests with script tags or JavaScript in msg parameter

Network Indicators:

  • HTTP requests containing script tags or JavaScript in the msg parameter
  • Unusual outbound connections from user browsers after visiting the vulnerable page

SIEM Query:

web_access_logs WHERE url_path LIKE '%/index.php%' AND query_string LIKE '%msg=%script%' OR query_string LIKE '%msg=%javascript%'

🔗 References

📤 Share & Export