Deepshikha Paty
DI-ASM


Access the lab


What is Excessive Data Exposure?

It happens when an API gives too much information in its response β€” including private or sensitive data that should not be shared with the user.

How does it happen?

Example

  • A mobile shopping app displays a user's order summary.
  • But when analyzing the API response using a tool like Postman or a browser developer tool, the entire user object is returned, including sensitive data like:
    • Full address
    • Email ID
    • Credit card number (masked or unmasked)
    • Internal user roles or permissions

Even though only the order summary is shown on the screen, the backend sends more data than necessary, which can be exploited if intercepted or accessed improperly.


🎯 Why is it risky?

βœ… How to prevent this?

  1. Only send needed data from the backend β€” not everything.
  2. Never depend on the front-end to hide private info.
  3. Regularly check API responses to make sure no sensitive info is leaked.
  4. Avoid generic methods like to_string() or to_json() that return everything.
  5. Test APIs (automated + manual) to make sure only safe data is returned.