Library Management System 10, SQL Injection, CVE-2025-3245 (Critical)

Listen to this Post

How CVE-2025-3245 Works

The vulnerability exists in the `Search` function within library_management/src/Library_Management/Forgot.java. The `txtuname` parameter is directly concatenated into SQL queries without proper sanitization, allowing attackers to inject malicious SQL commands. When a crafted payload is submitted through the username field, the backend database executes unintended commands. This flaw enables unauthorized data access, modification, or deletion. The remote exploitability increases its severity as attackers don’t require physical access. The public disclosure of PoC exploits lowers the technical barrier for exploitation.

DailyCVE Form

Platform: Library Management System
Version: 1.0
Vulnerability: SQL Injection
Severity: Critical
Date: 04/23/2025

What Undercode Say:

Exploitation:

import requests
target = "http://target.com/login"
payload = "' OR 1=1--"
data = {"txtuname": payload, "txtpass": "any"}
r = requests.post(target, data=data)
print(r.text)

Detection:

SELECT FROM logs WHERE query LIKE '%UNION%';

Mitigation:

// Use prepared statements
String query = "SELECT FROM users WHERE username = ?";
PreparedStatement stmt = conn.prepareStatement(query);
stmt.setString(1, request.getParameter("txtuname"));

WAF Rule:

SecRule ARGS:txtuname "@detectSQLi" "id:1001,deny"

Database Hardening:

REVOKE ALL PRIVILEGES ON . FROM 'appuser'@'%';
GRANT SELECT ON library_db. TO 'appuser'@'localhost';

Log Analysis Command:

grep -E "(UNION|SELECT|FROM|WHERE)" /var/log/tomcat/access.log

Patch Verification:

// Test for parameterized queries
if (code.contains("PreparedStatement")) {
System.out.println("Secure");
}

Sources:

Reported By: nvd.nist.gov
Extra Source Hub:
Undercode

Join Our Cyber World:

💬 Whatsapp | 💬 TelegramFeatured Image

Scroll to Top