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 @ src/main/java/org/cysecurity/cspf/jvl/controller/UsernameCheck.java [refs/heads/master] #38

Open
github-actions bot opened this issue Mar 25, 2021 · 1 comment

Comments

@github-actions
Copy link

github-actions bot commented Mar 25, 2021

SQL_Injection issue exists @ src/main/java/org/cysecurity/cspf/jvl/controller/UsernameCheck.java in branch refs/heads/master

The application's processRequest method executes an SQL query with executeQuery, at line 52 of src\main\java\org\cysecurity\cspf\jvl\controller\UsernameCheck.java. 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 ""username""; this input is then read by the processRequest method at line 43 of src\main\java\org\cysecurity\cspf\jvl\controller\UsernameCheck.java. 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

Checkmarx

Training
Recommended Fix

Lines: 43


Code (Line #43):

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

@github-actions
Copy link
Author

Issue still exists.

@github-actions github-actions bot reopened this Mar 25, 2021
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

0 participants