Cross-site leaks comprise a highly varied range of attacks for which there is no established, uniform classification. However, multiple sources typically categorized these attacks by the leaking techniques used during an attack. , researchers have identified over 38 leak techniques that target components of the browser. New techniques are typically discovered due to changes in
web platform APIs, which are JavaScript interfaces that allow websites to query the browser for specific information. Although the majority of these techniques involve directly detecting state changes in the victim web app, some attacks also exploit alterations in shared components within the browser to indirectly glean information about the victim web app.
Timing attacks Timing attacks rely on the ability to time specific events across multiple responses. These were discovered by researchers at Stanford University in 2007, making them one of the oldest-known types of cross-site leak attacks. While initially used only to differentiate between the time it took for a HTTP request to resolve a response, research performed after 2007 has demonstrated the use of this leak technique to detect other differences across web-app states. In 2017, Vila et al. showed timing attacks could infer cross-origin execution times across embedded contexts. This was made possible by a lack of
site isolation features in contemporaneous browsers, which allowed an attacking website to slow down and amplify timing differences caused by differences in the amount of JavaScript being executed when events were sent to a victim web app. In 2021, Knittel et al. showed the Performance API could leak the presence or absence of redirects in responses. This was possible due to a bug in the Performance API that allowed the amount of time shown to the user to be negative when a redirect occurred.
Google Chrome subsequently fixed this bug. In 2023, Snyder et al. showed timing attacks could be used to perform pool-party attacks in which websites could block shared resources by exhausting their global quota. By making the victim web app execute JavaScript that used these shared resources and then timing how long these executions took, the researchers were able to reveal information about the state of a web app.
Error events Error events is a leak technique that allows an attacker to distinguish between multiple responses by registering error-
event handlers and listening for events through them. Due to their versatility and ability to leak a wide range of information, error events are considered a classic cross-site leak vector. One of the most-common use cases for error events in cross-site leak attacks is determining HTTP responses by attaching the event handlers onload and onerror event handlers to a HTML element and waiting for specific error events to occur. A lack of error events indicates no HTTP errors occurred. In contrast, if the handler onerror is triggered with a specific error event, the attacker can use that information to distinguish between HTTP content types, status codes and media-type errors. In 2019, researchers from
TU Darmstadt showed this technique could be used to perform a targeted
deanonymization attack against users of popular web services such as
Dropbox,
Google Docs, and
GitHub that allow users to share arbitrary content with each other. Since 2019, the capabilities of error events have been expanded. In 2020, Janc et al. showed by setting the redirect mode for a fetch request to manual, a website could leak information about whether a specific URL is a redirect. Around the same time, Jon Masas and Luan Herrara showed by abusing URL-related limits, an attacker could trigger error events that could be used to leak redirect information about URLs. In 2021, Knittel et al. showed error events that are generated by a
subresource integrity check, a mechanism that is used to confirm a sub-resource a website loads has not been changed or compromised, could also be used to guess the raw content of an HTTP response and to leak the content-length of the response.
Cache-timing attacks Cache-timing attacks rely on the ability to infer hits and misses in shared caches on the web platform. One of the first instances of a cache-timing attack involved the making of a cross-origin request to a page and then probing for the existence of the resources loaded by the request in the shared HTTP and the
DNS cache. The paper describing the attack was written by researchers at Purdue University in 2000, and describes the attack's ability to leak a large portion of a user's browsing history by selectively checking if resources that are unique to a web page have been loaded. This attack has become increasingly sophisticated, allowing the leakage of other types of information. In 2014, Jia et al. showed this attack could
geo-locate a person by measuring the time it takes for the
localized domain of a group of multinational websites to load. In 2015, Van Goethem et al. showed using the then-newly introduced
application cache, a website could instruct the browser to disregard and override any caching directive the victim website sends. The paper also demonstrated a website could gain information about the size of the cached response by timing the cache access.
Global limits Global limits, which are also known as pool-party attacks, do not directly rely on the state of the victim web app. This cross-site leak was first discovered by Knittel et al. in 2020 and then expanded by Snyder et al. in 2023. The attack to abuses global operating systems or hardware limitations to starve shared resources. Global limits that could be abused include the number of
raw socket connections that can be registered and the number of
service workers that can be registered. An attacker can infer the state of the victim website by performing an activity that triggers these global limits and comparing any differences in browser behaviour when the same activity is performed without the victim website being loaded. Since these types of attacks typically also require timing
side channels, they are also considered timing attacks.
Other techniques In 2019, Gareth Heyes discovered that by setting the
URL hash of a website to a specific value and subsequently detecting whether a loss of focus on the current web page occurred, an attacker could determine the presence and position of elements on a victim website. In 2020, Knittel et al. showed an attacker could leak whether or not a Cross-Origin-Opener-Policy header was set by obtaining a reference to the window object of a victim website by framing the website or by creating a popup of the victim website. Using the same technique of obtaining window references, an attacker could also count the number of frames a victim website had through the window.length property. While newer techniques continue to be found, older techniques for performing cross-site leaks have become obsolete due to changes in the
World Wide Web Consortium (W3C) specifications and updates to browsers. In December 2020, Apple updated its browser
Safari's
Intelligent Tracking Prevention (ITP) mechanism, rendering a variety of cross-site leak techniques researchers at Google had discovered ineffective. Similarly, the widespread introduction of cache partitioning in all major browsers in 2020 has reduced the potency of cache-timing attacks. == Example ==