Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CX SQL_Injection @ root/login.jsp [develop] #10

Open
SoniaDias opened this issue Jun 25, 2022 · 9 comments
Open

CX SQL_Injection @ root/login.jsp [develop] #10

SoniaDias opened this issue Jun 25, 2022 · 9 comments

Comments

@SoniaDias
Copy link
Owner

SQL_Injection issue exists @ root/login.jsp in branch develop

The application's stmt.executeQuery method executes an SQL query with executeQuery, at line 24 of root\password.jsp. The application constructs this SQL query by embedding an untrusted string into the query without proper sanitization. The concatenated string is submitted to the database, where it is parsed and executed accordingly.
An attacker would be able to inject arbitrary syntax and data into the SQL query, by crafting a malicious payload and providing it via the input ""password""; this input is then read by the = method at line 8 of root\login.jsp. This input then flows through the code, into a query and to the database server - without sanitization.
This may enable an SQL Injection attack.

Severity: High

CWE:89

Vulnerability details and guidance

Internal Guidance

Checkmarx

Training
Recommended Fix

Lines: 35 7 40 8


Code (Line #35):

			Cookie[] cookies = request.getCookies();

Code (Line #7):

String username = (String) request.getParameter("username");

Code (Line #40):

						basketId = cookie.getValue();

Code (Line #8):

String password = (String) request.getParameter("password");

@SoniaDias
Copy link
Owner Author

Issue still exists.

8 similar comments
@SoniaDias
Copy link
Owner Author

Issue still exists.

@SoniaDias
Copy link
Owner Author

Issue still exists.

@SoniaDias
Copy link
Owner Author

Issue still exists.

@SoniaDias
Copy link
Owner Author

Issue still exists.

@SoniaDias
Copy link
Owner Author

Issue still exists.

@SoniaDias
Copy link
Owner Author

Issue still exists.

@SoniaDias
Copy link
Owner Author

Issue still exists.

@SoniaDias
Copy link
Owner Author

Issue still exists.

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

No branches or pull requests

1 participant