MITRE’s description of CWE-524: The code uses a cache that contains sensitive information, but the cache can be read by an actor outside of the intended control sphere.
Common consequences MITRE lists
- Confidentiality: Read Application Data
If a private page is cached under a public key, the next visitor, or an attacker who requests the same URL, receives someone else’s data.
- Send
Cache-Control: no-storeorprivateon authenticated and personalized responses. - Configure shared caches to bypass or key on authentication, and to ignore path tricks such as an added static-file extension.
- Test that a private response is never served from cache to a different user.
Guides on this site
Practice
- Repair a real proxy and shared cache · Local project
References
List data from MITRE; the name, definition and consequences are from MITRE’s CWE 4.20 catalogue. A guide is listed as the main subject when the weakness is what the guide is about, and as covering it when a dedicated section or worked example addresses it.
CWE content: Copyright © 2006–2026, The MITRE Corporation. CWE, CWSS, CWRAF, and the CWE logo are trademarks of The MITRE Corporation. CWE™ is free to use by any organization or individual for any research, development, and/or commercial purposes, per these CWE Terms of Use. Accordingly, The MITRE Corporation hereby grants you a non-exclusive, royalty-free license to use CWE for research, development, and commercial purposes. Any copy you make for such purposes is authorized on the condition that you reproduce MITRE’s copyright designation and this license in any such copy. CWE is a trademark of The MITRE Corporation. CWE Terms of Use.