santhoshr06 / CxFlowDemo

GNU General Public License v2.0
0 stars 0 forks source link

CX Second_Order_SQL_Injection @ src/main/java/org/cysecurity/cspf/jvl/controller/LoginValidator.java [master] #38

Open santhoshr06 opened 3 years ago

santhoshr06 commented 3 years ago

Second_Order_SQL_Injection issue exists @ src/main/java/org/cysecurity/cspf/jvl/controller/LoginValidator.java in branch master

The application's stmt.executeUpdate method executes an SQL query with BinaryExpr, at line 43 of src\main\webapp\changeCardDetails.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. The attacker may be able to write arbitrary data to the database, which is then retrieved by the application with rs in processRequest method at line 52 of src\main\java\org\cysecurity\cspf\jvl\controller\LoginValidator.java. This data then flows through the code, until it is used directly in the SQL query without sanitization, and then submitted to the database server for execution. This may enable a Second-Order SQL Injection attack.

Severity: High

CWE:89

Vulnerability details and guidance

Internal Guidance

Checkmarx

Training Recommended Fix

Lines: 52


Code (Line #52):

                                   rs=stmt.executeQuery("select * from users where username='"+user+"' and password='"+pass+"'");

santhoshr06 commented 3 years ago

Issue still exists.

santhoshr06 commented 3 years ago

Issue still exists.

santhoshr06 commented 3 years ago

Issue still exists.

santhoshr06 commented 3 years ago

Issue still exists.

santhoshr06 commented 3 years ago

Issue still exists.

santhoshr06 commented 3 years ago

Issue still exists.

santhoshr06 commented 3 years ago

Issue still exists.

santhoshr06 commented 3 years ago

Issue still exists.

santhoshr06 commented 3 years ago

Issue still exists.

santhoshr06 commented 3 years ago

Issue still exists.

santhoshr06 commented 3 years ago

Issue still exists.

santhoshr06 commented 3 years ago

Issue still exists.