Errors and releases that break pages · senior
Cached pages that show another user data
When users see another user account, treat it as a security incident at once. The cause is usually a shared cache (CDN or server) that stored a personal page without the user in the key.
Explain it out loud
Explain it out loud to an AI interviewer that follows up, and see where your answer is thin.
Practise by voiceThe notes
What you must know
- Declare a security incident, bring in the incident lead and security, and keep evidence (headers, timestamps, request ids).
- Stop it: turn off CDN caching for signed-in pages, purge the cache, and roll back the recent config or code change. If unsure, take the page down rather than leak more.
- Find the layer: response headers of a leaked page (Age, x-cache: HIT, Cache-Control), request ids compared between users, then server-side caches ("use cache", ISR, a module-level variable or a cache keyed without the user id).
- Cause here: a CDN rule cached every GET with no cache headers. The account page had no Cache-Control: private, and the cache key ignored the session cookie.
- Second wave: a server-side cache whose key left out the user, so purging the CDN alone did not fix it.
- Fix: Cache-Control: private, no-store on personalised responses; CDN rules that never cache requests carrying a session cookie or Authorization; the user id in every server cache key.
- Keep Next.js patched. The Nov 2026 security releases fixed cross-tenant use cache leaks in Cache Components apps.
- Prevent: an automated test that logs in as two users and compares responses and headers, and a review of CDN configuration changes.
The red pen
Common traps: mistake → fix
Mistake: Purging the CDN fixes it
Fix: server-side caches can hold the leak too.
Mistake: Personal pages are safe because they need a login
Fix: a shared cache can serve them to others.
Mistake: It is a bug, not a security matter
Fix: exposure of personal data needs the security process.
Easy to hard
Questions interviewers ask, easy to hard
- Users report they can see another user account details. What do you do first?
- How do you find which layer served the wrong page?
- What headers should a personalised response have?
- How would you test for this in CI?
Explain it out loud
Explain it out loud to an AI interviewer that follows up, and see where your answer is thin.
Practise by voiceYour first interview is free
Sign up and start with a 15-minute interview with the full report, and an English conversation. No card needed.