Edge caching strategy handles personalized content
Why it matters
CWE-525 (Information Exposure Through Browser Caching) is the formal classification, but the concrete failure is simpler: if a user-specific API response is cached at the CDN edge without Cache-Control: private, the next user who hits the same edge node may receive another user's private data. This is a data-exposure bug masquerading as a caching misconfiguration. ISO 25010:2011 time-behaviour flags the caching intent; the security consequence is personally identifiable or account-sensitive data served cross-user from an edge cache.
Severity rationale
Medium because edge-caching personalized data exposes user-specific information to other users, but exploitation requires the attacker to hit the same edge node shortly after the victim — reducing but not eliminating real-world risk.
Remediation
Every API route that returns user-specific data must set Cache-Control: private, no-cache. Verify this is applied at the route level, not overridden by a global CDN header rule.
// app/api/user/profile/route.ts
export async function GET(request: Request) {
const profile = await getUserProfile(request)
return Response.json(profile, {
headers: { 'Cache-Control': 'private, no-cache' },
})
}
DetectionPro
The detection method for this pattern is part of AuditBuffet Pro.
The full method (what to look for, pass and fail conditions, and how results get reported) ships inside the Performance Deep Dive Audit. The pattern definition, severity rationale, and remediation remain openly licensed under CC-BY-4.0.
External references
- cwe · CWE-525 — Use of Web Browser Cache Containing Sensitive Information
- iso-25010:2011 · time-behaviour — Time Behaviour (performance efficiency)
Taxons
History
- 2026-04-18·v1.0.0·Initial import from performance-deep-dive·automated