Re:Cname cloaking, a disguise of third-party trackers
by mr_toad on Saturday November 23, 2019 @07:12PM
(#21617474)
> The only very minor difference between first and third party script inclusion is access to HttpOnly cookies
That’s not a minor difference, http only is used for authentication.
So for the purposes of the browser security model, the script already runs in the domain of the host site. It can directly read any non-HttpOnly cookies, and can make any request it likes using XMLHttpRequest to APIs on the host site using the user's cookie without relying on CORs.
The only very minor difference between first and third party script inclusion is access to HttpOnly cookies (depending on the cookie scoping).
Both of the first party script inclusion approaches have mitigations available to the host site: in the proxy approach, the server could filter the cookies before proxying. In the CNAME approach, taking care with cookie scoping could solve the problem. Careless adoption is likely to open security flaws under both techniques.