Sensitive Data Exposure

When apps accidentally expose private information like credit cards, SSNs, or passwords, it's called "Sensitive Data Exposure" - one of the most dangerous security problems.

Critical Risk!

According to OWASP, sensitive data exposure is the #3 most critical web application security risk.

Types of Sensitive Data

  • Credit card numbers
  • Social Security Numbers
  • Passwords & API keys
  • Health records
  • Personal information
  • Business documents

Common Vulnerabilities

1. Unencrypted Data Transmission

When data is sent over HTTP instead of HTTPS, anyone on the same network can see it. It's like sending a postcard instead of a sealed letter!

2. Insecure API Endpoints

APIs that give away sensitive data without properly checking who's asking for it. This is like a bank teller giving account details to anyone who asks!

3. Improper Data Storage

Storing passwords and credit cards as plain text in databases. Like writing your ATM PIN directly on your debit card!

4. Client-side Exposure

Including sensitive info in HTML comments, JavaScript, or browser storage. It's like hiding your house key under the doormat - the first place attackers look!

5. Insecure Direct Object References (IDOR)

Allowing users to access other users' data by changing parameters in URLs or requests. Like being able to open someone else's mailbox just by changing the box number!

Real-World Example: Equifax Breach

Case Study: Equifax (2017)

In 2017, Equifax suffered one of the largest data breaches in history, exposing sensitive personal information of 147 million people - nearly half the US population.

  • Exposed data included SSNs, birth dates, addresses, and credit card numbers
  • The breach cost Equifax over $1.4 billion in cleanup costs
  • They agreed to pay up to $700 million in settlements

All because they failed to properly patch and secure their systems!

Lab Exercise

Your Mission: Find the Vulnerabilities

Put on your hacker hat and try to find all the sensitive data leaks in this app:

1 Create an account or use our demo account

2 Examine the profile page (note how data appears masked)

3 Check the HTML source code (right-click → View Page Source)

4 Open browser dev tools (F12) → Check Network, Console, Storage tabs

5 Try accessing these API endpoints after logging in:

/api/user-data/ (requires login)
/api/all-users/ (completely unsecured!)

Challenge: Find 5 Security Flaws

This application has at least 5 different ways sensitive data is leaked. Can you find them all? For each one, try to understand:

  1. What sensitive data is exposed
  2. How an attacker could find it
  3. How the vulnerability could be fixed

Hint: One API endpoint is completely public and exposes ALL users' data without any authentication - you don't even need to log in to access it!

Prevention Measures

Always use HTTPS for data transmission
Encrypt sensitive data at rest
Implement proper access controls for APIs
Never store sensitive data in client-side code
Use proper data masking techniques
Delete sensitive data when no longer needed
{% if user.is_authenticated %}
Your Lab Progress

You're logged in as {{ user.username }}

Ready to test your security skills?

Go to Your Profile
{% else %}
Start the Lab

To start the hands-on portion of this lab, you need to:

Login Register
{% endif %}