SourceCodester Pharmacy Product Management System Business Logic Vulnerability in Sales Management
Vulnerability
A business logic vulnerability has been identified in SourceCodester Pharmacy Product Management System version 1.0. The issue resides in the add-sales.php file, specifically within the POST Parameter Handler component. The vulnerability arises because the application does not properly validate the 'txtqty' parameter, allowing authenticated users to submit negative quantities. This oversight can be exploited to artificially inflate stock levels, as the system's inventory calculations incorrectly add the negative quantity instead of subtracting it. The vulnerability can be exploited remotely, and a public proof-of-concept is available.
Impact
Exploitation of this vulnerability can lead to significant inventory management issues, allowing for the artificial inflation of stock levels. This not only corrupts inventory records but can also disrupt financial calculations and sales reporting. Additionally, such a vulnerability could potentially be used to manipulate refund processes or bypass stock availability checks.
Reproduction
To reproduce this vulnerability, log into the application and navigate to the 'Add Sales' page. Once there, intercept the request using a tool like Burp Suite. Modify the 'txtqty' parameter to include a negative value, such as '-10', and send the request. The server will process the negative quantity incorrectly, adding to the stock instead of subtracting from it.
Vulnerability Rating
Our algorithm analyzes dozens of metrics to generate these 8 key vulnerability categories, which are then combined to calculate the overall risk score.
