medium · M1 · MASVS-NETWORK-1 · PTKD-DYN-AUTH-IN-URL
Credential passed in a URL
A sensitive value (password/token/api key) was sent as a URL query parameter, where it lands in logs, history, and Referer headers.
How it is exploited
Credentials or tokens appeared in a URL query string. URLs are logged everywhere: server access logs, proxies, CDNs, browser history, and Referer headers, so the secret multiplies across systems.
Why it matters
Session or API credentials persist in plaintext logs owned by third parties.
How to fix it
- Move the credential to an Authorization header (or request body for form posts).
- Invalidate tokens that were already sent via URL and scrub them from your own logs.
Does your app have this?
PTKD checks your build or your source project for PTKD-DYN-AUTH-IN-URL and every other check in this knowledge base.
Scan your appReferences
Related checks (M1)
- Secret returned in an API response
- App code calls Supabase admin APIs, so the service-role key ships in the app
- Hardcoded secret in the app
- Hardcoded secret sent on the wire
- Secret written in eas.json
- A .env file ships inside the app
- Secret .env file is not ignored by git
- Secret in the Expo app config `extra`, which ships inside the app