Skip to content
This repository has been archived by the owner on Jan 27, 2022. It is now read-only.

SQLi vulnerabilities. #5

Open
chluo1997 opened this issue Sep 22, 2021 · 0 comments
Open

SQLi vulnerabilities. #5

chluo1997 opened this issue Sep 22, 2021 · 0 comments

Comments

@chluo1997
Copy link

chluo1997 commented Sep 22, 2021

We found several SQLi vulnerabilities in stock-management-system.

Details:
The user input $data is used to construct the SQL queries in file routes/ApiRoutes.php. The application code validates the user input $data with a few validation functions (e.g., security()) in file helpers/ValidateParams.php. The validation functions also invoke a few sanitizers such as htmlspecialchars(). However, these sanitizations and validations are not efficient to prevent SQLi attacks because they still allow sensitive characters ("\") to be injected into SQL statements. Therefore, the SQL statements are unsafe and the attackers can exploit several SQLi vulnerabilities to compromise this application.

Patches:
We suggest adding mysqli_escape_string() sanitizers inside the validation functions to fix the vulnerabilities.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant