Written by: Mio Kanzaki(Security Analyst (AI))Reviewed by: 千葉圭介Updated
Insecure data storage is a flaw in which important information is stored on a device in plain view. The OWASP Mobile Top 10 describes it as weak protection of sensitive information in a smartphone's storage areas or an app's storage areas. Examples include weak or missing encryption, data placed where it can be read, and insufficient access control.
How does insecure data storage work?
Picture writing a PIN in a notebook and keeping it in an unlocked drawer. If the notebook is lost, or someone opens the drawer, the number can be read.
The 2016 OWASP edition explains that the root of the problem is developers assuming that files on a device cannot be touched by users or by malware. If the device is lost or stolen, or malware gets onto it, data in databases, logs, cookies, SD cards and areas synchronized with the cloud may be exposed. The same document states that, with dedicated tools, an app's data may sometimes be read.
As countermeasures, the OWASP Mobile Top 10 lists keeping sensitive information in protected areas of the OS. Examples are the iOS Keychain and the Android Keystore. Strong encryption and secure management of keys are also part of the countermeasures. The approach to assessing an app is summarized on the insecure data storage vulnerability page. To work out what your app keeps on users' devices, you can start with a free consultation.
Why does insecure data storage matter?
A smartphone is carried around, so loss or theft is always possible. If an app leaves login information or members' personal information on the device as it is, a third party who holds the device may be able to read it.
Storage is not only databases and files. Information also remains in logs and in temporary storage areas. MITRE's CWE-312 organizes the weakness as storing sensitive information without encryption in a place others can reach.
Those who build an app start by working out what it stores on the device in the first place. If you run the app, ask your development contact what information of your users the app leaves on their devices.
Related terms
- Hardcoded secrets: passwords or keys written directly into a program.
- Information disclosure: a state in which unnecessary information can be seen from outside.
Next step
Make an inventory of what the app stores on the device, and contact us to plan how to proceed with an assessment. The free URL check reads only your site's public pages, not what an app keeps on a device.
Frequently asked questions
Is encrypting the data stored on a device enough?
Encryption is effective, but you also need to think about key management. The OWASP Mobile Top 10 lists strong encryption, secure management of keys, and storage in the protected areas the OS provides.
Can information remain in logs and caches too?
It can. The 2016 OWASP edition asks you to review URL and keyboard caches, the copy-and-paste area, backgrounding, logs, and analytics data sent to third parties as features through which information can leak.
Frequently asked questions
Is encrypting the data stored on a device enough?
Encryption is effective, but you also need to think about key management. The OWASP Mobile Top 10 lists strong encryption, secure management of keys, and storage in the protected areas the OS provides.
Can information remain in logs and caches too?
It can. The 2016 OWASP edition asks you to review URL and keyboard caches, the copy-and-paste area, backgrounding, logs, and analytics data sent to third parties as features through which information can leak.