CVE-2025-12314
Executive Summary
CVE-2025-12314 is a SQL injection vulnerability in the /admin/deleteitem.php script of code-projects Food Ordering System 1.0, exploitable through manipulation of the itemID argument. The flaw requires administrative privileges (PR:H) but can be triggered remotely over the network with low attack complexity, and a public exploit exists. Successful exploitation allows an authenticated admin — or an attacker who has compromised an admin session — to execute arbitrary SQL against the backend database, potentially leading to data manipulation, data theft, or further lateral movement within the application's data layer.
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.
No signup required
Technical Analysis
The vulnerability resides in the administrative item-deletion handler located at /admin/deleteitem.php. According to the NVD description, the impacted element is "an unknown function" within that file, and the flaw is triggered by manipulating the itemID argument. The underlying weakness is classified as CWE-74 (Improper Neutralization of Special Elements in Output Used by a Downstream Component, i.e., injection).
In practical terms, the application fails to properly sanitize or parameterize the itemID value before incorporating it into a SQL statement. Because the affected endpoint is the item-deletion routine, the parameter is presumably intended to identify which record to remove. When attacker-controlled input is concatenated directly into a SQL query rather than bound via prepared statements or strict type casting, an attacker can inject arbitrary SQL syntax. The result is that the DELETE context can be escaped or extended to alter query logic — a classic in-band SQL injection.
Key technical characteristics:
- Attack vector: Network (AV:N) — the endpoint is reachable over HTTP(S).
- Attack complexity: Low (AC:L) — no special conditions or race windows are required.
- Privileges required: High (PR:H) — the
/admin/path implies an authenticated administrative context. - User interaction: None (UI:N) — no victim action is needed.
- Scope: Unchanged (S:U) — impact is confined to the application's security authority.
- Confidentiality / Integrity / Availability: All Low (C:L/I:L/A:L).
Because only the file path, argument name, and injection class are confirmed by the CNA/NVD data, no specific SQL statement, database engine, or query structure can be asserted with confidence. The report therefore treats the flaw at the vulnerability-class level: unsafe string construction of a SQL query from the itemID parameter.
The low EPSS score (0.00364, ~28th percentile) indicates that while a public exploit exists, observed exploitation activity in the wild is currently limited relative to the broader exploited-CVE population. CISA KEV status is negative.
Exploitation Scenarios
No public PoC code is bundled with this dataset, and no Nuclei template exists; however, the CNA title and NVD description both confirm that a public exploit has been disclosed. The attack chain below is described at the vulnerability-class level.
Reconnaissance / Target Identification An attacker enumerates internet-facing hosts running the code-projects Food Ordering System. Fingerprinting may rely on the application's distinctive page titles, directory layout, or static assets. The presence of an
/admin/administrative area and thedeleteitem.phphandler confirms a candidate target. Shodan or similar internet-scanning services can be used to locate exposed instances (http.title:"Food Ordering System").Triggering the Flaw Class The attacker authenticates to the administrative interface (PR:H) — either with valid credentials, default/weak credentials, or a previously compromised session. Once authenticated, the attacker navigates to the item-deletion functionality that invokes
/admin/deleteitem.php. The vulnerable surface is theitemIDargument supplied to this endpoint.Injection and Execution (class-level) Because the
itemIDvalue is incorporated into a SQL query without adequate neutralization, the attacker substitutes crafted input into theitemIDparameter. At the vulnerability-class level, this permits the attacker to alter the structure of the underlying SQL statement — for example, to change the WHERE-clause logic, to union in data from other tables, or to subvert the intended delete operation. The precise payload syntax depends on the database backend, which is not specified in the available data. Remote exploitation is confirmed possible.Post-Exploitation Impact Given the CVSS subscores (C:L/I:L/A:L), the expected impact is bounded but real: reading limited data (C:L), modifying or deleting records (I:L), and degrading availability of affected records (A:L). An attacker could delete or corrupt item records, extract sensitive data accessible through the injection context, and potentially pivot to other tables within the same database. There is no evidence in the provided data of remote code execution or OS-level compromise.
Impact Assessment
The CVSS v3.1 base score is 4.7 (Medium), derived from:
- AV:N — exploitable across a network, no adjacent or local access required.
- AC:L — straightforward to exploit; no unusual conditions.
- PR:H — requires administrative privileges on the target application, which materially limits the attacker population and is the primary reason the base score is Medium rather than High.
- UI:N — no user interaction needed once the prerequisite access is met.
- S:U — impact remains within the vulnerable component's scope.
- C:L / I:L / A:L — partial loss of confidentiality, integrity, and availability.
Business impact centers on the integrity and confidentiality of application data (menu items, orders, and potentially customer records stored in the same database). The most likely abuse is unauthorized deletion or alteration of records and targeted data extraction. Because exploitation requires admin access, the realistic threat model is: (a) an insider or compromised admin account, (b) an attacker who has obtained admin credentials via default passwords, credential stuffing, or a separate vulnerability, or (c) a chained attack where an authentication bypass precedes this injection. Blast radius is bounded by the database privileges of the application account used by the Food Ordering System.
Detection Guidance
Sigma Rule
title: SQL Injection Attempt Against Food Ordering System deleteitem.php
id: 8f2c1a4e-3b7d-4c9a-9e21-7d6b5f0a1c33
status: experimental
description: Detects SQL injection patterns in requests to the admin deleteitem.php endpoint
(CVE-2025-12314), targeting the itemID parameter.
references:
- https://nvd.nist.gov/vuln/detail/CVE-2025-12314
author: SOC Detection Engineering
date: 2025/06/01
logsource:
category: webserver
product: apache
detection:
selection_endpoint:
cs-uri-stem|endswith: '/admin/deleteitem.php'
selection_sqli_patterns:
cs-uri-query|contains:
- 'itemID='
cs-uri-query|contains:
- 'UNION'
- 'SELECT'
- 'OR 1=1'
- "'--"
- 'SLEEP('
- 'BENCHMARK('
- 'CONCAT('
- 'information_schema'
condition: selection_endpoint and selection_sqli_patterns
fields:
- c-ip
- cs-uri-query
- cs-method
falsepositives:
- Legitimate administrative activity with unusual numeric inputs
level: high
YARA Rule
rule CVE_2025_12314_FoodOrdering_SQLi
{
meta:
description = "Detects SQL injection payloads referencing the deleteitem.php itemID parameter (CVE-2025-12314)"
author = "SOC Detection Engineering"
reference = "https://nvd.nist.gov/vuln/detail/CVE-2025-12314"
date = "2025-06-01"
strings:
$endpoint = "deleteitem.php" ascii nocase
$param = "itemID" ascii nocase
$sqli1 = "UNION SELECT" ascii nocase
$sqli2 = "OR 1=1" ascii nocase
$sqli3 = "information_schema" ascii nocase
$sqli4 = "SLEEP(" ascii nocase
$sqli5 = "BENCHMARK(" ascii nocase
condition:
$endpoint and $param and any of ($sqli*)
}
Suricata IDS Rule
alert http any any -> any any (msg:"CVE-2025-12314 Food Ordering System deleteitem.php itemID SQL Injection Attempt"; flow:established,to_server; http.uri; content:"/admin/deleteitem.php"; http.uri; content:"itemID"; nocase; http.uri; pcre:"/(itemID=.*(union.+select|or\s+1=1|sleep\(|benchmark\(|information_schema))/i"; classtype:web-application-attack; reference:cve,CVE-2025-12314; sid:202512314; rev:1;)
Elastic Detection
sequence by source.ip with maxspan=30s
[ network where http.request.method == "GET"
and url.path : "/admin/deleteitem.php"
and url.query : "itemID" ]
[ network where http.request.method == "GET"
and url.path : "/admin/deleteitem.php"
and url.query regex~ ".*(union.*select|or\\s+1=1|sleep\\(|benchmark\\(|information_schema).*" ]
Splunk SPL Query
index=web_logs uri_path="/admin/deleteitem.php" itemID=*
| eval sqli_sig=if(match(lower(_raw),"(union.*select|or\s+1=1|sleep\(|benchmark\(|information_schema|'--|\bwaitfor\b)"),1,0)
| where sqli_sig=1
| stats count min(_time) as first_seen max(_time) as last_seen values(uri_query) as queries by src_ip, uri_path, status
| sort - count
Wazuh OSSEC Rule
<group name="web,sql_injection,CVE-2025-12314,">
<rule id="100314" level="10">
<if_sid>31100</if_sid>
<id>^/admin/deleteitem.php</id>
<match>itemID=</match>
<regex>(?i)(union.+select|or\s+1=1|sleep\(|benchmark\(|information_schema|'.*--)</regex>
<description>CVE-2025-12314: Possible SQL injection against Food Ordering System deleteitem.php itemID parameter</description>
<mitre>
<id>T1190</id>
</mitre>
</rule>
</group>
Mitigation & Patch Guidance
Patch confidence: 0/4 (UNPATCHED — no patch evidence from any tracked source). No vendor fix, workaround, or affected-version list is available. code-projects applications are frequently released without a maintained security-response process, so remediation must be defensive.
1) Immediate mitigations
- Restrict access to
/admin/endpoints to trusted IP ranges (network ACLs, VPN-only access, or a zero-trust proxy). - Enforce authentication hardening: strong unique admin passwords, MFA where feasible, and immediate password rotation if compromise is suspected.
- Deploy a Web Application Firewall (WAF) with virtual patching tuned to
/admin/deleteitem.phpand SQL-injection signatures targeting theitemIDparameter. - Enable strict server-side input validation for numeric parameters if application code ownership is available (reject non-numeric
itemID).
2) Patch / upgrade steps
- No official patch currently exists. Monitor the code-projects project page and NVD for an updated release.
- If source code is available (open-source project), remediate directly by replacing string-concatenated SQL with prepared statements / parameterized queries, and cast
itemIDto an integer.
3) Long-term hardening
- Migrate all database access to parameterized queries to eliminate the injection class (CWE-74/CWE-89).
- Apply the principle of least privilege to the application's database account (no DELETE/DDL rights beyond what is required).
- Implement centralized logging with alerting (see detection rules above) and periodic dependency/vulnerability review.
- Treat administrative interfaces as high-value: isolate them and log all access.
References
- NVD — CVE-2025-12314: https://nvd.nist.gov/vuln/detail/CVE-2025-12314
- MITRE CWE-74 — Improper Neutralization of Special Elements: https://cwe.mitre.org/data/definitions/74.html
- MITRE ATT&CK T1190 — Exploit Public-Facing Application: https://attack.mitre.org/techniques/T1190/
- code-projects (vendor project page): https://code-projects.org/
- Exploit-db / public exploit reference for code-projects Food Ordering System (public exploit disclosed, per CNA)
Note: CISA KEV listing is not applicable (CISA KEV: NO). No named threat-actor campaigns or confirmed in-the-wild exploitation are referenced in the provided intelligence; the public exploit disclosure indicates exploitation is technically feasible and available to attackers. EPSS 0.00364 (≈28th percentile) suggests current wild exploitation remains low relative to other exploited CVEs.
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.
💣 PoC CODE AVAILABLE
Exploit code for this CVE is tracked in our database.
Access poc_code via API Pro.