CISSP practice question · Software Development Security
A web application keeps the same session ID before and after login. An attacker plants a known session ID in a victim's…
A web application keeps the same session ID before and after login. An attacker plants a known session ID in a victim's browser, waits for the victim to sign in, and then uses that ID to act as the victim. Which fix BEST addresses this?
- AIncrease the session ID length to 256 bits
- BIssue a new session ID when authentication succeeds
- CSet the Secure flag on the session cookie
- DExtend the session idle timeout
Show the answer and explanation
Correct answer: B) Issue a new session ID when authentication succeeds
Session fixation is prevented by issuing a new session identifier when authentication succeeds (and at any privilege change), so a planted ID never becomes authenticated.
Why each option is right or wrong
- A) Incorrect. Longer IDs stop guessing, but the attacker is not guessing: they set the ID themselves and wait for it to be authenticated.
- B) Correct. Regenerating the session ID at login means the ID the attacker planted remains unauthenticated, while the victim gets a fresh ID the attacker does not know.
- C) Incorrect. The Secure flag keeps the cookie off unencrypted connections. It does not prevent a planted session ID from being used after login.
- D) Incorrect. A longer timeout would give the attacker more time to use the session. Timeout length does not address fixation.
- Exam domain
- Software Development Security · 10% of CISSP
- Question type
- Multiple choice (one answer)
Related CISSP questions
- A research database allows only aggregate queries such as counts and averages.Software Development Security
- A web application connects to its database using the database owner account.Software Development Security
- A team has written a parser for a proprietary binary file format received from external partners.Software Development Security
- A DevSecOps pipeline runs SAST and SCA on every build, but the results only appear on a dashboard, and critical findings…Software Development Security
All 110 free CISSP questions by domain · 15 sample questions on one page
Practise the full CISSP exam
This question is one of a small free sample from the CertRidge CISSP bank. Full practice exams match the real exam's length, time limit and domain weights, explain every option, and Review Mode re-drills the questions you miss.
Original question written from the official exam guide. Not affiliated with ISC2; never copied from the real exam.