Skip to main content
Security guideReviewed

Sensitive data exposure: when your application hands over more than the screen needs

Sensitive data exposure does not need a break-in.

A signed-in caller makes a request they are allowed to make, and the response, the error, the export, a cached copy or a log line holds more about a person or the business than the task required. This guide covers each of those five places, what OWASP, MITRE, ASVS 5.0 and the HTTP caching standard say about them, and how to keep a field list per endpoint. It comes with a field-by-field table, a response-diff exercise and a lab you can run on your own computer.

Field-level data-minimisation table, response-diff exercise and lab

Part 1 is a table for an invented customer record: twelve fields, six places each can travel, and for every cell whether the field is required, to be removed or to be shortened, with the reason and what backs it. Part 2 is the response-diff exercise, with the three tests that tell required, removable and redactable fields apart.

How to use it

Part 3 is an illustration, not a client system: an invented customer service on 127.0.0.1 in a careless and a careful version, a script that prints the differences, and a regression test that fails on the careless version and passes on the careful one, in six files that import only node: modules and install no packages. Every output was copied from one recorded run on Node.js 26.0.0.

sensitive-data-exposure.txt

Introduction7 lines

FIELD-LEVEL DATA-MINIMISATION TABLE, RESPONSE-DIFF EXERCISE AND LAB Use it on an application you own, or one you are authorised in writing to test, with test accounts and test records. Nothing here is for collecting data from a service that belongs to someone else. Part 1 is the table. It works without the lab. Part 2 is the response-diff exercise: how to compare a screen with its response and decide what each extra field is. Part 3 is the lab: an illustration with invented data that runs the comparison on your own computer.

What sensitive data exposure means when nobody broke in

Sensitive data exposure is an application giving out information about a person or the business that the recipient did not need and should not have.

This guide is about the version with no break-in at all. The caller signed in properly and asked for something they were allowed to ask for, and the application answered with more than the task required: a profile response that includes a password hash, an error that quotes a database query, an export with every column, a private page left in a shared cache, a log that keeps customers' phone numbers. Nothing was bypassed. The application handed it over.

MITRE's catalogue of software weaknesses names the general case CWE-200, Exposure of Sensitive Information to an Unauthorized Actor: the product exposes sensitive information to an actor that is not explicitly authorised to have access to that information. The kinds of sensitive information the entry lists include private, personal information such as personal messages, financial data, health records, geographic location or contact details; business secrets and intellectual property; and the product's own code or internal state.

It describes three ways an exposure can occur, and the first is the subject of this guide: the code explicitly inserts sensitive information into resources or messages that are intentionally made accessible to unauthorised actors, but should not contain the information.

In those terms, a caller can be authorised to make a request and still be an unauthorised actor for some of what comes back.

A narrower entry fits an over-full response closely. CWE-201, Insertion of Sensitive Information Into Sent Data, is code that transmits data to another actor when a portion of the data includes sensitive information that should not be accessible to that actor.

Its mitigations include specifying which data should be regarded as sensitive, considering which types of users should have access to which types of data, and removing any information that is not necessary to the functionality.

You will also see the problem called information disclosure, or a data exposure vulnerability. CWE-200 lists Information Disclosure as an alternate term and marks it as discouraged, saying the term is frequently used in vulnerability advisories to describe a consequence or technical impact, for any vulnerability that has a loss of confidentiality.

Its mapping notes add that CWE-200 is commonly misused to represent the loss of confidentiality in a vulnerability, that from the CWE perspective loss of confidentiality is a technical impact and not a root cause error, and that as of CWE 4.20 over 400 CWE entries can lead to one.

The distinction is useful outside CWE too. When a report says "information disclosure", ask which mistake produced it, because the fix belongs to the mistake.

What happened to the OWASP category of the same name

Sensitive Data Exposure used to be a category in the OWASP Top 10. The 2017 edition lists it as A3:2017. In the 2021 edition the second category is A02:2021 Cryptographic Failures, and its page says the category was previously known as Sensitive Data Exposure, which it calls more of a broad symptom rather than a root cause, with the focus now on failures related to cryptography, or the lack of it, which often lead to exposure of sensitive data.

The 2025 edition keeps the newer name. Its introduction says A04:2025 Cryptographic Failures falls two spots, from second to fourth, and that the category often leads to sensitive data exposure or system compromise.

The same introduction gives "Sensitive Data Exposure" as an example of a symptom type of CWE, in contrast to root cause types such as "Cryptographic Failure", and says OWASP decided to focus on the root cause whenever possible.

So the phrase did not stop meaning something when the category was renamed. OWASP moved its list towards causes, and exposure is what more than one of those causes produces. This guide stays with a cause that has nothing to do with cryptography: data the application sent, stored or wrote down because nobody decided it should not.

Excessive data exposure, the API name for it

OWASP's API Security Top 10 had a category with a similar name, API3:2019 Excessive Data Exposure. The release notes for the 2023 edition say the project combined Excessive Data Exposure and Mass Assignment, focusing on their common root cause, object property level authorisation validation failures.

Both now sit under API3:2023 Broken Object Property Level Authorization. Its page says an API endpoint is vulnerable if it exposes properties of an object that are considered sensitive and should not be read by the user, which it notes was previously named Excessive Data Exposure, or if it allows a user to change, add or delete the value of a sensitive object property the user should not be able to access, previously named Mass Assignment.

Why hiding a field on the page does not remove it from the response

A screen is a view of a response, not a limit on it.

When a page loads a customer's profile, the server sends a block of data and the page's code picks out the parts it displays. Whatever the code leaves out is still in the response, and the person at the keyboard can read all of it: a browser's developer tools list every request the page made and the full body of every answer. No rule is broken by looking, because the response was sent to them.

OWASP's API3:2023 page describes how responses come to be over-full. It says APIs tend to expose endpoints that return all of an object's properties, which it calls particularly valid for REST APIs, and that inspecting API responses is enough to identify sensitive information in the representations of returned objects.

Its prevention advice includes avoiding generic methods such as to_json() and to_string() and cherry-picking the specific object properties you want to return.

The same default appears in the documentation of tools that applications are built with. Prisma's documentation for ORM v7 says that by default Prisma Client returns all scalar fields for a model and no relations, and that a query which passes none of select, include or omit returns all scalar fields for the model.

The Next.js data security guide shows a page that passes a whole database row from a Server Component to a Client Component and marks it as exposing all of the row's fields to the client.

The guide also says Server Action return values are serialised and sent to the client, and that an action should return only what the UI needs, not raw database records.

The lab on this page shows the size of the gap. Its invented profile screen displays four fields and the last four characters of a fifth. The careless version of the profile route returns all twelve fields of the stored record.

Seven fields the screen never shows travel to the browser, a password hash, a staff note and a session id among them, and the payment reference arrives whole although only its ending is displayed.

The fix is on the server. Styling a field as hidden, leaving it out of the template and deleting it in the page's script all happen after the data has arrived.

Allowed to see the record is not the same as needing every field

Access control answers one question: may this caller reach this record?

It is a yes or no about the whole record. Data minimisation asks a second question once the answer is yes: which parts of the record does this screen, for this caller, need? A customer may certainly see their own account.

Their browser still has no need for the note a staff member wrote about them, the flag that sends their refunds to a supervisor, or the row number the database uses.

ASVS 5.0 treats the second question as a requirement of its own. Requirement 15.3.1, at Level 1, asks that the application only returns the required subset of fields from a data object, and gives as an example that it should not return an entire data object, as some individual fields should not be accessible to users.

Requirement 14.2.6, at Level 3, asks that the application only returns the minimum required sensitive data for its functionality; its example is returning only some of the digits of a credit card number and not the full number.

Where fields differ by role, requirement 8.2.3, at Level 2, asks that field-level access is restricted to consumers with explicit permissions to specific fields.

OWASP's API3:2023 has a matching item in its prevention list: keep returned data structures to the bare minimum, according to the business and functional requirements for the endpoint.

Staff screens show the difference clearly. A support agent may be entitled to open any customer's record, so nobody questions what the customer list sends. In the lab, the staff list screen shows an id, a name and an email address for each match, and the careless search route returns nine more fields for every customer it finds, the password hash and the date of birth included.

A list, a search or an autocomplete route multiplies whatever one record leaks by the number of rows it returns.

Three answers are possible for each field, and the table on this page works through them for an invented customer record. The field is required: the screen shows it or the task uses it. The field is removable: nothing the caller sees depends on it.

Or the field can be shortened or redacted: the screen needs part of it, such as the last four characters of a payment reference, and the server can send that part alone.

What error messages give away

An error message is a response too, written at the moment the application has least control over what it says.

MITRE's CWE-209, Generation of Error Message Containing Sensitive Information, describes a product that generates an error message including sensitive information about its environment, users or associated data. The entry gives two examples of what can follow. An attempt to exploit a path traversal weakness might yield the full pathname of the installed application.

A SQL injection attempt might not initially succeed, but an error message could reveal the malformed query, which would expose query logic and possibly even passwords or other sensitive information used within the query.

The OWASP Web Security Testing Guide v4.2 test for improper error handling, WSTG-ERRH-01, counts stack traces among the forms errors take, and says improper error handling can let attackers understand the APIs being used internally and gather the versions and types of the applications in use.

The OWASP Top 10:2025 added a category that takes in improper error handling, A10 Mishandling of Exceptional Conditions. One of that page's example scenarios begins with the words sensitive data exposure: improper handling or database errors that reveal the full system error to the user.

The attacker, it says, continues to force errors in order to use the sensitive system information to create a better SQL injection attack.

ASVS 5.0 requirement 16.5.1, at Level 2, says what the caller should get instead: a generic message is returned to the consumer when an unexpected or security-sensitive error occurs, ensuring no exposure of sensitive internal system data such as stack traces, queries, secret keys and tokens. CWE-209's mitigations say error messages should contain only minimal details that are useful to the intended audience and no one else, and that if errors must be captured in some detail they should be recorded in log messages, with thought given to what could occur if the log messages can be viewed by attackers.

The detail still has to go somewhere, or nobody can fix the fault. The pattern the lab's careful version uses is a generic message with a reference: the caller sees a short code, the log holds the detail under the same code, and support can connect the two without the customer ever seeing a query.

In the lab, one lookup fails in both versions. The careless version answers with the error text, the failing query, which contains the signed-in customer's email address, and a stack trace. The careful version answers with one plain sentence and a reference that begins with ERR-.

Personal data reaches error messages by ordinary routes: a query that failed with a customer's email address in its WHERE clause, a validation message that repeats what was typed, an upstream service's reply passed along unread. An error that quotes its input can also end up in places the response never would, such as a screenshot sent to support or an error tracker run by another company.

What an export should contain

An export is a response that leaves the application for good.

A CSV file is saved to a laptop, attached to an email, opened in a spreadsheet and uploaded to a mailing tool, and none of those copies can be recalled or corrected afterwards. The column list of an export deserves more attention than the field list of a screen for that reason. "Export everything" is the quickest version to build, and it looks like a feature.

The rule is the one a response follows, applied to a task in place of a screen. An export exists for a job: send the newsletter, reconcile the month's payments, give the accountant the invoice totals. Each job needs a few columns.

ASVS 5.0's data protection chapter names bulk extraction, alongside modification and excessive usage, as a further consideration for data protection, and its requirement 14.2.6, at Level 3, asks for only the minimum required sensitive data to be returned for the application's functionality.

In the lab, the mailing list export exists to send a newsletter, which needs a name and an email address. The careless version exports all twelve columns for every customer, so the file also holds each customer's phone number, postal address, date of birth, password hash, staff note and session id.

The careful version keeps a column list per purpose, exports two columns, and answers a purpose it has no list for with an error instead of a file.

  • Name the purpose. An export route that takes a purpose and looks up that purpose's column list cannot gain a column by accident.
  • Shorten inside the export as well. A reconciliation file may need the last four characters of a payment reference and not the reference.
  • Treat every generated file as a response. A PDF statement, a spreadsheet, a report emailed on a schedule and a webhook payload sent to another system each have a field list, whether or not anyone wrote it down.
  • Log the export as an event: who ran it, for which purpose and how many rows. The lab's careful version logs those three things, along with the time, a request identifier, the method, the route and the status, and none of the rows.

Where a personal response can end up stored, and which directive addresses which

A response does not always stop existing once the browser has shown it.

HTTP allows copies to be kept and reused, and RFC 9111, HTTP Caching, sorts the places that keep them into two kinds. A shared cache stores responses for reuse by more than one user, and the RFC says shared caches are usually, but not always, deployed as part of an intermediary.

A private cache is dedicated to a single user, and the RFC says private caches are often deployed as a component of a user agent. RFC 9110 section 3.5 says the most familiar form of user agent is the general-purpose web browser, though it adds that this is only a small percentage of implementations. The user agent this guide has in mind is a visitor's browser.

A content delivery network that keeps one copy of a response to serve many visitors is a shared cache in that sense. RFC 9110 lists content delivery networks that use gateway caching among the cache architectures deployed across the web. The OWASP Top 10:2025 page for A04 says to disable caching for responses that contain sensitive data, and that this includes caching in your CDN, web server and any application caching, with Redis as its example. The 2017 and 2021 pages carry the same instruction in a shorter form.

The default is the part worth knowing. RFC 9111 says that although caching is an entirely optional feature of HTTP, it can be assumed that reusing a cached response is desirable and that such reuse is the default behaviour when no requirement or local configuration prevents it.

Section 3 says a cache must not store a response unless a list of conditions holds. The conditions include that the no-store directive is not present; that, for a shared cache, the private directive is either not present or allows a shared cache to store a modified response; and that the response contains at least one item from a further list, which includes a status code defined as heuristically cacheable.

RFC 9110 says a 200 response is heuristically cacheable unless the method definition or explicit cache controls indicate otherwise.

One of section 3's conditions concerns authenticated requests. A shared cache must not store the response to a request that carried an Authorization header field unless a response directive is present that explicitly allows shared caching. The list has no matching condition for a request that carried a session cookie, and section 7.3 notes that a Set-Cookie response header field does not inhibit caching.

On this page's reading, then, a 200 response to a GET request authenticated by a cookie, sent with no Cache-Control header, passes each of the conditions quoted here.

Whether a particular cache stores it depends on that product and how it is configured, and that part is this page's point, not the RFC's. Section 3 does note that in normal operation some caches will not store a response that has neither a cache validator nor an explicit expiration time, though they are not prohibited from doing so.

The careful course is to state what you want on every personal response and not lean on a default.

Which directive addresses which store

Three Cache-Control response directives sit close together in name, and each answers a different question. 2 min read

Two limits of a cache directive

RFC 9111 section 5.2.2.5 says no-store is not a reliable or sufficient mechanism for ensuring privacy: in particular, malicious or compromised caches might not recognise or obey the directive, and communications networks might be vulnerable to eavesdropping. 1 min read

What belongs in a log line and what does not

A log is a copy too, and it is read by a different set of people from the ones who see the screen.

MITRE's CWE-532, Insertion of Sensitive Information into Log File, describes a product that writes sensitive information to a log file, and says logging sensitive user data, full path names or system information often provides attackers with an additional, less-protected path to acquiring the information.

ASVS 5.0's logging chapter states the principle in its control objective: logs should not include sensitive personal data unless legally required, and any logged data must be protected as a high-value asset. Its general logging section says it is critical to log only what is necessary.

Requirement 16.2.1, at Level 2, asks that each log entry includes the necessary metadata, such as when, where, who and what, to allow a detailed investigation of the timeline. Requirement 16.2.5, also Level 2, asks that when sensitive data is logged, the application enforces logging based on the data's protection level.

It gives two examples: it may not be allowed to log certain data, such as credentials or payment details, and other data, such as session tokens, may only be logged by being hashed or masked, either in full or partially.

Requirement 16.3.2, a Level 2 requirement that failed authorisation attempts are logged, adds for Level 3 the logging of all authorisation decisions, including when sensitive data is accessed, without logging the sensitive data itself.

OWASP's Logging Cheat Sheet supplies a working list. It says certain data should usually not be recorded directly in the logs, but removed, masked, sanitised, hashed or encrypted instead. That list includes session identification values, access tokens, authentication passwords, database connection strings, bank account or payment card holder data, and sensitive personal data and some forms of personally identifiable information, for which its examples are health, government identifiers and vulnerable people.

A second list covers data that is useful for later investigation but may need to be treated in some special manner before the event is recorded.

It includes file paths, internal network names and addresses, and non-sensitive personal data such as personal names, telephone numbers and email addresses.

What belongs in the line is the event and the identifiers that let you look the rest up: when it happened, which route, the outcome, an id for the request and an id for the person. Among the cheat sheet's examples of a user identity are a user database table primary key value and a username.

A customer id in a log answers "who was this?" for anyone who can also read the customer table, and says little to someone who has only the log.

Personal details get into logs through a small number of habits, and the lab's careless version has three of them.

  • Request bodies. A line that prints the whole body of every request keeps a copy of every form a customer submits. In the lab, the careless log holds the new phone number and postal address a customer typed into the edit form.
  • Addresses. A search term or an email address in a query string is part of the URL, and a log line that records the URL records it too. ASVS 5.0 requirement 14.2.1, at Level 1, asks that sensitive data is only sent to the server in the HTTP message body or header fields, and that the URL and query string do not contain sensitive information, with an API key or session token as its examples. In the lab, a staff search by email address puts that customer's address into the careless log. The careful version logs the route without its query string. That covers the application's own log and nothing else: anything in front of the application that records URLs would still record the search text.
  • Error detail. The careless version logs the failing query, and the query contains the customer's email address for the same reason the error body did.
  • Debug settings left on. CWE-532's mitigations include removing debug log files before deploying the application into production, and adjusting configurations appropriately when software is transitioned from a debug state to production.

Logs travel further than the server

A log line may be stored more than once. It can be forwarded to a hosted log service, copied into an error tracker, pasted into a support ticket and kept in a backup, and each of those is another store with its own set of readers.

ASVS 5.0 requirement 14.1.2, at Level 2, asks that every protection level for sensitive data has a documented set of protection requirements, and its list of what those must cover includes how the data is to be logged and access controls around sensitive data in logs.

Deciding what a line may hold is easier before it is written than after it has been copied to four places.

Keep a field list per endpoint, so new fields do not leak by default

An over-full response can be correct on the day it is written.

The record had six harmless fields and the route returned the record. Then someone added a column for a staff note, another for a risk flag and another for the last session, and every route that returned "the record" began returning those as well, without a line of the route changing. The leak arrived by default.

The durable fix turns the default around. Each response is built from an explicit list of fields, and a field that is not on the list is not sent. A new column then stays out of every response until someone adds it to a list on purpose, and that edit is a line in a code review, where "who needs this?" can be asked.

Libraries offer two styles of control. An allowlist names what to send: Prisma's ORM v7 documentation says to use select when you only need a few scalar fields, and shows a nested select that keeps relation payloads focused.

A denylist names what to hold back. The same Prisma page points to a separate page on excluding fields for cases where you mostly want the default result but need to exclude a few fields, and Mongoose's SchemaType documentation describes a select setting for a path: true if the path should always be included in the results, false if it should be excluded by default, with the setting able to be overridden at the query level.

The two styles fail in opposite directions. A denylist suits a field that should not go out in any response, such as a password hash. Used alone it leaves the default as "send", so the next column added is exposed until someone remembers to exclude it. That is this page's reasoning, not a statement from either library's documentation.

Where the list lives matters less than there being one place for it. For new projects, the Next.js data security guide recommends a dedicated Data Access Layer: an internal library that controls how and when data is fetched and what gets passed to the render context. It says the layer should run only on the server, perform authorisation checks and return safe, minimal Data Transfer Objects.

OWASP's API3:2023 suggests a schema-based response validation mechanism as an extra layer of security, one that defines and enforces the data returned by all API methods. The lab's careful version is the smallest form of the idea: two small objects hold the field lists, one list for each response and one for each export purpose, and each handler that returns record data builds its answer by picking from the stored record through its list.

A field list is easier to write once the fields have been sorted. ASVS 5.0 requirement 14.1.1, at Level 2, asks that all sensitive data created and processed by the application has been identified and classified into protection levels. The OWASP Top 10 has kept the same first step through three editions: the prevention lists for A3:2017, A02:2021 and A04:2025 each begin with classifying the data an application processes, stores or transmits and identifying which data is sensitive according to privacy laws, regulatory requirements or business needs.

Then make the list enforce itself. A test that calls each route with a test account and compares the fields returned against the list fails as soon as a response grows, whoever caused it. The lab's regression test is that idea in seven checks: four routes whose responses must match what their screen or task uses, one error that must carry a reference and no internal detail, the cache header on every response, and a log file that must hold none of the invented personal values.

The Node.js test runner documentation says that if any tests fail, the process exit code is set to 1. A pipeline step that treats a non-zero exit code as a failure stops with it.

The response-diff exercise: compare the screen with the response

You do not need the code to find out what your application over-returns.

You need a test account and a browser. The exercise is to write down what a screen shows, capture what the server sent to draw it, and account for the difference field by field. Use it on an application you own, or one you are authorised in writing to test, with test accounts and test records.

The full method, the worksheet and a worked example are in the asset on this page; this is the short form.

  • List what the screen displays, including values shown in part, such as the last four characters of a reference, and values it uses without showing, such as an id inside a link.
  • Capture the response behind the screen. In your browser's developer tools, open the network panel, reload the screen and find the request that returned the data. Save the body, the status and the Cache-Control header.
  • List every field in the response, including fields inside nested objects and inside each item of a list.
  • Mark each response field as shown in full, shown in part or not shown.
  • For every field that is not shown in full, run three tests. Remove it from the response in a test build and see what breaks. Search the client code for its name. Ask who reads it, and whether that reader needs the whole value.
  • Record a decision for the field: required, removable, or redactable, meaning the server sends a shortened or masked form.
  • Repeat for the same route's error, its export if it has one, and its log line.

How the three tests tell required, removable and redactable apart

The three tests fail in different ways, which is why the exercise uses all of them. Removing a field finds the consumers that break straight away and misses the report that runs at the end of the month.

Searching for the field's name finds code that reads it by name and misses code that loops over every key or passes the whole object along. Asking who reads it finds the mobile app, the partner integration and the spreadsheet macro that live outside the repository, and it is the one test that can tell you a reader needs four characters and not forty.

A field is required when removing it breaks something the caller is meant to see and a named reader needs the whole value. It is removable when nothing breaks, nothing references it and nobody can say who reads it. It is redactable when something does break but the reader needs only a part.

The server then computes that part and sends it in place of the field, as the lab's careful version does with the ending of the payment reference.

The lab: one customer service in a careless and a careful version

The lab is an illustration with invented data.

It shows the comparison this page describes, not how any real framework, database, cache or logging library behaves. It is six files that import only node:assert/strict, node:crypto, node:fs, node:http, node:path, node:test and node:url and call the global fetch() function, and it installs no packages.

The service listens on 127.0.0.1 and asks for port 0. The Node.js documentation says that when the port is omitted or is 0, the operating system will assign an arbitrary unused port.

It holds three invented customers, and every detail is a marked stand-in. Phone numbers, password hashes, payment references and session ids are labels that end in a counter, dates of birth fall in 1901 to 1903, and email addresses end in .example, a top-level domain that RFC 2606 reserves and recommends for use in documentation or as examples.

Both versions apply the same sign-in and role checks to the same five routes, so every request in the lab is one its caller is allowed to make. The versions differ only in what they send, what they tell caches and what they log.

Against the careless version, the diff script finds 7, 10, 9 and 10 extra fields in the four responses that have a screen or a task. It finds an error body with the failing query, a stack trace and one customer's email address, no Cache-Control header on any of the five responses, and four invented personal values in the log.

Against the careful version it finds no extra fields, an error body with a generic message and a reference, no-store on all five responses and no personal values in the log.

The regression test fails all seven checks on the careless version and passes all seven on the careful one.

The lab was written and run on Node.js 26.0.0 on macOS, the only version and system it was run on, and every output in the asset comes from that run. Timestamps, reference ids, request ids, process ids, ports and test timings will differ on your computer.

If a response has already been sending too much

Finding an over-full response on a build that matches production means real people's details have been going out for as long as that route has existed.

Work through these in order, and check each step for what it removes before you take it.

  • Record what you found before changing anything: the request, the full response, the build and the date. Take a copy of the access logs for the route as well, because a deployment or a retention window can remove them.
  • Fix the response on the server, then add the route to a regression test so the field cannot return unnoticed.
  • Tell whoever handles privacy for your business, and read what any cyber insurance policy says about telling the insurer before you engage anyone from outside the business.
  • If the data reached people who should not have it, an incident response specialist comes next. Clever Ops does not provide incident response or monitoring.
  • Work out who received the data, from the logs: which accounts called the route, and since when. A response sent only to the signed-in customer about themselves reached that customer. A staff list, an export or a copy in a shared cache may have reached more people.
  • Deal with the stored copies. If a shared cache or CDN could have stored the response, note what was cached and then clear the copies for that route once the fix is live, because the purge removes that evidence as well. Exports already downloaded cannot be recalled; list who ran them and when.
  • Treat logs that hold personal details as personal data. Stop writing more, and narrow who can read the files: CWE-532's mitigations include protecting log files against unauthorised read and write. Take advice before deleting or rewriting old log files, because the same files may be the only record of who was affected.
  • The OAIC explains that under the Notifiable Data Breaches scheme, an organisation or agency covered by the Privacy Act 1988 must notify affected individuals and the OAIC when a data breach is likely to result in serious harm to a person whose personal information is involved. Australian Privacy Principle 11.1 says that if an APP entity holds personal information, the entity must take such steps as are reasonable in the circumstances to protect the information from misuse, interference and loss, and from unauthorised access, modification or disclosure. Whether either applies to what you found is a question for your privacy adviser, not for this page.

Where an outside security test fits

The exercise on this page covers the screens you think to check.

A Clever Ops web application and API penetration test is run from test accounts in every role the scope names, and one of its questions about fields is the one this guide asks: do responses carry properties the screen never shows, such as another person's email address, an internal flag or a password hash?

OWASP files that under API3:2023. The website security check includes error pages and debug output among its checks (WSTG-ERRH-01), where a good result is a plain error page with stack traces and debug detail kept in server logs.

Evidence in the report has session tokens, passwords, keys and personal details redacted, and each finding comes with its business impact, a fix and the criteria the retest will use.

A report records what was tested and what was found. It is evidence for your decisions, not a certificate, and it is not monitoring: a field added to a response the week after the test is outside what it can speak to.

If Clever Ops built or hosts your application, the work is a security review rather than an independent test, and the report says who built it and who hosts it.

Frequently asked questions

It is an application giving out personal or business information to someone who did not need it. MITRE catalogues the general weakness as CWE-200, Exposure of Sensitive Information to an Unauthorized Actor. This guide covers the form with no break-in: a signed-in caller makes an allowed request, and the response, error, export, cached copy or log holds more than the task required.

Not under that name. It was A3 in the 2017 edition. The 2021 edition's A02 Cryptographic Failures page says the category was previously known as Sensitive Data Exposure, which it calls more of a broad symptom rather than a root cause, and the 2025 edition lists Cryptographic Failures as A04. The 2025 introduction gives "Sensitive Data Exposure" as an example of a symptom type of CWE.

It is an API response that returns properties of an object the caller should not read. It was API3 in the 2019 OWASP API Security Top 10. The 2023 edition combined it with Mass Assignment as API3:2023 Broken Object Property Level Authorization, whose prevention advice includes keeping returned data structures to the bare minimum the endpoint's business and functional requirements call for.

Yes. Hiding a field in the interface happens after the response has arrived, and a browser's developer tools show the full body of every response. In the lab on this page, the profile screen shows four fields and part of a fifth, while the careless version's response carries all twelve fields of the stored record.

They address different stores. RFC 9111 says the unqualified private directive means a shared cache must not store the response, while a private cache, the kind it says is often part of a user agent, may store it, subject to the constraints defined in its section 3, Storing Responses in Caches. no-store means a cache, private or shared, must not store any part of the request or response. ASVS 5.0 requirement 14.3.2 gives Cache-Control: no-store as the header for keeping sensitive data out of browser caches.

As little as an investigation needs. ASVS 5.0's logging chapter says logs should not include sensitive personal data unless legally required. Its requirement 16.2.5 gives credentials and payment details as examples of data it may not be allowed to log, and session tokens as an example of data that may only be logged hashed or masked. Log an id for the person and for the request, and look the details up when you need them.

Run the response-diff exercise on this page with a test account. List what the screen shows, capture the response in your browser's developer tools, and account for every extra field with three tests: remove it in a test build, search the client code for its name, and ask who reads it. Then keep an explicit field list per endpoint and a test that fails when a response grows.

Scope the right test for your application

Tell us what you have built, who uses it and when it needs to launch. You will get a plain-English recommendation: a website audit, a web application test or a referral to a specialist.