Cookie Hijacking
What is Cookie Hijacking?
Cookie HijackingTheft and reuse of a user's HTTP cookies — typically session or authentication cookies — to impersonate that user against a web application.
Cookie hijacking (cookie theft / cookie sidejacking) is a form of session hijacking in which the attacker focuses on capturing the browser cookies that identify a user rather than the password. Common acquisition paths are cross-site scripting that reads non-HttpOnly cookies, malicious browser extensions, info-stealer malware that dumps the browser's cookie store, network sniffing of cleartext traffic, and cross-site leaks. Armed with a valid session cookie, the attacker simply loads it into their own browser and resumes the authenticated session — crucially bypassing both the password and MFA, because those checks happened before the cookie was issued.
Sidejacking went mainstream in October 2010 when Eric Butler released Firesheep, a Firefox extension demoed at ToorCon that turned one-click session theft on open Wi-Fi into a point-and-click toy; the backlash pushed major sites toward site-wide HTTPS. The threat shifted again with the rise of commodity info-stealers (Lumma, RedLine, Raccoon, Vidar) that harvest cookies from disk and sell them on marketplaces — stolen session cookies underpinned several high-profile account takeovers and were a factor in intrusions tied to the Scattered Spider and Lapsus$-style playbooks. To counter post-login cookie theft, Google began shipping Device Bound Session Credentials (DBSC) (announced April 2024): the browser generates a public/private key pair, stores the private key in a TPM so it cannot be exported, and periodically re-proves possession, rendering a copied cookie useless off the original device.
Mitigations: enforce HTTPS with HSTS; set Secure, HttpOnly, and SameSite on session cookies; use short-lived tokens with rotation; bind sessions to a device or client fingerprint; harden against DOM/stored XSS with CSP; and alert on a session reused from a new device, geography, or IP reputation.
flowchart TD U[Authenticated user] -->|logs in + MFA| S[Server issues session cookie] S --> B[Cookie stored in browser] B -->|stolen via| X[XSS / info-stealer /<br/>Wi-Fi sniff / rogue extension] X --> A[Attacker imports cookie<br/>into own browser] A -->|replays valid cookie| S2[Server accepts session] S2 --> R[Full access<br/>password & MFA bypassed]
● Examples
- 01
An info-stealer malware exports Chrome's cookies database; criminals replay the cookies into their own browser to access SaaS apps as the victim.
- 02
An attacker on an open Wi-Fi network captures an unencrypted authentication cookie and uses it to log into a webmail account.
● Frequently asked questions
What is Cookie Hijacking?
Theft and reuse of a user's HTTP cookies — typically session or authentication cookies — to impersonate that user against a web application. It belongs to the Attacks & Threats category of cybersecurity.
What does Cookie Hijacking mean?
Theft and reuse of a user's HTTP cookies — typically session or authentication cookies — to impersonate that user against a web application.
How do you defend against Cookie Hijacking?
Defences for Cookie Hijacking typically combine technical controls and operational practices, as detailed in the full definition above.
What are other names for Cookie Hijacking?
Common alternative names include: Cookie theft, Cookie sidejacking.