Foxcolab

Glossary

Session hijacking

Definition

Session hijacking: An attack that takes over a user's signed-in web session by stealing or predicting the session token, usually a cookie, so the attacker is treated as that user without needing their password or second factor (OWASP).

Also known ascookie hijackingsession token theftsidejackingsession takeover

In short

Session hijacking is an attack in which someone takes over your signed-in session by stealing or predicting the session token, usually a cookie, that keeps you logged in. The attacker never needs your password or second factor. Services defend with protected cookies, fresh tokens at sign-in and timeouts; you defend by reviewing signed-in devices and ending any you don't recognize.

Key takeaways

  • A session token works like a temporary password. Whoever presents it is treated as you.
  • Tokens are stolen by malware, malicious scripts, unencrypted networks and attackers in the middle.
  • Two-step verification protects sign-in, not the token issued after it.
  • Services should protect cookies, issue a new token at sign-in and expire sessions.
  • A list of active sessions with a sign-out button is how you cut off a stolen token.

Last reviewed 30 November 2026 by Foxcolab Team

Session hijacking is an attack in which someone takes over your signed-in session by stealing or guessing the token that keeps you logged in. After you sign in, a website hands your browser a session token, usually in a cookie, and checks it on every request. OWASP describes the attack as one that "compromises the session token by stealing or predicting a valid session token." Whoever presents the token is treated as you.

How tokens get stolen#

OWASP lists the usual routes:

  • Predictable tokens, where weak randomness lets an attacker guess a valid one.
  • Session sniffing on a connection that isn't encrypted. See encryption in transit.
  • Client-side attacks, such as cross-site scripting or malware reading cookies in your browser.
  • Man-in-the-middle and man-in-the-browser attacks, which sit between you and the site.

One example: someone installs a browser extension that quietly copies cookies. The attacker loads a copied cookie into their own browser and opens the victim's inbox without ever seeing a password prompt.

What short definitions miss#

It skips your password and 2FA. OWASP's Session Management Cheat Sheet calls a session ID "temporarily equivalent to the strongest authentication method used by the application." Two-factor authentication and passkeys protect the sign-in, not the token issued after it.

Most defenses are the service's job. OWASP recommends cookies marked Secure and HttpOnly, a new session ID at sign-in, idle and absolute timeouts, and logout that ends the session on the server.

You need a kill switch. The same cheat sheet recommends letting people check "the details of active sessions at any time" and end them remotely. Speed matters: a hijacker who changes the password first turns a stolen session into account takeover.

In Foxcolab#

Your Foxcolab account console lists every signed-in device under System → Sessions, with the browser or device, its IP address and when it signed in. Select the trash-can icon to sign out one device, or Sign out all others to end every session except the one you're using. If a laptop goes missing, do that first, then change your password under Security & Sign-in → Change Password. Your browser re-locks your keys with the new password, so your end-to-end encrypted Drive files, Docs, Notes and other content stay readable. Turn on 2-Step Verification so a stolen password alone can't start a new session.

Step by step: Review active sessions and sign out other devices. New to Foxcolab? Create a free account.

Keep exploring

All terms

Foxcolab

Private work tools, without the ads.

Mail, files, documents, spreadsheets and meetings in one account. Files, documents and spreadsheets are end-to-end encrypted.

Jump to