CVE-2025-12315
Executive Summary
CVE-2025-12315 is a SQL injection vulnerability in the code-projects Food Ordering System version 1.0. The flaw exists in the /admin/menu.php script and is triggered by manipulating the itemPrice argument. Successful exploitation allows an authenticated remote attacker to execute arbitrary SQL commands against the underlying database, potentially leading to data exfiltration, modification, or authentication bypass. While the vulnerability is publicly disclosed with a PoC, the CVSS score is rated as Medium (4.7) due to the requirement for high privileges (authenticated admin access). No official patch is currently available.
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 is classified under CWE-74 (Improper Neutralization of Special Elements in Output Used by a Downstream Component), with NVD identifying it specifically as a SQL Injection issue. The affected component is the administrative menu management interface located at /admin/menu.php.
The attack surface is the itemPrice parameter, which is passed to the backend without adequate sanitization or parameterized query construction. Because the application fails to neutralize SQL syntax within this input, an attacker with administrative privileges can inject arbitrary SQL commands. The CVSS vector AV:N/AC:L/PR:H/UI:N indicates that the attack is network-accessible (remote), requires low complexity, and necessitates high privileges (i.e., valid admin credentials). The scope is unchanged (S:U), and the impact to confidentiality, integrity, and availability is rated as Low (C:L/I:L/A:L).
The technical details of the underlying database schema or the specific SQL query being executed are not provided in the NVD description. However, the manipulation of the itemPrice argument suggests the injection point is likely within an UPDATE or INSERT statement related to menu item pricing. Given the administrative context, an attacker could potentially alter pricing data, extract user credentials from the database, or execute stacked queries depending on the database management system (DBMS) in use.
Exploitation Scenarios
Note: No public PoC code is available in the provided data, though the NVD description confirms public disclosure. The following chain is inferred from the vulnerability class and the specific parameter mentioned.
- Reconnaissance and Target Identification: An attacker identifies a target running the code-projects Food Ordering System 1.0 by scanning for specific HTTP response signatures or directory structures associated with the application. Shodan dorks such as
http.html:"menu.php"orhttp.title:"Food Ordering System"can be used to locate exposed instances. - Authentication: The attacker must first obtain valid administrative credentials. This implies the attacker has either compromised an admin account through other means (e.g., phishing, credential stuffing) or the application is deployed in a misconfigured environment with default credentials. The high privilege requirement (
PR:H) makes this a post-authentication vulnerability. - Triggering the Flaw: Once authenticated, the attacker navigates to the administrative menu management interface at
/admin/menu.php. They initiate a request to update a menu item's price. TheitemPriceparameter in the HTTP request (likely a POST request) is the injection point. - Payload Execution: The attacker modifies the
itemPricevalue to include malicious SQL syntax. For example, a payload such as1' OR '1'='1or a UNION-based injection could be submitted. Because the input is not sanitized, the backend database interprets the injected string as executable SQL code rather than a literal price value. The attacker can leverage this to bypass pricing validations, extract data from other tables (e.g.,users,orders), or modify database records. - Post-Exploitation Impact: Depending on the database privileges associated with the web application, the attacker could read sensitive customer data, alter order totals, inject malicious scripts into the database for stored XSS, or potentially achieve remote code execution if the database allows file writes or command execution.
Impact Assessment
The primary impact is to the confidentiality and integrity of the application's database. Although the CVSS impact metrics are Low (C:L/I:L/A:L), the business impact can be significant in an e-commerce context. An attacker could manipulate menu prices to near-zero, resulting in financial loss. They could also exfiltrate customer PII (names, addresses, phone numbers) and potentially administrative password hashes, leading to further network compromise. The availability impact is rated Low, suggesting the attacker is unlikely to crash the database, but could cause operational issues by corrupting menu data.
The blast radius is limited to the specific instance of the Food Ordering System and its backend database. Because administrative privileges are required, the immediate risk is mitigated by the difficulty of obtaining those credentials. However, if the admin panel is exposed to the internet and uses weak credentials, the vulnerability becomes a critical pivot point for data breaches. The EPSS score of 0.00414 (33.6th percentile) indicates a low probability of exploitation in the wild within the next 30 days, but the public availability of the exploit increases the risk for targeted attacks.
Detection Guidance
Sigma Rule
title: SQL Injection Attempt in Food Ordering System menu.php
id: 8f4b2e1a-3c5d-4e7f-9a0b-1c2d3e4f5a6b
status: experimental
description: Detects SQL injection attempts targeting the itemPrice parameter in /admin/menu.php of code-projects Food Ordering System.
author: Threat Intelligence
date: 2025-04-10
logsource:
category: webserver
product: apache
service: access_combined
detection:
selection:
cs-method: 'POST'
cs-uri-stem: '/admin/menu.php'
cs-uri-query|contains: 'itemPrice='
keywords:
- 'itemPrice='
filter:
cs-uri-query|contains:
- "itemPrice=1'"
- 'itemPrice=1"'
- 'itemPrice=1 OR'
- 'itemPrice=1 UNION'
- 'itemPrice=1;'
condition: selection and keywords and not filter
falsepositives:
- Legitimate administrative updates containing SQL-like strings in the price field (very unlikely).
level: high
YARA Rule
rule CVE_2025_12315_Food_Ordering_SQLi
{
meta:
description = "Detects SQL injection patterns in HTTP requests targeting itemPrice parameter"
author = "Threat Intelligence"
date = "2025-04-10"
reference = "CVE-2025-12315"
severity = "high"
strings:
$s1 = "itemPrice=" ascii wide nocase
$sqli1 = "' OR '" ascii wide nocase
$sqli2 = "UNION SELECT" ascii wide nocase
$sqli3 = "1=1" ascii wide nocase
$sqli4 = "';--" ascii wide nocase
$sqli5 = "' OR 1=1" ascii wide nocase
condition:
$s1 and any of ($sqli*)
}
Suricata IDS Rule
alert http any any -> any any (msg:"CVE-2025-12315 SQL Injection Attempt in Food Ordering System menu.php"; flow:to_server,established; http.method; content:"POST"; http.uri; content:"/admin/menu.php"; http.client_body; content:"itemPrice="; pcre:"/itemPrice=[^&]*(\%27|\'|\%22|\"|\-\-|\%23|#|\/\*|\*\/|UNION|SELECT|OR\s+1\=1)/i"; reference:cve,2025-12315; classtype:web-application-attack; sid:10000001; rev:1;)
Elastic Detection
sequence by host.id, user.id with maxspan=5s
[ network where network.protocol == "http" and
http.request.method == "POST" and
url.path == "/admin/menu.php" and
url.query contains "itemPrice=" and
url.query regex ".*(\\'|\\\"|--|#|/\\*|UNION|SELECT|OR\\s+1=1).*" ]
Splunk SPL Query
index=web sourcetype=access_combined
| search method=POST uri="/admin/menu.php"
| rex field=uri_query "itemPrice=(?<itemPrice_value>[^&]+)"
| where match(itemPrice_value, "(?i)(\'|\"|--|#|/\*|\*/|UNION|SELECT|OR\s+1=1|1=1)")
| stats count by src_ip, uri, itemPrice_value
| sort - count
Wazuh OSSEC Rule
<group name="web,appsec,cve-2025-12315,">
<rule id="100200" level="12">
<if_sid>31103</if_sid>
<url>/admin/menu.php</url>
<method>POST</method>
<description>CVE-2025-12315: SQL Injection attempt detected in itemPrice parameter of Food Ordering System.</description>
<match>itemPrice=</match>
<regex>itemPrice=[^&]*(\'|\"|--|#|/\*|\*/|UNION|SELECT|OR\s+1=1|1=1)</regex>
<group>sql_injection,web_attack,</group>
</rule>
</group>
Mitigation & Patch Guidance
Patch Confidence: 0/4 (UNPATCHED — no patch evidence from any tracked source)
Immediate Mitigations:
- Restrict Administrative Access: Ensure the
/admin/directory is not publicly accessible. Implement IP allowlisting or require VPN access for administrative functions. This directly addresses thePR:Hvector by making it harder for attackers to reach the vulnerable endpoint even with credentials. - Web Application Firewall (WAF): Deploy a WAF with rules that detect SQL injection patterns in POST request bodies, specifically targeting the
itemPriceparameter. This can provide temporary virtual patching. - Disable Unused Features: If the menu management functionality is not actively used, consider temporarily disabling the
/admin/menu.phpscript or removing write permissions from the web server user on the database.
- Restrict Administrative Access: Ensure the
Patch/Upgrade Steps:
- As of this report, there is no official vendor patch available for CVE-2025-12315. The vendor (code-projects) has not released a security update. Users are advised to monitor the official code-projects repository or website for any upcoming patches.
- If a patch becomes available, it will likely involve replacing raw SQL queries with parameterized statements (prepared statements) in the
/admin/menu.phpfile. Until then, manual code auditing and remediation are required for custom deployments.
Long-Term Hardening:
- Input Validation: Implement strict server-side input validation for the
itemPriceparameter. Ensure it accepts only numeric values (e.g., usingis_numeric()in PHP) and rejects any special characters. - Parameterized Queries: Refactor the application code to use parameterized queries or prepared statements for all database interactions. This is the definitive fix for SQL injection.
- Least Privilege: Ensure the database user associated with the web application has the minimum necessary privileges. Do not use
rootorsaaccounts for the web app connection. - Regular Security Audits: Conduct regular code reviews and penetration testing on all custom and third-party web applications, especially those handling financial transactions.
- Input Validation: Implement strict server-side input validation for the
References
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2025-12315
- CVE.org: https://www.cve.org/CVERecord?id=CVE-2025-12315
- MITRE CWE-74: https://cwe.mitre.org/data/definitions/74.html
- MITRE ATT&CK T1190: https://attack.mitre.org/techniques/T1190/
- EPSS Score: 0.00414 (33.6th percentile) — https://api.first.org/data/v1/epss?cve=CVE-2025-12315
- Note: No threat actor campaigns or confirmed exploit-in-the-wild evidence are available for this specific CVE at the time of writing. Public disclosure of the exploit has been confirmed by NVD, but no active exploitation campaigns have been observed.
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.