Session cookie theft
A session cookie is a bearer credential that proves nothing beyond possession. Whoever copies it inherits the logged-in session, skipping the password and the MFA challenge that produced it.
How it works
After a user authenticates, most web applications issue a session cookie so the browser does not have to prove identity on every request. That cookie is the session: it stays valid for hours, days, or weeks, and any browser or tool that presents it is treated as the authenticated user, with no further password or MFA check. A stolen identity provider session cookie is worse: it mints fresh sessions for every application behind single sign-on. This is the pass-the-cookie pattern.
Attackers get hold of these cookies in four main ways.
- Infostealer malware on the endpoint. RedLine, Lumma, Vidar, StealC and their successors read the browser's cookie store directly. On Windows, Chromium-based browsers historically protected that store with the Data Protection API, which stops other users and offline attacks but not a process running as the logged-in user, which is exactly what an infostealer is. Google added App-Bound Encryption in Chrome 127 in 2024 to tie the data to Chrome's own identity, which raises the bar for a stealer that only reads files from disk but does not change what a cookie is once it has been copied. The cookies leave the machine in a log alongside saved passwords and are sold in bulk.
- Diagnostic and support artifacts. HAR files, browser exports and log bundles capture request headers, including live
CookieandAuthorizationvalues. They were never designed as credential stores, so a breach of the ticketing system that holds them becomes a breach of every session captured inside. - Bugs that leak or swap sessions. Citrix Bleed (CVE-2023-4966) was a buffer over-read in NetScaler that returned valid session tokens from memory to an unauthenticated request. Keycloak's CVE-2023-6787 let a cancelled
prompt=loginre-authentication leave a new session with a different subject sharing the old session ID. Cross-site scripting on an IdP login path, as in Keycloak's CVE-2023-6717, can read whatever the page can. - A proxy during login. An AiTM phishing proxy captures the cookie at the moment it is issued.
Once an attacker has the cookie, they import it into their own browser and are logged in as the victim immediately, with no login form and no MFA prompt.
Why it works
MFA protects the moment of authentication. It says nothing about what happens after, and a session cookie is a bearer token: whoever holds it is the user until it expires or is revoked, with no further check on origin, device, or intent. The control assumption that fails is that the session stays attached to the device that authenticated. Nothing in a plain cookie enforces that. Most applications do not bind the cookie to a key, a device, or even an IP range, so a copy is exactly as good as the original anywhere it is presented.
Two operational assumptions fail alongside it. The first is that a password reset ends access; it changes the credential that produced the session, not the session already issued. The second is that the endpoint is a trustworthy place to keep long-lived secrets. A browser holding a persistent "stay signed in" session for the identity provider is storing a credential more powerful than the password, protected only by the user account it runs under. The industry's investment in stronger login-time authentication has, in effect, made the post-authentication session the more attractive and less defended target.
How to detect it
- Session used where it was not issued. In Entra sign-in logs (
SigninLogsandAADNonInteractiveUserSignInLogs), the sameSessionIdappearing from a newIPAddress,AutonomousSystemNumber, orUserAgentwith no corresponding interactive sign-in from that location. TheTokenProtectionStatusDetailscolumn shows whether the sign-in token was device-bound, which tells you how much to trust the session in the first place. - Identity provider detections. Entra ID Protection's
anomalousTokendetection covers session tokens and refresh tokens replayed with unexpected location, application, IP or user agent. Microsoft notes it was historically tuned to be noisier than other detections and still has a higher than normal false-positive chance at low and medium risk. In Okta,security.session.detect_client_roamingrecords a roaming session, anduser.session.context.changerecords a significant change in device or network on an active session. - Activity after revocation. Session activity continuing after a password reset or
revokeSignInSessionscall, beyond the few minutes Microsoft documents for revocation to take effect, means a session or token outside the revocation path. - Endpoint telemetry. EDR alerts for known stealer families, or for an unexpected process reading the browser's cookie database, are the earliest and most reliable signal, because they fire before the cookie is used.
- Application-level anomalies. Anthropic detected stolen Claude sessions through unusual usage patterns rather than anomalous logins, because the login was never repeated. Usage baselines catch what sign-in logs cannot.
Be honest about the limits: users legitimately switch networks, VPNs, and devices throughout a workday, and a session opened at home and continued at an office shows exactly the IP change this detection looks for. An attacker who buys a residential proxy near the victim defeats geography checks entirely. Treat roaming as a reason to re-evaluate the session, not as proof of theft.
How to stop it
- Bind sessions to the device. Entra Token Protection accepts only device-bound sign-in session tokens for supported resources (Exchange Online, SharePoint Online and Teams for native apps on Windows, macOS and iOS, with browser support in preview). Device-bound session credentials (DBSC) bring the same idea to the browser, keeping the private key in a TPM and refreshing short-lived cookies against it. DPoP and mTLS do it for API tokens.
- Treat an infostealer infection as an identity compromise. Revoke every session for the user, rotate every credential the browser stored, and check for new MFA methods and OAuth grants. Clean the machine first, or it re-harvests the next session.
- Shorten session lifetimes for privileged roles and re-evaluate risk continuously with continuous access evaluation rather than trusting a long-lived cookie for its full validity window.
- Sanitize diagnostic and support artifacts to strip cookies and tokens before they are stored, and treat support systems that hold them as tier zero.
- Patch session-handling flaws on identity infrastructure, then kill sessions. Citrix Bleed showed that patching alone leaves already-stolen tokens valid.
- Rehearse full session revocation as part of incident response. See token theft and the identity incident response runbook.
Seen in the wild
- Okta customer support system breach and HAR-file session token theft (2023): HAR files in support cases held live session tokens, used to hijack sessions at five customers. See the teardown.
- CircleCI engineer session token theft (2023): malware stole an SSO session cookie already backed by 2FA, and every customer was told to rotate all secrets.
- Electronic Arts source code theft via purchased Slack cookie (2021): attackers told Motherboard they bought a stolen Slack session cookie for $10, then asked IT support for an MFA token.
- LastPass vault backup theft (2022): a keylogger captured a senior engineer's master password, and a trusted device cookie bypassed MFA.
- Boeing Distribution breached via Citrix Bleed session hijacking and MITRE NERVE breached via Ivanti zero-days and session hijacking: appliance flaws that handed out authenticated sessions.
- Infostealers are draining Claude subscriptions with stolen session cookies and Okta found 1,843 unexpired AI session tokens in one infostealer dump
- Infostealers and session hijacking: stealing the session, skipping the login, the SWI teardown.
The Identity Breach Report 2026 counts three MFA bypasses where a session or token was stolen after MFA, plus LastPass's trusted device cookie, and notes that phishing-resistant MFA would not have stopped CircleCI. Its fifth-ranked control, bound, short-lived sessions revoked on reset, addresses 18 incidents.
Sources
- MITRE ATT&CK T1539: Steal Web Session Cookie
- MITRE ATT&CK T1550.004: Use Alternate Authentication Material: Web Session Cookie
- Google Security Blog: Improving the security of Chrome cookies on Windows (App-Bound Encryption, July 2024)
- Chromium Blog: Fighting cookie theft using device bound sessions (April 2024)
- W3C: Device Bound Session Credentials draft
- Microsoft Entra: Token Protection in Conditional Access
- Microsoft Entra ID Protection: risk detection types
- Microsoft Graph: user revokeSignInSessions
- Okta: System Log event types
- Okta Security: root cause of unauthorized access to Okta's support case management system
- CircleCI: January 4, 2023 incident report
- OWASP Session Management Cheat Sheet
Related identity CVEs and breaches
In the Identity Breach Database
Real incidents in our sourced breach database where this technique was used.
- MITRE NERVE network breached via Ivanti zero-days and session hijacking 2024 · Identity infrastructure vulnerability
- Boeing Distribution breached by LockBit via Citrix Bleed session hijacking 2023 · Identity infrastructure vulnerability
- Okta customer support system breach and HAR-file session token theft 2023 · Stolen credentials
- CircleCI engineer session token theft and customer secrets exposure 2023 · Session or token theft
- LastPass customer vault backup theft via engineer credentials and trusted device cookie 2022 · Stolen credentials
- AiTM phishing campaign against more than 10,000 Microsoft 365 organizations 2022 · Phishing (adversary-in-the-middle)
- Electronic Arts source code theft via purchased Slack cookie 2021 · Session or token theft
Related on Start with Identity
- CVEKeycloak SAML broker assertion replay, session hijack
Keycloak's SAML broker accepted a replayed assertion and hijacked a user session. An authentication bypass on the broker edge. Patched in the 2026 Keycloak SAML
- Blog39% of identity CVEs are on CISA KEV, and edge appliances hold 62% of the exploited ones
SWI's Identity Vulnerability Report 2026 checked 137 identity CVEs against CISA's Known Exploited Vulnerabilities catalog and NVD. 53 are exploited, most of the
- PodcastAuth0
The late Vittorio Bertocci's interviews with the authors of OAuth, OpenID Connect, FIDO, and SAML. Ended in 2022, and still the best audio archive on identity s
- CVECisco SAML 2.0 mixes authorization domains
Cisco's SAML 2.0 implementation did not keep authorization domains apart. A token or assertion meant for one domain could authorize in another. May 2024. The pr
- BlogExploited NetScaler SAML zero-day forces a second upgrade after the September patch
CVE-2026-88779 crashes NetScaler ADC and Gateway appliances configured as a SAML service provider or identity provider. Exploited before the fix, on CISA KEV si
- CVEFortiCloud SSO SAML bypass on FortiOS, FortiProxy, FortiSwitchManager
A crafted SAML message bypasses FortiCloud SSO (CWE-347). Arctic Wolf saw malicious logins three days after disclosure. CISA added it to KEV on 16 December 2025