# Top 10 2017-A6-Sensitive Data Exposure

From OWASP

==The Top 10-2017 Wiki is under Construction. The Content is Not Finished yet.==
==Edits to this page will be lost. If you wish a change, please file an issue on GitHub. ==

← A5-Security Misconfiguration | 2017 Table of Contents 2017 Top 10 List | A7-Insufficient Attack Protection →

Threat Agents | Attack Vectors | Security Weakness | Technical Impacts | Business Impacts
--- | --- | --- | --- | ---
Application Specific | Exploitability DIFFICULT | Prevalence UNCOMMON | Detectability AVERAGE | Impact SEVERE | Application / Business Specific
Consider who can gain access to your sensitive data and any backups of that data. This includes the data at rest, in transit and even in your customers’ browsers. Include both external and internal threats. | Attackers typically don’t break crypto directly. They break something else, such as steal keys, do man-in-the-middle attacks, or steal clear text data off the server, while in transit, or from the user’s browser. | The most common flaw is simply not encrypting sensitive data. When crypto is employed, weak key generation and management, and weak algorithm usage is common, particularly weak password hashing techniques. Browser weaknesses are very common and easy to detect, but hard to exploit on a large scale. External attackers have difficulty detecting server side flaws due to limited access and they are also usually hard to exploit. | Failure frequently compromises all data that should have been protected. Typically, this information includes sensitive data such as health records, credentials, personal data, credit cards, etc. | Consider the business value of the lost data and impact to your reputation. What is your legal liability if this data is exposed? Also consider the damage to your reputation.

Am I Vulnerable To 'Sensitive Data Exposure'? The first thing you have to determine is which data is sensitive enough to require extra protection. For example, passwords, credit card numbers, health records, and personal information should be protected. For all such data: Is any of this data stored in clear text long term, including backups of this data? Is any of this data transmitted in clear text, internally or externally? Internet traffic is especially dangerous. Are any old / weak cryptographic algorithms used? Are weak crypto keys generated, or is proper key management or rotation missing? Are any browser security directives or headers missing when sensitive data is provided by / sent to the browser? And more ... For a more complete set of problems to avoid, see ASVS areas Crypto (V7), Data Prot (V9), and SSL/TLS (V10). | How Do I Prevent 'Sensitive Data Exposure'? The full perils of unsafe cryptography, SSL/TLS usage, and data protection are well beyond the scope of the Top 10. That said, for all sensitive data, do the following, at a minimum: Considering the threats you plan to protect this data from (e.g., insider attack, external user), make sure you encrypt all sensitive data at rest and in transit in a manner that defends against these threats. Don’t store sensitive data unnecessarily. Discard it as soon as possible. Data you don’t retain can’t be stolen. Ensure strong standard algorithms and strong keys are used, and proper key management is in place. Consider using FIPS 140 validated cryptographic modules. Ensure passwords are stored with an algorithm specifically designed for password protection, such as bcrypt, PBKDF2, or scrypt. Disable autocomplete on forms requesting sensitive data and disable caching for pages that contain sensitive data.
Example Attack Scenarios Scenario #1: An application encrypts credit card numbers in a database using automatic database encryption. However, this data is automatically decrypted when retrieved, allowing an SQL injection flaw to retrieve credit card numbers in clear text. Alternatives include not storing credit card numbers, using tokenization, or using public key encryption. Scenario #2: A site simply doesn’t use TLS for all authenticated pages. An attacker simply monitors network traffic (like an open wireless network), and steals the user’s session cookie. The attacker then replays this cookie and hijacks the user’s session, accessing the user’s private data. Scenario #3: The password database uses unsalted hashes to store everyone’s passwords. A file upload flaw allows an attacker to retrieve the password database. All of the unsalted hashes can be exposed with a rainbow table of precalculated hashes. | References OWASP For a more complete set of requirements, see ASVS req’ts on Cryptography (V7), Data Protection (V9), and Communications Security (V10) OWASP Cryptographic Storage Cheat Sheet OWASP Password Storage Cheat Sheet OWASP Transport Layer Protection Cheat Sheet OWASP Testing Guide: Chapter on SSL/TLS Testing External CWE Entry 310 on Cryptographic Issues CWE Entry 312 on Cleartext Storage of Sensitive Information CWE Entry 319 on Cleartext Transmission of Sensitive Information CWE Entry 326 on Weak Encryption

← A5-Security Misconfiguration | 2017 Table of Contents 2017 Top 10 List | A7-Insufficient Attack Protection →

© 2002-2017 OWASP Foundation This document is licensed under the Creative Commons Attribution-ShareAlike 3.0 license. Some rights reserved.
Retrieved from "https://www.owasp.org/index.php?title=Top_10_2017-A6-Sensitive_Data_Exposure&oldid=229005"
Categories:

- OWASP Top Ten Project
- OWASP Top Ten 2017 Project