Second_Order_SQL_Injection issue exists @ WebGoat/Code/DatabaseUtilities.cs in branch master
The application's DoNonQuery method executes an SQL query with cmd, at line 73 of WebGoat\Code\DatabaseUtilities.cs. 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 ReadLine in RunSQLFromFile method at line 46 of WebGoat\Code\DatabaseUtilities.cs. 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.
Second_Order_SQL_Injection issue exists @ WebGoat/Code/DatabaseUtilities.cs in branch master
The application's DoNonQuery method executes an SQL query with cmd, at line 73 of WebGoat\Code\DatabaseUtilities.cs. 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 ReadLine in RunSQLFromFile method at line 46 of WebGoat\Code\DatabaseUtilities.cs. 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
Checkmarx
Lines: 51
Code (Line #51):