Can you spot the real vulnerability in this authentication system? (Most people get it wrong)

Posted by thenoopcoder@reddit | learnprogramming | View on Reddit | 9 comments

Can you spot the real vulnerability in this authentication system? (Most people get it wrong)

A web application uses the following authentication flow:

User logs in with username + password

Server generates a session token and stores it in a cookie

The cookie is marked as HttpOnly and Secure

The application does NOT rotate session IDs after login

The same session ID is reused across multiple devices if credentials match

❓ Question:

Which of the following is the most serious security vulnerability in this design?

A) “HttpOnly and Secure flags are missing”

B) “Passwords are stored in plaintext”

C) “Session cookies can be stolen easily via WiFi”

D) “Using cookies for authentication is insecure”