SourceCodester Online Food Ordering System ajax.php sql injection
Description
A vulnerability was found in SourceCodester Online Food Ordering System 2.0. It has been classified as critical. Affected is an unknown function of the file /admin/ajax.php?action=add_to_cart. The manipulation of the argument pid leads to sql injection. It is possible to launch the attack remotely. The exploit has been disclosed to the public and may be used.
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
SourceCodester Online Food Ordering System 2.0 suffers from a critical SQL injection in /admin/ajax.php via the pid parameter, allowing unauthenticated remote attackers to manipulate database queries.
Vulnerability
A SQL injection vulnerability exists in the /admin/ajax.php?action=add_to_cart endpoint of SourceCodester Online Food Ordering System version 2.0 [1]. The flaw is in the handling of the pid POST parameter, which is used directly in SQL queries without proper sanitization or validation. This allows an attacker to inject arbitrary SQL commands. No authentication is required to reach this code path [1].
Exploitation
An unauthenticated remote attacker can exploit this vulnerability by sending a crafted POST request to /admin/ajax.php?action=add_to_cart with a malicious pid parameter [1]. Proof-of-concept details have been publicly disclosed, including time-based blind SQL injection payloads using AND (SELECT * FROM (SELECT(SLEEP(n)))...) to extract data or perform other database operations [1]. No special network position or user interaction is needed; the attack can be launched remotely over HTTP.
Impact
Successful exploitation allows the attacker to gain unauthorized access to the underlying database. This can lead to data leakage (sensitive information such as credentials or orders), data tampering, privilege escalation within the application, and potentially full system control depending on database permissions [1]. The vulnerability is rated critical due to the low complexity and high potential for compromise.
Mitigation
As of publication, no official patch from the vendor has been released for Online Food Ordering System version 2.0 [1]. The affected version is listed as V2.0 on SourceCodester [1][2]. Until a fix is provided, users should apply input validation and parameterized queries to the pid parameter in /admin/ajax.php, and consider restricting access to the admin panel via network-level controls or a web application firewall (WAF). This CVE is not currently listed in the Known Exploited Vulnerabilities (KEV) catalog.
AI Insight generated on May 25, 2026. Synthesized from this CVE's description and the cited reference URLs; citations are validated against the source bundle.
Affected products
2- Range: = 2.0
- Range: 2.0
Patches
0No patches discovered yet.
Vulnerability mechanics
AI mechanics synthesis has not run for this CVE yet.
References
5- github.com/aionman/cve/issues/9mitreexploitissue-tracking
- vuldb.commitrethird-party-advisory
- vuldb.commitresignaturepermissions-required
- vuldb.commitrevdb-entrytechnical-description
- www.sourcecodester.commitreproduct
News mentions
0No linked articles in our index yet.