Sensitive Information in URLs

Sensitive values such as passwords, API keys, tokens or personal data are placed in URLs, where browsers, servers, proxies and third parties record them.

SeverityLow
CVSS 3.13.1 CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:N/A:N Open in the calculator
CVSS 4.02.3 CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N Open in the calculator
CWECWE-598: Use of GET Request Method With Sensitive Query Strings
OWASP Top 10A06:2025 Insecure Design
MITRE ATT&CKT1552 Unsecured Credentials
CategoryInformation Disclosure

Description

The application places sensitive values in URLs, usually in the query string of GET requests. Typical examples are credentials or API keys passed as parameters, login or search forms submitted with GET, access or reset tokens that remain valid after use, and personal data such as email addresses, names or account numbers used as identifiers.

Unlike request bodies and most headers, URLs are recorded in many places outside the application's control: browser history and address bar suggestions, bookmarks, web server and application logs, the logs of proxies, load balancers and content delivery networks, analytics and monitoring tools, and, depending on the referrer policy, the Referer header sent to other sites that a page links to or loads resources from. HTTPS does not prevent this, because the URL is visible at both ends of the connection.

As a result, anyone who can read one of those places can obtain the values: another person using the same computer, an administrator or attacker with access to server or proxy logs, or a third party receiving the Referer header. Depending on what the values are, this can disclose personal data or give access to accounts or services, since a password or API key in a URL remains usable until it is changed. The exposure lasts as long as the logs and history are kept, and the access needed to reach them limits who can exploit it.

The issue is identified by reviewing the requests the application makes, for example through an intercepting proxy, for parameters that carry such values. Session identifiers in URLs are a closely related and more serious case.

Remediation

Keep sensitive values out of URLs:

  • Send credentials, tokens and personal data in the body of POST requests or in request headers, such as the Authorization header for API keys and bearer tokens, never as query parameters.
  • Submit login, registration and other forms that carry sensitive fields with the POST method.
  • Use opaque, random identifiers in place of email addresses or account numbers where a record must be referenced in a URL.
  • Where a token must appear in a URL, as in a password reset or email verification link, make it single-use and short-lived, and once it has been used, send the user on to an address without it.
  • Set Referrer-Policy: no-referrer or same-origin on pages whose addresses may carry such values, and exclude or mask sensitive parameters in logs.
  • Change any credential or key found in URLs, since it should be treated as exposed, and purge it from logs where possible.

Confirm the fix by repeating the affected actions through an intercepting proxy and checking that no sensitive value appears in any request URL.

References


Add This Finding to Your Library

In Pental this write-up is in Settings, Library. Add to my library copies it into your own, rated in your firm's CVSS version, ready to put in your own words.

Free trial  ·  No card required

Only need the reporting? Our reporting tool is free and open source, with the same library.


More Web Applications Findings

Every Web Applications finding