CWE-219: Storage of File with Sensitive Data Under Web Root
The product stores sensitive data under the web document root with insufficient access control, which might make it accessible to untrusted parties.
How it's found
Storage of File with Sensitive Data Under Web Root is a specific, narrowly defined instance of a broader pattern. Testers confirm it with targeted code review and a proof-of-concept input that exercises the exact code path this weakness describes.
Besides public-facing web pages and code, products may store sensitive data, code that is not directly invoked, or other files under the web document root of the web server. If the server is not configured or otherwise used to prevent direct access to those files, then attackers may obtain this sensitive data.
Consequences
- Read Application Data
Mitigations
- Implementation/System Configuration: Avoid storing information under the web root directory.
- System Configuration: Access control permissions should be set to prevent reading/writing of sensitive files inside/outside of the web directory.
Where this fits in a TurboPentest engagement
This weakness is not covered by the automated black-box pentest. IntegSec pentesters cover it in a manual engagement.
Frequently asked questions
What is CWE-219?
The product stores sensitive data under the web document root with insufficient access control, which might make it accessible to untrusted parties.
How do you find Storage of File with Sensitive Data Under Web Root?
Storage of File with Sensitive Data Under Web Root is a specific, narrowly defined instance of a broader pattern. Testers confirm it with targeted code review and a proof-of-concept input that exercises the exact code path this weakness describes.
What is the impact of CWE-219?
Read Application Data
Does TurboPentest test for Storage of File with Sensitive Data Under Web Root?
This weakness is not covered by the automated black-box pentest. IntegSec pentesters cover it in a manual engagement.
Related CWEs
- Base weaknessCWE-552: Files or Directories Accessible to External Parties
- Base weaknessCWE-209: Generation of Error Message Containing Sensitive Information
- Base weaknessCWE-215: Insertion of Sensitive Information Into Debugging Code
- Base weaknessCWE-295: Improper Certificate Validation
- Base weaknessCWE-459: Incomplete Cleanup
- Base weaknessCWE-489: Active Debug Code
Written and reviewed by
Michel Chamberland - Founder & CEO, IntegSec
CISSP, OSCP, OSCE, CEH, GIAC, CCSK · 20+ years in offensive security
Michel has spent 20+ years on offensive security teams including IBM X-Force Red and Trustwave SpiderLabs, leading penetration tests, red team engagements, and breach response for Fortune 500 customers. He is the founder of IntegSec and the architect of TurboPentest.
Find these issues before an attacker does
TurboPentest runs an agentic AI pentest against your target and reports findings with proof, from $99 per target.
Start a pentest