Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB
CVE-2026-105166 Overview
CVE-2026-105166 is a SQL injection vulnerability in the kishor-23 food-waste-management-system project. The flaw resides in the insert function of fooddonateform.php within the Food Donation Form component. Attackers manipulate the image-choice argument to inject arbitrary SQL statements. The weakness is classified under [CWE-74] (Improper Neutralization of Special Elements in Output Used by a Downstream Component).
The vulnerability can be exploited remotely without authentication or user interaction. A public exploit has been disclosed. The project follows a rolling release model, so specific affected or patched version numbers are not available. The maintainer was notified through an issue report but has not responded.
Critical Impact
Remote, unauthenticated attackers can inject SQL commands through the Food Donation Form, potentially reading, modifying, or deleting database contents.
Affected Products
- kishor-23 food-waste-management-system (rolling release, commits 411989e3ecb82895e53dca7865f72145f03d7d93 and b3a70b2c492dc9904de5be1ad9389bd79b87f82c)
- Food Donation Form component (fooddonateform.php)
- insert function processing the image-choice parameter
Discovery Timeline
- 2026-10-04 - CVE CVE-2026-105166 published to NVD
- 2026-10-06 - Last updated in NVD database
Technical Details for CVE-2026-105166
Vulnerability Analysis
The vulnerability stems from unsanitized user input being passed directly into a SQL statement within the insert function of fooddonateform.php. The image-choice parameter accepts attacker-controlled values that are concatenated into a query without parameterization or escaping. A remote attacker submits a crafted POST request to the Food Donation Form endpoint to inject SQL syntax.
Successful exploitation enables unauthorized database read, modification, or deletion against the application's backend. Because the application is a web-facing donation management system, the database likely contains donor and donation records. The public exploit lowers the technical barrier for opportunistic attackers scanning for exposed instances.
Root Cause
The root cause is improper neutralization of special elements in a downstream SQL query, mapped to [CWE-74]. The image-choice form argument is interpolated into a database INSERT statement without using prepared statements, parameter binding, or input validation. Any value containing SQL metacharacters is executed as part of the query.
Attack Vector
The attack vector is network-based and does not require authentication or user interaction. An attacker submits a crafted HTTP request to the Food Donation Form that embeds SQL payloads in the image-choice field. See the GitHub Issue Tracker and the VulDB CVE Entry CVE-2026-105166 for additional technical references.
Detection Methods for CVE-2026-105166
Indicators of Compromise
- HTTP POST requests to fooddonateform.php containing SQL metacharacters (single quotes, UNION, SELECT, --, ;) in the image-choice parameter.
- Web server or application logs showing unusually long or encoded values for the image-choice field.
- Database error messages referencing syntax issues originating from the Food Donation Form endpoint.
- Outbound queries or unexpected data exfiltration patterns correlated with form submissions.
Detection Strategies
- Deploy web application firewall (WAF) rules that flag SQL injection patterns targeting the image-choice parameter.
- Enable verbose logging on the PHP application and the backend database to capture full request bodies for fooddonateform.php.
- Correlate HTTP request logs with database query logs to identify malformed INSERT statements originating from the donation form.
Monitoring Recommendations
- Monitor the exposed form endpoint for repeated submissions from a single source address or user-agent.
- Alert on database schema reconnaissance such as queries referencing information_schema following form submissions.
- Track changes to donor and donation tables for unexpected inserts, updates, or deletions.
How to Mitigate CVE-2026-105166
Immediate Actions Required
- Take the Food Donation Form offline or restrict access to trusted networks until a fix is applied.
- Apply input validation and parameterized queries in fooddonateform.php for the image-choice argument and all other form fields.
- Review database and web server logs for prior exploitation attempts referencing the vulnerable parameter.
- Rotate database credentials if there is evidence that the application database was accessed by an unauthorized party.
Patch Information
No vendor patch is available. According to the VulDB CVE Entry CVE-2026-105166, the project was informed early through a GitHub Issue Tracker report but has not responded. The project uses a rolling release model, so operators should pull the latest commits from the GitHub Project Repository and manually apply fixes to fooddonateform.php.
Workarounds
- Replace string concatenation in fooddonateform.php with PHP Data Objects (PDO) prepared statements and bound parameters.
- Enforce an allowlist of expected values for the image-choice parameter and reject input containing SQL metacharacters.
- Place the application behind a WAF with SQL injection signatures tuned for the form endpoint.
- Run the backend database account with least-privilege permissions limited to the specific tables used by the donation workflow.
# Example WAF rule (ModSecurity) blocking SQLi patterns on image-choice
SecRule ARGS:image-choice "@detectSQLi" \
"id:1050166,phase:2,deny,status:403,\
msg:'CVE-2026-105166 SQLi attempt on fooddonateform.php'"
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB

