Glossary

Session Cookie.

Also called session token, session ID, session identifier, session hijacking, cookie theft, cookie hijacking

In Short

A session cookie is a small piece of data a website stores in your browser to recognize you after you sign in. It usually holds a session identifier. If an attacker steals it, they may be able to use the session without the password.

Last updated October 23, 2026
Profile MapGlossary Term
  1. Also Called6other namessession token · session ID · session identifier
  2. Related Terms3linked entriesAccount takeover · Credential theft

A session cookie is a small piece of data that a website stores in your browser so it can recognize you after you sign in. It usually holds a session identifier, also called a session ID or session token. OWASP says a session token is normally a string of variable width. It can be carried in the URL or in the header of the HTTP request as a cookie.

When you sign in, the website starts a session and gives your browser an identifier. Your browser sends it back with each later request, so the site knows the requests belong to the same session. The OWASP Session Management Cheat Sheet calls cookies the most extensively used mechanism for exchanging session IDs. It says cookies offer security features that other methods, such as URL parameters, do not. It also says the session ID value must be meaningless, so that it does not disclose information.

Session hijacking means using a stolen session token to get in without the password, as OWASP describes it. See session hijacking. When the token sits in a cookie, stealing it is often called cookie theft.

How Do Attackers Get Hold of a Session Token?

OWASP lists several ways a session can be compromised:

  • A predictable session token that can be guessed.
  • Session sniffing, which means capturing network traffic to read the token.
  • Client-side attacks, such as cross-site scripting (XSS), malicious JavaScript code and Trojans.
  • Man-in-the-middle attacks, where the attacker sits between the user and the site.
  • Man-in-the-browser attacks.

OWASP gives two examples. In one, attackers use a sniffer to capture a valid session ID and then use that token to gain unauthorized access. In the other, an attacker uses an XSS attack to steal the session token.

A person signs in to a web application. An attacker obtains the session cookie that the browser holds. The attacker presents that cookie to the site, and the site treats the request as coming from the signed-in person.

MITRE ATT&CK splits the problem into stealing a cookie and using it. The table below lists four techniques from MITRE. Stolen cookies can get around MFA without the prompt flooding of MFA fatigue. They are also a form of valid account misuse.

ATT&CK ID Technique What MITRE says
T1539 Steal Web Session Cookie An adversary may steal session cookies and use them to reach web applications as an authenticated user, without needing credentials.
T1550.004 Use Alternate Authentication Material: Web Session Cookie Stolen session cookies can authenticate to web applications. This bypasses some MFA because the session is already authenticated.
T1557 Adversary-in-the-Middle An adversary positions between networked devices to support follow-on behaviors such as network sniffing or replay attacks.
T1185 Browser Session Hijacking An adversary abuses browser flaws and features to change content, modify user behavior or intercept information.

How Can Websites Protect Session Cookies?

The OWASP Session Management Cheat Sheet gives these points:

  • Session identifiers must have at least 64 bits of entropy, to prevent brute-force session guessing.
  • The Secure attribute tells browsers to send the cookie only over an encrypted HTTPS connection.
  • The HttpOnly attribute tells browsers not to let scripts access the cookie.
  • Session cookies must explicitly set SameSite=Strict (preferred) or SameSite=Lax.
  • The session ID must be renewed or regenerated after any privilege level change.
  • Applications should use idle and absolute timeouts, and provide a visible and easily accessible logout button.

Not quite. The session ID is the value that identifies the session. The cookie is one way to carry that value between browser and site. OWASP notes the token can also appear in the URL.

A session cookie can be intercepted by an attacker positioned between the user and the site, as MITRE describes for a man in the middle attack.

Some applications also pass sessions in other tokens. Apache OFBiz externalLoginKey flaw CVE-2026-82907 shows a login key that never expires and works without any cookie.

Also Called.

  • Namesession token
  • Namesession ID
  • Namesession identifier
  • Namesession hijacking
  • Namecookie theft
  • Namecookie hijacking

Questions.

  • What is a session cookie?

    A session cookie is a small piece of data a website stores in your browser so it can recognize you after you sign in. It usually holds a session identifier, also called a session ID or session token.

  • How is a stolen session cookie used?

    OWASP describes session hijacking as exploiting the web session control mechanism, normally managed with a session token. If an attacker gets a valid token, they can use it to gain unauthorized access, for example by sniffing traffic or by cross-site scripting.

  • How can websites protect session cookies?

    The OWASP Session Management Cheat Sheet says session IDs need at least 64 bits of entropy. Cookies should use the Secure and HttpOnly attributes and SameSite=Strict or Lax. The ID should be renewed after any privilege change.

  • Which ATT&CK techniques cover cookie theft?

    MITRE lists Steal Web Session Cookie (T1539), Web Session Cookie reuse (T1550.004), Adversary-in-the-Middle (T1557) and Browser Session Hijacking (T1185).

Sources

  1. 1 Session Management - OWASP Cheat Sheet Series, OWASP Foundation
  2. 2 Session hijacking attack, OWASP Foundation
  3. 3 Steal Web Session Cookie (T1539), MITRE ATT&CK
  4. 4 Use Alternate Authentication Material: Web Session Cookie (T1550.004), MITRE ATT&CK
  5. 5 Adversary-in-the-Middle (T1557), MITRE ATT&CK
  6. 6 Browser Session Hijacking (T1185), MITRE ATT&CK

In Our Research

  1. 1 Phexia macOS Stealer: From a Pasted Command to Polygon C2 and Detection November 2026
  2. 2 Google Calendar Phishing: How a Trusted Invite Ends in a Live MFA Proxy November 2026
  3. 3 APT29 Mobile Watering Hole: Tracker Hijack, Three Exploit Chains and Defences November 2026
  4. 4 DevOps Security: What the Binance, PHP2Shell and WordPress Attacks Teach October 2026
  5. 5 How to Defend Against PHP2Shell October 2026
  6. 6 PHP2Shell: Two Critical PHP Flaws Reported as RCE, CVE-2026-109618 and CVE-2026-109619 October 2026