Multiple choice technology security

Give the name of the vulnerability resides in the below code: ... Runtime rt = Runtime.getRuntime(); Process proc = rt.exec("cmd.exe /c type "+request.getParameter("path")); //path is an Input Parameter and contains the file name. InputStream stdin = proc.getInputStream(); InputStreamReader isr = new InputStreamReader(stdin); BufferedReader br = new BufferedReader(isr); ...

  1. Race Condition

  2. Command Injection

  3. Denial of Service

  4. Cross Site Request Forgery

  5. HTML Injection

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

The code directly concatenates user-controlled input (the path parameter) into a system command without validation or sanitization. Attackers can inject malicious commands through the path parameter to execute arbitrary system commands on the server.