A signed-in session is the active authenticated state that lets a browser access an account and make requests as its user. Websites commonly maintain it with a session cookie or token; the browser sends that credential with eligible requests so the service can recognize the user.
Sessions matter because code running in a site’s trusted context may be able to perform actions through the browser, even if it cannot read an HttpOnly cookie’s value. In an attack, injected JavaScript could potentially use an active session to make authenticated requests or access information available to the page. Defenses include preventing untrusted scripts from executing, applying a restrictive Content Security Policy, and limiting session permissions and lifetime.


