satyamchaurasiapersistent / JavaVulnerableLab

lab
0 stars 0 forks source link

CX Blind_SQL_Injections @ src/main/webapp/vulnerability/DisplayMessage.jsp [master] #98

Closed satyamchaurasiapersistent closed 2 years ago

satyamchaurasiapersistent commented 2 years ago

Blind_SQL_Injections issue exists @ src/main/webapp/vulnerability/DisplayMessage.jsp in branch master

The application's rs=stmt.executeQuery method executes an SQL query with executeQuery, at line 16 of src\main\webapp\vulnerability\DisplayMessage.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. If an exception is thrown by the database code, it is caught and handled. An attacker could still use inferential or boolean exploitation techniques to retrieve the data, by altering the user input ""msgid"". This is read in the rs=stmt.executeQuery method, at line 16 of src\main\webapp\vulnerability\DisplayMessage.jsp, and used without sanitization in the SQL query that is sent to the database server.  This may enable a Blind SQL Injection attack.

Severity: Low

CWE:89

Vulnerability details and guidance

Checkmarx

Training Recommended Fix

Lines: 16


Code (Line #16):

             rs=stmt.executeQuery("select * from UserMessages where msgid="+request.getParameter("msgid"));

satyamchaurasiapersistent commented 2 years ago

Issue still exists.

satyamchaurasiapersistent commented 2 years ago

Issue still exists.

satyamchaurasiapersistent commented 2 years ago

Issue still exists.