CVE-2025-7155

7.3 HIGH

📋 TL;DR

This critical vulnerability in PHPGurukul Online Notes Sharing System 1.0 allows remote attackers to perform SQL injection via the sessionid parameter in the cookie handler. Attackers can potentially access, modify, or delete database content. All users running the vulnerable version are affected.

💻 Affected Systems

Products:
  • PHPGurukul Online Notes Sharing System
Versions: 1.0
Operating Systems: Any OS running PHP
Default Config Vulnerable: ⚠️ Yes
Notes: Affects the /Dashboard component cookie handler specifically.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete database compromise leading to data theft, data manipulation, or complete system takeover via SQL injection.

🟠

Likely Case

Unauthorized data access, session hijacking, and potential privilege escalation.

🟢

If Mitigated

Limited impact with proper input validation and WAF protection in place.

🌐 Internet-Facing: HIGH - Remote exploitation is possible without authentication.
🏢 Internal Only: MEDIUM - Internal attackers could exploit, but external threat is higher.

🎯 Exploit Status

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

Public exploit available with step-by-step instructions. Researcher disclosure mentions XPath injection but payload appears to be SQL injection.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Unknown

Vendor Advisory: https://phpgurukul.com/

Restart Required: No

Instructions:

No official patch available. Consider workarounds or alternative software.

🔧 Temporary Workarounds

Input Validation and Sanitization

all

Implement strict input validation and parameterized queries for sessionid parameter

Modify PHP code to use prepared statements: $stmt = $conn->prepare('SELECT * FROM users WHERE sessionid = ?'); $stmt->bind_param('s', $sessionid);

Web Application Firewall Rules

all

Deploy WAF rules to block SQL injection patterns in cookie parameters

Add WAF rule: Detect and block SQL injection patterns in Cookie: sessionid header

🧯 If You Can't Patch

  • Isolate the system behind a reverse proxy with strict input filtering
  • Implement network segmentation to limit database access from application servers

🔍 How to Verify

Check if Vulnerable:

Test with SQL injection payloads in sessionid cookie parameter to /Dashboard endpoint

Check Version:

Check application version in admin panel or source code files

Verify Fix Applied:

Verify that SQL injection payloads no longer execute and return error pages

📡 Detection & Monitoring

Log Indicators:

  • Unusual SQL errors in application logs
  • Multiple failed login attempts with SQL patterns in cookies

Network Indicators:

  • SQL injection patterns in HTTP Cookie headers
  • Unusual database query patterns from application server

SIEM Query:

source="web_logs" AND ("sql" OR "union" OR "select" OR "sleep") AND cookie="sessionid"

🔗 References

📤 Share & Export