Executive brief
SourceCodester Drug Recommendation System is an open-source web application that recommends medications based on symptoms. A SQL injection vulnerability in the /Admin/edit_symptom.php file allows unauthenticated attackers to bypass authentication, extract sensitive user credentials including administrator accounts, and compromise the entire database without requiring any user interaction. An attacker can enumerate databases, dump patient and user information, and gain full control of the application's data.
Technical details
A SQL injection vulnerability exists in the id parameter of /Admin/edit_symptom.php due to unsanitized user input concatenated directly into SQL queries without parameterized statements. The vulnerable endpoint is accessible without authentication, and attackers can exploit this via GET requests using time-based or UNION-based SQL injection techniques (confirmed with sqlmap). Successful exploitation yields complete database disclosure, administrative credential theft, and authentication bypass; the fix requires migrating to prepared statements with parameterized queries.
Affected products
- SourceCodester Drug Recommendation System 1.0
Timeline
- 2026-09-20: disclosed: Vulnerability disclosed publicly with public exploit code available