Trace.axd page leaks sensitive information
The ASP.NET Trace.axd diagnostic page was left enabled and reachable by any signed-in user, and it displayed details of previous requests to the web server. An attacker with a basic account could read other users' personal data, credentials, session and CSRF tokens, and internal application details.
Originally disclosed on HackerOne
- Triaged in 13 hours
- Fixed in 10 days
- Disclosed after 5 months
Summary by the researcher
See the writeup at https://aaronesau.com/blog/posts/5
The report
Summary
Trace.axd leaks sensitive information on ██████████ by allowing signed in users to view previous requests sent to the webserver.
Impact
Information leaked includes (but is not limited to):
- full names
- email addresses
- social security numbers
- dates of birth
- plaintext passwords
- cookies, session tokens, and CSRF tokens
- IP addresses and headers
- application specific information (endpoints, files and directories on the filesystem, software versions, )
Step-by-step Reproduction Instructions
- Visit https://████████/Gateway/sso.aspx and sign in. Note that any user can create a user (and any privilege level works for this vulnerability as long as a user is signed in), so this should be considered an unauthenticated vulnerability.
- Visit https://██████████/████/Trace.axd
- Click on
View Detailsfor any request that seems interesting. You can find social security numbers by visiting any of the/candidate_app/dspstatus.aspxpages and then Ctrl+F'ing forapp_ssn.
Suggested Mitigation/Remediation Actions
Disable Trace.axd. https://docs.microsoft.com/en-us/previous-versions/dotnet/articles/ms972204(v=msdn.10)
Impact
Any attacker can potentially access the following information of current or future Navy personnel:
- full names
- email addresses
- social security numbers
- dates of birth
- plaintext passwords
- cookies, session tokens, and CSRF tokens
- IP addresses and headers
- application specific information (endpoints, files and directories on the filesystem, software versions, )
Context
ASP.NET tracing is a diagnostic feature that records details about requests handled by an application. When tracing is enabled and the Trace.axd handler is reachable, a page is exposed that lists recent requests and lets anyone who can load it drill into the details of each one. Those details are meant for developers debugging an application, not for the public web.
On this target, a U.S. Department of Defence system, the Trace.axd page was reachable and populated with real request data. The researcher's summary is short: Trace.axd leaks sensitive information on the affected host by allowing signed in users to view previous requests sent to the webserver.
Setup
The only precondition the report describes is a signed in user. The researcher notes that any user can create an account, and that any privilege level works for this vulnerability as long as a user is signed in. Because of that, the researcher argues the issue should be considered an unauthenticated vulnerability: the barrier to entry is self-service registration, not a privileged role.
No tools, versions or special configuration are mentioned beyond a browser and the ability to sign in.
Finding it
The tracing handler was reachable at the path shown in the reproduction steps and rendered a list of previous requests. The page itself is a well-known ASP.NET artefact, and its presence on a production system is the signal: it is a debugging surface that should not be exposed to end users.
Exploitation
Step 1: sign in
https://████████/Gateway/sso.aspx
The researcher visits the single sign-on page and signs in. Any account works, including one the attacker creates, and any privilege level is sufficient. This is what makes the finding effectively unauthenticated from an attacker's point of view.
Step 2: open the trace viewer
https://██████████/████/Trace.axd
With a session in place, the trace viewer loads and lists previous requests handled by the webserver. No further parameters or headers are needed.
Step 3: inspect a request
Clicking View Details on any request that looks interesting opens the full trace for that request. The researcher points out that social security numbers can be found by opening any of the /candidate_app/dspstatus.aspx pages and then searching the page with Ctrl+F for app_ssn.
Root cause
ASP.NET tracing was left enabled and the Trace.axd handler was reachable to signed in users on a production system. The trace store retains request data, including cookies, headers and application specific information, and the viewer renders it back to whoever can reach the handler. The report does not describe the application's authorisation logic beyond the observation that any signed in user could reach the page, so the exact reason the handler was not restricted is not stated.
Impact
The researcher lists the information exposed as including, but not limited to:
- full names
- email addresses
- social security numbers
- dates of birth
- plaintext passwords
- cookies, session tokens, and CSRF tokens
- IP addresses and headers
- application specific information (endpoints, files and directories on the filesystem, software versions)
The affected data belongs to current or future Navy personnel, according to the report. Because any attacker can register an account, the exposure is not limited to trusted insiders. The exposed data includes session and CSRF tokens and plaintext passwords. The report does not quantify how many records were exposed.
Fix
The suggested remediation is to disable Trace.axd, with a reference to Microsoft's documentation on the tracing feature. The report does not state whether the fix was applied or what the program changed.
Variants to test
- Request
Trace.axdat the application root and under each virtual directory you find. A positive result is a page listing recent requests with aView Detailslink. - Try the same path with and without a session. If the handler responds without authentication, the exposure is worse than in this report; if it requires a session, check whether self-registration is open.
- Look for other ASP.NET diagnostic endpoints and artefacts in the same deployment, such as elmah handlers or leftover debug pages, and check whether they render request data.
- On applications that expose a trace viewer, search the rendered details for field names tied to sensitive data, as the researcher did with
app_ssn, to confirm what is actually captured.
Hunting notes
This kind of bug hides in deployments where a framework's diagnostic features were switched on for troubleshooting and never turned off. During recon, look for framework-specific paths that are easy to guess, and check whether they return content rather than a 404. The presence of a login or registration flow is not a mitigation if anyone can create an account, so treat self-service registration as equivalent to no authentication when judging severity.
The researcher made the impact concrete by naming the categories of data in the trace store and by showing a repeatable way to reach specific sensitive fields.
What happened, in plain words
A website run by the U.S. Department of Defence had a leftover debugging page switched on. That page, called Trace.axd, keeps a record of recent requests that visitors sent to the web server and lets anyone who can open it look inside each one. The information leaked includes, but is not limited to, names, email addresses, social security numbers, dates of birth, plaintext passwords, cookies, session tokens, CSRF tokens, IP addresses and headers, and application specific information.
The only thing a person needed to see all this was a signed in account, and anyone could create one. So although the page technically sat behind a login, the researcher argues it should be treated as open to the public.
Background you need first
A few ideas come up again and again below, so here they are from zero.
A web server and a request. When you type an address into your browser and press Enter, your browser sends a request to a computer somewhere (the web server) and gets a response back, usually a web page. Every click, every form submission, every image load is a request.
ASP.NET. This is a framework, a set of building blocks that programmers use to build websites, made by Microsoft. Many large organisations use it.
Tracing. Frameworks like ASP.NET include diagnostic tools to help programmers find out why a website is misbehaving. Tracing is one of them: when it is switched on, the framework writes down details about every request it handles, a bit like a security camera recording everything that happens in a shop. That is useful while building and testing a site. It is not meant to stay on once the site is live for real users.
Trace.axd. This is the name of the page that shows the tracing records. The .axd ending is a convention in ASP.NET for special handler pages. If tracing is on and this page can be reached, it displays a list of recent requests, and each entry has a View Details link that opens the full record for that request.
What a trace record contains. Because tracing is built to help developers debug, it captures a lot: the form fields a user submitted, the cookies their browser sent, the headers attached to the request, and information about the application itself. If a user typed a password into a form, the trace may hold that password as plain text. If the site set a cookie to keep the user signed in, the trace holds that cookie too.
Cookies and session tokens. A cookie is a small piece of text a website asks your browser to store and send back with every later request. A session token is a cookie whose value proves who you are, like a wristband at an event: show it at the door and you get in without showing ID again. Anyone who copies the wristband can pretend to be you. A CSRF token is a similar secret value used to prove that a form submission really came from the site's own pages and not from a malicious page elsewhere.
Information exposure through debug information. This is the category of weakness. It means a system is revealing internal details through a debugging feature that should not be visible to outsiders. The everyday comparison: leaving the staff-only back office door propped open with the invoices spread across the desk.
Unauthenticated versus authenticated. A vulnerability is called unauthenticated when an attacker needs no account at all to exploit it. It is authenticated when they need to be signed in. Here the page required a signed in user, but since anyone could register, the researcher treats it as effectively unauthenticated.
The setup
The report describes only one precondition: you must be signed in. The researcher notes that any user can create an account, and that any privilege level works, as long as a user is signed in. In other words, you do not need to be an administrator or an employee with special rights. A brand new account you make yourself is enough.
No special tools, software versions or configuration are mentioned. A browser and the ability to sign in are all that is needed.
Finding it
The tracing page could be reached at the address shown in the reproduction steps, and it displayed a list of previous requests. Trace.axd is a well-known ASP.NET page, so its presence on a live system is itself the signal: it is a debugging surface that should not be exposed to ordinary users.
Exploitation, step by step
Step 1: sign in
https://████████/Gateway/sso.aspx
This is the address of the single sign-on page. Single sign-on (SSO) is a login page shared across several parts of a system: you sign in once and the system remembers you. The researcher visits it and signs in. Any account works, including one the attacker creates on the spot, and any privilege level is enough. That is why the finding is effectively unauthenticated from an attacker's point of view: the only barrier is a free, self-service registration.
Step 2: open the trace viewer
https://██████████/████/Trace.axd
With a session in place, this address loads the trace viewer. It lists previous requests that the web server handled. No extra parameters or headers are needed: you just open the page. The path is predictable, which is part of why this kind of bug is easy to find once you know the page name.
Step 3: inspect a request
On the list, each request has a View Details link. Clicking it on any request that looks interesting opens the full trace for that request: the recorded form fields, cookies, headers and application details.
The researcher points out a concrete way to confirm sensitive data is captured. Open any of the /candidate_app/dspstatus.aspx pages, then use the browser's search (Ctrl+F) for app_ssn. app_ssn is the name of a form field, and ssn stands for social security number, so finding it in the trace shows that social security numbers were recorded.
Why this happens
ASP.NET tracing was left switched on, and the Trace.axd page could be reached by signed in users on a live system. The trace store keeps request data, including cookies, headers and application specific information, and the viewer shows it back to whoever can reach the page.
The report does not describe the application's authorisation logic beyond the observation that any signed in user could reach the page, so the exact reason the page was not restricted is not stated.
What was exposed
The researcher lists the information exposed as including, but not limited to:
- full names
- email addresses
- social security numbers
- dates of birth
- plaintext passwords
- cookies, session tokens, and CSRF tokens
- IP addresses and headers
- application specific information (endpoints, files and directories on the filesystem, software versions)
According to the report, the affected data belongs to current or future Navy personnel. Because any attacker can register an account, the exposure is not limited to trusted insiders.
The exposed data includes session and CSRF tokens and plaintext passwords. The report does not say how many records were exposed.
The fix
The suggested remediation is to disable Trace.axd, with a reference to Microsoft's documentation on the tracing feature.
Other places to look
These are variations worth testing on similar systems:
- Request
Trace.axdat the application root and under each virtual directory you find. A positive result is a page listing recent requests with aView Detailslink. - Try the same path with and without a session. If the page responds without authentication, the exposure is worse than in this report. If it requires a session, check whether self-registration is open.
- Look for other ASP.NET diagnostic endpoints and artefacts in the same deployment, such as elmah handlers or leftover debug pages, and check whether they render request data.
- On applications that expose a trace viewer, search the rendered details for field names tied to sensitive data, as the researcher did with
app_ssn, to confirm what is actually captured.
Notes for people hunting this bug
This kind of bug hides in deployments where a framework's diagnostic features were switched on for troubleshooting and never turned off. During recon, look for framework-specific paths that are easy to guess, and check whether they return content rather than a 404 (the standard "page not found" response). The presence of a login or registration flow is not a mitigation if anyone can create an account, so treat self-service registration as equivalent to no authentication when judging severity.
The researcher made the impact concrete by naming the categories of data in the trace store and by showing a repeatable way to reach specific sensitive fields.
Glossary
- ASP.NET: a Microsoft framework for building websites and web applications.
- Cookie: a small piece of text a website asks your browser to store and send back with later requests.
- Cross-site request forgery (CSRF): an attack that tricks a signed in user's browser into submitting a request the user did not intend.
- CSRF token: a secret value in a form that proves the submission came from the site's own pages.
- Debug information: internal details a system produces to help developers find problems, not meant for ordinary users.
- Endpoint: a specific address on a server that accepts requests, such as a page or an API path.
- Header: extra information sent alongside a request or response, such as the browser type or the address of the previous page.
- Information exposure through debug information: a weakness where a debugging feature reveals internal or sensitive data to people who should not see it.
- Plaintext: data stored or sent in readable form, with no encryption, so anyone who sees it can read it directly.
- Request: a message a browser sends to a web server asking for a page or data.
- Response: the message the web server sends back.
- Session: a period during which a website remembers who you are, usually by means of a cookie.
- Session hijacking: using a stolen session token to act as another user.
- Session token: a secret value, usually stored in a cookie, that proves who you are to a website.
- Single sign-on (SSO): a shared login that signs you in to several parts of a system at once.
- Social security number (SSN): a US identification number, treated as highly sensitive personal data.
- Trace.axd: the ASP.NET page that displays recorded request traces when tracing is enabled.
- Tracing: a diagnostic feature that records details about requests handled by an application.
- Unauthenticated: needing no account or login to exploit.
- Virtual directory: a folder path on a web server that maps to a part of an application.
- 404: the standard response meaning the requested page was not found.