COOKIEGUARD: Characterizing and Isolating the First-Party Cookie Jar

📅 2024-06-08
🏛️ arXiv.org
📈 Citations: 0
Influential: 0
📄 PDF
🤖 AI Summary
Following the deprecation of third-party cookies, first-party cookies are increasingly vulnerable to unauthorized access, modification, and deletion by third-party scripts embedded in the same page. Existing web security mechanisms—including the Same-Origin Policy, Content Security Policy (CSP), and storage partitioning—fail to mitigate such cross-script cookie abuse. This paper presents the first large-scale empirical measurement across 20,000 top websites, revealing that 56% suffer cookie theft and 32% experience unauthorized modification. To address this gap, we propose CookieGuard—the first runtime isolation mechanism for first-party cookies at the script-origin granularity. CookieGuard implements browser-extension–level interception, dynamic operation hooking, and gray-scale compatibility assessment to enforce fine-grained, policy-driven access control without breaking web functionality. Deployment evaluation demonstrates that CookieGuard fully prevents unauthorized cookie operations while affecting single sign-on on only 11% of sites—minimally and non-critically.

Technology Category

Application Category

📝 Abstract
As third-party cookies are being phased out or restricted by major browsers, first-party cookies are increasingly repurposed for tracking. Prior work has shown that third-party scripts embedded in the main frame can access and exfiltrate first-party cookies, including those set by other third-party scripts. However, existing browser security mechanisms, such as the Same-Origin Policy, Content Security Policy, and third-party storage partitioning, do not prevent this type of cross-domain interaction within the main frame. While recent studies have begun to highlight this issue, there remains a lack of comprehensive measurement and practical defenses. In this work, we conduct the first large-scale measurement of cross-domain access to first-party cookies across 20,000 websites. We find that 56 percent of websites include third-party scripts that exfiltrate cookies they did not set, and 32 percent allow unauthorized overwriting or deletion, revealing significant confidentiality and integrity risks. To mitigate this, we propose CookieGuard, a browser-based runtime enforcement mechanism that isolates first-party cookies on a per-script-origin basis. CookieGuard blocks all unauthorized cross-domain cookie operations while preserving site functionality in most cases, with Single Sign-On disruption observed on 11 percent of sites. Our results expose critical flaws in current browser models and offer a deployable path toward stronger cookie isolation.
Problem

Research questions and friction points this paper is trying to address.

First-party cookies repurposed for tracking by third-party scripts
Lack of browser mechanisms to prevent cross-domain cookie access
Need for practical defenses to isolate first-party cookies effectively
Innovation

Methods, ideas, or system contributions that make the work stand out.

Large-scale measurement of cross-domain cookie access
Browser-based runtime enforcement mechanism for isolation
Per-script-origin basis cookie isolation
🔎 Similar Papers
No similar papers found.