What is Sensitive Data Exposure?

Sensitive data exposure occurs when confidential information such as passwords, credit card numbers, health records, or API keys is inadvertently exposed, stored insecurely, or transmitted without proper protection. Unlike direct attacks, this vulnerability often stems from poor security practices or misconfigurations.

🧬 Common Types of Sensitive Data

🌐 Real-World Examples

Example 1: Exposed `.git` Directory

If the .git folder is publicly accessible, an attacker can download the source code and discover hardcoded secrets.

https://example.com/.git/config
https://example.com/.env

Example 2: Unencrypted Transmission

Sending login credentials over HTTP allows attackers to intercept data using packet sniffers.

POST /login HTTP/1.1
Host: example.com
Content-Type: application/x-www-form-urlencoded

username=admin&password=123456

This should always be transmitted over HTTPS with proper SSL/TLS.

Example 3: Verbose API Responses

Some APIs return sensitive internal fields in JSON responses unintentionally.

{
  "user": {
    "id": 101,
    "email": "user@example.com",
    "password_hash": "$2y$10$AbCdEf...",
    "auth_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
  }
}

Response fields must be sanitized before being sent to the client.

🔎 How to Detect Sensitive Data Exposure

🛡️ Prevention & Remediation

🧰 Tools for Discovery & Testing

💡 Pro Tips