pentesting, updated
Testing for exposed session variables
Check whether session state leaks through the URL, browser history, logs, or client-readable storage.
Goal
Confirm session identifiers and sensitive session data never end up somewhere they persist or leak unintentionally.
How to test
Check for the session ID appearing in URLs (then cached, logged, or leaked via Referer):
curl -s "https://example.com/page?PHPSESSID=abc123" # session in the query string
Also check localStorage/sessionStorage for sensitive session data a content-injection bug could read, and server/proxy logs for session tokens.
What to look for
A session ID accepted via URL parameter, or sensitive session data readable from client-side storage.
References
- OWASP WSTG-SESS-04 — Testing for Exposed Session Variables.