Multiple choice technology security

Identify the name of the vulnerability exist in the below code:

1 ...   
2 public class ShowUserDetailsAction extends HttpServlet   
3 {   
4 private String currentUser;     
5 public void doPost(HttpServletRequest req, HttpServletResponse res)   
6 {   
7 try   
8 {   
9  currentUser = req.getParameter("userID");  
10  RequestDispatcher rd = getServletContext().getRequestDispatcher ("/ShowDetails.jsp");  
11  if (!"".equals(currentUser))  
12  {  
13     
14   ArrayList userInfo = new ArrayList();  
15   LoginDAO objLoginDAO = new LoginDAO();  
16   userInfo = objLoginDAO.getUserInfo(currentUser);  
17     
18   if (userInfo!=null && (userInfo.size()!= 0))  
19   {  
20    req.setAttribute("UserInfo", userInfo);  
21   }  
22   else  
23   {  
24    req.setAttribute("NoUser", "true");  
25   }  
26  }  
27  rd.forward(req,res);  
28 } catch (Exception e)  
29 {  
30  log.debug(“Error Occurred:”+ e);  
31 }  
32 }  
33 }   
34 ...

  1. URL Tampering

  2. Brute Forcing

  3. Race Condition

  4. HTML Injection

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

The servlet uses a shared instance variable currentUser (line 4) to store state across requests. Because servlets are singletons by default and handle multiple concurrent threads, this leads to a race condition where one user's ID can overwrite another's, disclosing incorrect data.