Slashdot Mirror


GMail Vulnerable To Contact List Hijacking

Anonymous Coward writes "By simply logging in to GMail and visiting a website, a malicious website can steal your contact list, and all their details. The problem occurs because Google stores the contact list data in a Javascript file. So far the attack only works on Firefox, and doesn't appear to work in Opera or Internet explorer 7. IE6 was un-tested as of now."

139 comments

  1. Which is the problem? by Zaphod-AVA · · Score: 5, Insightful

    So is this a Firefox, Gmail, or javascript vulnerability?

    1. Re:Which is the problem? by Stalus · · Score: 4, Informative

      Works fine in IE6. TFA states "I've tried the hack on IE7, Opera, and Firefox; it appears to be working on all three." so I'm not sure where the poster got the idea that it was Firefox only.

    2. Re:Which is the problem? by WinKing · · Score: 1

      If there is no problem for other browsers then obviously, there is something that FF needs to look into the thing.
      Now a days after releasing of FF I have heard lots of issues in between GG and FF. You may have seen the latest update for firefox 2.0 for the fixing of gMail. Wondering what could be the reasons.

      --
      With Regards, V Raimond
    3. Re:Which is the problem? by Bogtha · · Score: 5, Insightful

      GMail. JSON should not be used for sensitive data because any old website can reference it simply by including it as an external script. The Google developers should not have used JSON for this information, they did, and that is why this information leak exists. There are ways to protect JSON from this (e.g. nonces) but you have to actually add this security yourself, rather than relying on the browser's built-in cross-domain security like you could if you were using XML etc.

      --
      Bogtha Bogtha Bogtha
    4. Re:Which is the problem? by buro9 · · Score: 4, Informative

      It's a problem with web services that comes from an assumption that JavaScript cross-domain security is in place.

      When you surface data via Xml web services, you can only call the web service on the domain that the JavaScript calling it originates from. So if you write your web services with AJAX in mind exclusively, then you have made the assumption that JavaScript is securing your data.

      The problem is created at two points:
      1) When you rely on cookies to perform the implicit authentication that reveals the data.
      2) When you allow rendering of the data in JSON which bypasses JavaScript cross-domain security.

      This can be solved by doing two things:
      1) Make one of the parameters to a web service a security token that authenticates the request.
      2) Make the security token time-sensitive (a canary) so that a compromised token does not work if sniffed and used later.

      The security token should be gathered by authenticating the user according to a mechanism that the user controls. Think of the way that the Flickr API asks you to grant an application access to your data.

      Anyhow, use the noscript extension in Firefox to ensure that your data is not compromised, as you will be able to choose to block the script from running, and in doing so prevent others from gaining access to your data.

      The Internet Exporer alternative is to disable JavaScript, but few people ever do this because too few sites (especially Web2.0 sites) degrade gracefully when JavaScript is disabled.

    5. Re:Which is the problem? by klept · · Score: 0, Troll

      To Stalus or anyone else on Slashdot. I have a couple of questions that I would deeply appreciate if they could be answered. Ok this latest hack on gmail. Is it only your contact list that they recieve. Is nothing else hacked into like your inbox, messeges sent, etc? If so, I will be lmaf. Many of my contacts are programmers, and they will not take this spam hack lying down. If anyone can track these bozos they will, and they know how to retaliate lol. Second, an earlier story had about 60 gmail account files completely deleted. Is this part of the same hack or problem? Or is it a seperate incident and as Google claimed a glitch that has been fixed? Perhaps when they corrected the "glitch" they created a "issue", like a vulnerability that caused this contact hack? Any enlightnment would be greatly appreciated. Thank you.

    6. Re:Which is the problem? by appavi · · Score: 1

      Even with JSON it is possible to prevent these type of leaks. For the requests that contains sensitive data, send data only if the HTTP request method is POST. If it is GET, then simply give a 403. Third party websites can get javascript file/data from Google only through GET(using script tags, not with XMLHttpRequest). They can't make POST request because they will be prevented by same domain policy. Google applications can retrieve the data through POST method using XMLHttpRequest because they will be in the same domain.

    7. Re:Which is the problem? by Anonymous Coward · · Score: 2, Funny

      Uhhh... you should be thanking these "bozos" for releasing the exploit so it can be fixed, tough-programmer-guy. If your programmer friends are such l337 d00ds then maybe they'd find and fix some of these exploits themselves, instead of being blindly vulnerable until some "bozos" save their ass. BTW, what does being a programmer have to do with being able to "retaliate" against some obviously much smarter programmers? Gonna send them some code? Gonna do a double compile on their bitch asses?

      Why dont you ask your l337 h@X0r buddies to just look at the code. Then you'd see how the vulnerability works, and what information it can retrieve. Though I dont know if the code will look right when they try to open it in VB.

    8. Re:Which is the problem? by Stalus · · Score: 1

      Well, I can't answer some of that, but some notes:

      1. The link provided by Slashdot no longer shows gmail contact list information - I assume Google already changed some of this, and hopefully the new method is more secure.
      2. The top of the file had an AuthToken, and it's unclear to me how much additional information you could have gotten at using that, but the file itself only contained contact information, not message bodies.
      3. An example entry had the following fields: Id, Name, Email, Affinity, Groups, Addressess, Phoness, Imss (yes, Google had extra s's). So, how much could be stolen depends on how much information you kept in the contact information. It could just be an e-mail, or could have also been an address, phone number, and IM information.
      I would have pasted example snippets here, but Slashdot didn't like the brackets and other code-like characters.

      Really, it seems like there are three different things you would worry about here. 1) Spammers can get people's e-mails. With the amount of spam already out there, I don't think I'd even notice if another spammer got my e-mail address. 2) People can tie your name to your address and phone number. There are so many ways that this information slips through the cracks already - mostly phonebooks - that the determined person could probably figure it out. 3) People can figure out who you communicate with and trust.

      This third one seems like the bigger scare to me, and could be used for all sorts of social engineering attacks. Spam filters will accept e-mail from people on your contact list. People are more likely to open an attachment from someone on their contact list. People on your contact list are more likely to care about you, and you open your aunt Betty to various sorts of fraud regarding you.

    9. Re:Which is the problem? by klept · · Score: 1

      thank you :)

    10. Re:Which is the problem? by Anonymous Coward · · Score: 0

      The No Script extension by default excludes *.google.com and will run scripts; same as *.microsoft.com and about:, chrome:, resource: and obviously the extensions homepage
      Make sure to remove these and only ad the sites that you want / require.

  2. Submitter has a problem with Firefox? by CTho9305 · · Score: 5, Informative

    RTFA:
    I've tried the hack on IE7, Opera, and Firefox; it appears to be working on all three.

    Does the submitter have some agenda against Firefox?

    1. Re:Submitter has a problem with Firefox? by davidmcg · · Score: 1
      Indeed the current article is a bit light on details but it does say it affects the three main browsers - time to expect the barrage of "I'm glad to have switched back to IE7" posts from others that have not RTFA.

      The link to test out the vulnerability seems to be down.

    2. Re:Submitter has a problem with Firefox? by infradead · · Score: 1

      Didn't work on Firefox when I tried it earlier today. Move along please ...

    3. Re:Submitter has a problem with Firefox? by islanduniverse · · Score: 3, Funny

      I'm glad I've switched back to IE7!

    4. Re:Submitter has a problem with Firefox? by Tim+C · · Score: 4, Informative

      It works fine in my install of FF 2.0.0.1; you have to be logged in to gmail for it to work. Despite what it says in the summary, it also works in IE7 - in fact, it'll work in any browser that

      * supports cookies
      * supports loading of resources from domains other than the one the currently-loaded page is hosted on
      * supports accessing those resources

      ie pretty much all (modern) browsers.

    5. Re:Submitter has a problem with Firefox? by MattPat · · Score: 1

      To give the submitter the benefit of the doubt, perhaps he or she read the article as it only works on the third one.

      Or, the submitter works for Microsoft and is therefore required to make IE look spotless, lest a chair come sailing from the other end of the room.

    6. Re:Submitter has a problem with Firefox? by MobileTatsu-NJG · · Score: 1, Funny

      "Does the submitter have some agenda against Firefox?"

      Nah, it was just a gag to get ppl to RTFA.

      --

      "I like to lick butts!" by MobileTatsu-NJG (#32700246) (Score:5, Informative)

    7. Re:Submitter has a problem with Firefox? by Anonymous Coward · · Score: 0

      >Does the submitter have some agenda against Firefox?

      Nah. More likely:

      1. He wanted to see if the /. editors were paying attention. (Hahahahahaha... ahh. Yeah, like that needed testing.)

      2. He wanted to make sure his submission was sensational enough for acceptance by /..

    8. Re:Submitter has a problem with Firefox? by thegamerformelyknown · · Score: 1

      Oddly enough, it isn't working for me in Opera 9.10 in Linux, despite being logged in, and Opera (AFAIK) matches that criteria...

    9. Re:Submitter has a problem with Firefox? by Tim+C · · Score: 2, Informative

      Strangely enough, it's no longer working for me in Firefox (2.0.0.1, WinXP); I think google may have fixed the problem. Whether it's a real fix or an obscuration I have no idea.

    10. Re:Submitter has a problem with Firefox? by Anonymous Coward · · Score: 0
      Does the submitter have some agenda against Firefox?

      The submitter appears to have some agenda against English:

      By simply logging in to GMail and visiting a website, a malicious website can steal your contact list ....

      So, a malicious website simply logs into GMail and bad things happen? Submitter should keep his sentences under ten words until he learns how to construct a proper dependent clause.

    11. Re:Submitter has a problem with Firefox? by Anonymous Coward · · Score: 0

      Boy, am I ever glad I switched back to IE!! Firefox is so fucking lame, fuckers.

  3. Phew! by sorrill · · Score: 4, Funny

    We are lucky it was not Microsoft's Hotmail!

  4. Works in most any java-script browser by wnknisely · · Score: 4, Insightful
    According to the reports on Digg this hack works in all modern browsers. The real fix is probably to stop storing the contact list in a local java-script based file. (Or to always be sure to log out of Google after visiting a google page.)


    http://www.digg.com/programming/GMail_Hacked_Visit _ANY_Website_and_Your_Whole_Contact_List_Can_be_St olen
    --
    In illa quae ultra sunt
    1. Re:Works in most any java-script browser by Elentari · · Score: 2, Insightful

      Hopefully, one main difference between Digg and Slashdot is that the users here won't go and deliberately click the URL to watch their own account get hacked.

    2. Re:Works in most any java-script browser by MarkByers · · Score: 2, Informative

      Actually it is not stored locally in Javascript. I assume that the information is stored in some sort of filesystem / database and converted to Javascript on the fly to ease integration with other applications. You can also get the same information as XML if you prefer:

      http://docs.google.com/data/contacts

      --
      I'll probably be modded down for this...
    3. Re:Works in most any java-script browser by Phil246 · · Score: 1

      Hrm, since the source requests the js file from googles servers, shouldnt it be possible to check the referrer to make sure its a google page?

    4. Re:Works in most any java-script browser by Sancho · · Score: 1

      That's trusting the client to send correct data. It's laughably easy to spoof the referrer.

    5. Re:Works in most any java-script browser by thopkins · · Score: 2, Funny

      Most users on Slashdot won't click any links, especially links for the articles on which they are about to comment. ;)

  5. It's an information leak by MarkByers · · Score: 4, Informative

    http://docs.google.com/data/contacts?out=js&show=A LL&psort=Affinity&callback=google&max=99999

    It can be exploit by writing a callback function in Javascript, that can do anything, and then passing it to the above link, which gives your function all the users contact info.

    --
    I'll probably be modded down for this...
    1. Re:It's an information leak by whiteknight31 · · Score: 3, Informative

      Heres the code that the original site used. http://www-static.cc.gatech.edu/~achille/contacts- source.txt

  6. Why do I bother with this site? by Inda · · Score: 4, Insightful

    Slashdot says:

    "So far the attack only works on Firefox, and doesn't appear to work in Opera or Internet explorer 7"

    TFA says:

    "I've tried the hack on IE7, Opera, and Firefox; it appears to be working on all three."

    Got any jobs going? I could do nice armchair job at Slashdot. I'd be willing to work the full 3 hours a week.

    --
    This post contains benzene, nitrosamines, formaldehyde and hydrogen cyanide.
    1. Re:Why do I bother with this site? by Headcase88 · · Score: 5, Funny
      I could do nice armchair job at Slashdot.

      Not with that sentence structure. You only made one grammar error. You could never be a /. editor.
      --
      "When the atomic bomb goes off there's devastation...but when the atomic bong goes off there's celebraaaaation!"
    2. Re:Why do I bother with this site? by jZnat · · Score: 1

      Don't worry, they'll get the story straight in the dupe.

      --
      'Yes, firefox is indeed greater than women. Can women block pops up for you? No. Can Firefox show you naked women? Yes.'
    3. Re:Why do I bother with this site? by Luminous · · Score: 1

      Well, then, why DO you bother with this site?

      --
      This is not the way to build a lasting empire.
    4. Re:Why do I bother with this site? by Shadowin · · Score: 1

      Not with that sentence structure. You only made one grammar error. You could never be a /. editor.

      Shouldn't that be "one grammatical error" or "one error in grammar?"

  7. How does this work by goombah99 · · Score: 1

    How can one page get access to another page's data? Javascript or not? Aren't pages that don't have a parent child hierarchy supposed to have no way to communicate (aside from same site cookies)? How does this work

    --
    Some drink at the fountain of knowledge. Others just gargle.
    1. Re:How does this work by bberens · · Score: 1

      I suspect it works like the following:

      Google places a cookie on your browser which indicates you have authenticated to Google. The afflicted website makes the same exact ajax call Gmail does in order to download the contact information. Since your browser holds the appropriate cookie, Google happily obliges and hands your contacts information over to your browser. Google.com has no way of knowing that it was javascript from another site which initiated the request, the request is coming from your browser's xmlhttp object, just like every other ajax request. The exciting part is that this exploit should work for any website, not just Gmail. It's always important to click 'log out' or close your browser when leaving sites you've authenticated to. Especially sites with personal information like webmail, banks, etc.

      --
      Check out my lame java blog at www.javachopshop.com
    2. Re:How does this work by dolphinling · · Score: 3, Informative

      No. Cross-domain xmlhttprequests are blocked by firefox at least, and I'd suspect by other browsers as well. The point is that you don't have to do a cross-domain xmlhttprequest here, since google conveniently stores it in a separate javascript file, and that is embeddable in other pages.

      --
      There are 11 types of people in the world: those who can count in binary, and those who can't.
    3. Re:How does this work by TubeSteak · · Score: 4, Informative

      Here's the super simple explanation

      1. Gmail sets a cookie saying you're logged in
      2. A [3rd party] javascript tells you to call Google's script
      3. Google checks for the Gmail cookie
      4. The cookie is valid
      5. Google hands over the requested data to you

      If [3rd party] wanted to keep your contact list, the javascript would pass it to a form and your computer would happily upload the list to [3rd party]'s server.

      At no point does [3rd party] make any request to Google.

      --
      [Fuck Beta]
      o0t!
  8. Thank goodness by messner_007 · · Score: 4, Funny

    Thank goodness. I was beginning to think that no one cared about my contacts.

    1. Re:Thank goodness by Anonymous Coward · · Score: 0

      Damn, now everybody must know about my monthly chat sessions with Jaleel White on plotlines Sonic the Hedgehog should've taken but didn't.

      Oh, it only steals e-mail addys? Crap.
      Sorry J.

  9. Conceptual problem by JackHoffman · · Score: 5, Informative

    Loading script files to exchange data with the server is a very common mechanism. It even has a name: JSON. It wouldn't surprise me to find that there are many more web applications which could be exploited in this way. This isn't a browser vulnerability or a simple bug. It is a design flaw of a widely used communication protocol.

    1. Re:Conceptual problem by sbben · · Score: 1

      It is a design flaw of a widely used communication protocol. Hey, this sounds familiar. SQL injection anyone?
    2. Re:Conceptual problem by TubeSteak · · Score: 1
      This isn't a browser vulnerability or a simple bug. It is a design flaw of a widely used communication protocol.
      How do you fix it?

      From what I understand, as long as the user has a valid cookie, the information is fair game... and I imagine that there are implementations that do not even bother with a cookie.

      Maybe the question is: Can it be fixed?
      --
      [Fuck Beta]
      o0t!
    3. Re:Conceptual problem by Anonymous Coward · · Score: 0
      Maybe the question is: Can it be fixed?

      Probably something along the lines of requiring a key to access the contact list.
    4. Re:Conceptual problem by JackHoffman · · Score: 1

      The problem is that the user has the cookie because he's logged into GMail (in a different window or tab, or he forgot to log out). The cookie which is sent with the request for the script is from the domain of the web app that the script is part of, not from the attacking website. One way to deal with this type of vulnerability is to check the HTTP referrer header, but since many users disable the referrer (mostly for privacy reasons), such a check would either not protect these users or prevent them from using the application. In essence, the website requesting the information would have to send something with the request that a third party can't know and can't cause another entity to add to the request (like the cookie). This means that the programmer has to take an extra precaution beyond implementing the functionality in a robust fashion, hence my assumption that many applications are similarly vulnerable.

    5. Re:Conceptual problem by zataang · · Score: 2, Informative

      Please don't jump to conclusions. As one of the comment above notes, cross-domain xmlHTTPRequests are anyway blocked by all the main browsers. The problem in this case is because of a particular way in which the data is stored by Gmail. Calling it a design flaw of JSON is stupid.

    6. Re:Conceptual problem by stevey · · Score: 1

      There is a simple fix, rather than making a request to a remote site which tests only your logged in cookie it should instead send a "random" value with the request.

      The way it works is:

      • Google sends the a form to you with a hidden "auth string".
      • When you make a request back you send the same auth-string/token with the request.
      • If the login cookie is invalid then the request is denied.
      • If the login cookie is valid and the auth-string was correct the results are sent back.
      • If the auth-string was missing then you know the request was forged.

      This is the difference between http://example.com/logout and http://example.com/logout/124rkjfldf for example - The former is insecure since example.net could include that link in an image source; whereas the latter example uses a token appended to the URL - if the submission doesn't have the correct token then it can be denied.

      I wrote about this here, when I updated my site to work like this.

    7. Re:Conceptual problem by duncanthrax · · Score: 1

      JSON is not the problem (the contact list could also be in XML or whatever other format), but the fact that Google hands out the contact list "script" based on cookie validation only. A simple referrer check should provide "good enough" security.

    8. Re:Conceptual problem by RvLeshrac · · Score: 1

      This is a design flaw in Gmail because it affects all of the browsers involved, right? It doesn't just affect one of them?

      Seriously, if this was an issue with all of the involved browsers, it would obviously be a flaw in Gmail. That's not the case.

      --
      This signature does not exist. It has never existed. It is all a figment of your imagination.
    9. Re:Conceptual problem by JackHoffman · · Score: 1

      Technically you're right: JSON is not limited to Javascript, even though the acronym means "JavaScript Object Notation". However, since JSON messages are by definition valid Javascript object definitions, it's not surprising that it's mostly used in the way GMail uses it: The page loads and executes scripts to move data from the server into the application on the client. This typical way of using JSON is prone to be exploited in the described fashion, unless the programmer has implemented additional security.

    10. Re:Conceptual problem by Anonymous Coward · · Score: 0

      contact list could also be in XML or whatever other format

      Then it wouldn't be JSON (JavaScript Object Notation, not eXtensible Markup Language), and it wouldn't be exploitable in the described way because documents which come from different domains are inaccessible. You can't load slashdot.org into a frame on your page and read its contents, for example. The bug is indeed the combination of the typical JSON implementation with a complete lack of authenticating the requesting page.

    11. Re:Conceptual problem by smurfsurf · · Score: 1

      No, it is not. Google does not return JSON data, it returns Javascript code. The embended call of the "google()" function with the contact data is the problem. Would it return just a JSON object, it would be inaccessible to the foreign page.

    12. Re:Conceptual problem by Anonymous Coward · · Score: 0

      The point is that JSON is defined such that it lends itself to being used in that way: A JSON message is a Javascript object definition, so it's only natural to put a var= in front of it or wrap it in a function call and load it as a script. This works universally, on all browsers, without the problems of the XMLHTTP object (which is an ActiveX object in IE6). It's an attractive way of using JSON (and IMHO the reason for the JSON notation in the first place), but it eliminates cross-domain security unless the server side requires extra authentication inside the request.

  10. Some Background Information by TubeSteak · · Score: 0, Offtopic
    TFA has a link to this site for a demo:
    http://googlified.com.googlepages.com/contactlist. htm

    The page now says: Causing too much trouble already... I am sorry if it causes any inconvenience to you, or make you feeling the insecure of Google.

    plugging googlified.com.googlepages.com into google
    brings us to this url: http://blog.outer-court.com/forum/79255.html

    Which in turn has a link to this site:
    http://googlified.com/2006download-the-google-maps

    A whois lookup on googlified.com
    Domain Name.......... googlified.com
        Creation Date........ 2006-02-06
        Registration Date.... 2006-02-06
        Expiry Date.......... 2007-02-06
        Organisation Name.... Feng Zeng
        Organisation Address. [home(?) address]
        Organisation Address. Columbus
        Organisation Address. 43229
        Organisation Address. OH
        Organisation Address. UNITED STATES

    Admin Name........... Haochi Chen
        Admin Address........ [home(?) address]
        Admin Address........ Columbus
        Admin Address........ 43229
        Admin Address........ OH
        Admin Address........ UNITED STATES
        Admin Email.......... haochi.chen@gmail.com
        Admin Phone.......... [real phone number]


    P.S. http://googlified.com/about/
    "More deeply, I am a 16 year old from the political battle ground in the United States - Ohio. I am currently a sophomore in a not-so-bad high school."
    --
    [Fuck Beta]
    o0t!
    1. Re:Some Background Information by hakrzcode · · Score: 1

      How is this relevant? Does this make him a terrorist?

    2. Re:Some Background Information by Anonymous Coward · · Score: 0

      you're a stupid karma whoring faggot. offer something insightful u worthless sack of shit. hey wait, i know better. GO DIE

    3. Re:Some Background Information by clear_thought_05 · · Score: 1

      First: What does this have to do with the subject at hand? Off topic. -1
      Second: If you take
      http://googlified.com.googlepages.com/contactlist. htm
      and just strip the html page and go to:
      http://googlified.com.googlepages.com/
      You'll find a link to googlified.com

      Some things are so simple they're complicated I guess.

  11. Not valid JSON, is it? by claes · · Score: 1

    I think the keys in JSON needs to be strings

    1. Re:Not valid JSON, is it? by Anonymous Coward · · Score: 0

      It's also not valid XML, not valid C, not valid Lisp, not valid French... what's your point?

  12. Wow! by repruhsent · · Score: 2, Funny

    I'm glad that I run Firefox on Linux!

    Oh wait...

  13. Re:Makes me glad I switched back to IE7 by blueCommand · · Score: 0, Redundant

    That's funny. I can't seem to find the download link for Linux?

  14. Fixed? by prestonmcafee · · Score: 4, Informative
    According to

    http://blogs.zdnet.com/Google/?p=434
    it is fixed.

  15. Galeon too by phrostie · · Score: 2, Informative

    just FYI, it works with Galeon (2.x) as well.

  16. Can be solved with HTTP referer by moria · · Score: 1

    I think it can be solved by Google checking HTTP referer before sending out the contact list via JSON, as long as the browser does not use cached content.

    1. Re:Can be solved with HTTP referer by vitality-jtw · · Score: 1

      That wouldn't help as the referrer can be spoofed: http://en.wikipedia.org/wiki/Referer_spoofing

    2. Re:Can be solved with HTTP referer by moria · · Score: 1

      That hack needs the user himself to install suicide spoof extensions/plugins. Since we trust the users, it should not be a concern. Good to know the problem has already been fixed.

    3. Re:Can be solved with HTTP referer by jZnat · · Score: 1

      And to solve the cache problem, they send the "Cache-Control: no-store, no-cache, must-revalidate" header for that script.

      --
      'Yes, firefox is indeed greater than women. Can women block pops up for you? No. Can Firefox show you naked women? Yes.'
    4. Re:Can be solved with HTTP referer by Anonymous Coward · · Score: 0

      You are wrong, and a moron.

      http://www.webappsec.org/lists/websecurity/archive /2006-07/msg00069.html

      That's a cluestick pwning you.

  17. According to... by deesine · · Score: 1

    me, at 843 hours (PST), using FF 2.0.0.1, the problem is not fixed.

    --
    damaged by dogma
  18. The Web browser as application portal by Dystopian+Rebel · · Score: 1

    These problems will not go away. Software engineers will always make mistakes and malevolent people will always want your private data. The Web is "open" by design and therefore open to exploits.

    With the Web browser becoming an application portal, users need to understand that doing transactions that involve their personal data must be separate from general Web browsing.

    You can switch off cookie permission and Javascript but this limits the functionality of many sites. I think the best solution is to use two different browsers, one for personal transactions, the other for wandering the Web.

    --
    Rich And Stupid is not so bad as Working For Rich And Stupid.
  19. it ought to be fine by r00t · · Score: 1

    Sure, I can hack the referrer to get into my own gmail account. Wooo, scary!

    My browser should not grant this ability to random javascript it finds on the web.

    1. Re:it ought to be fine by Anonymous Coward · · Score: 1, Informative
      My browser should not grant this ability to random javascript it finds on the web.

      Why not? You're underestimating both how simple it is to spoof a referrer, and how stupid it is to use the referrer for security purposes.

  20. Wow by Altanar · · Score: 4, Informative

    C'mon, /. You're reporting this now? It's already been fixed.

    1. Re:Wow by Anonymous Coward · · Score: 0

      C'mon, Altanar. Click on the link in your own post and read it.

    2. Re:Wow by NereusRen · · Score: 1

      C'mon, Altanar You're posting this now? It's not yet fixed.

      (Yes, that's your own link. Read the discussion.)

    3. Re:Wow by Dan+Berlin · · Score: 1

      Uh, docs.google.com being able to give you a list of contacts when you enter the address in *your* browser is not a bug or a security flaw.

      The flaw *was* allowing *other sites* to use it as a src variable (IE someone *else's* site using that URL + your cookies).
      This is indeed fixed.

  21. phew! - doesn't spell relief for the mainstream by doppiodave · · Score: 1

    "We are lucky it was not Microsoft's Hotmail!"

    i'm always happy to tell the tale of MS's FTC privacy bust in 2002. but there's a not so funny side to software vulnerabilities for the millions of poor slobs who aren't reading this thread, or any like it. i don't think the /. hardcore fully appreciate how skittish end-users have become about this stuff, esp since they can't tell fact from rumor, or javascript from egg nog (well, neither can i). step back and think about how the poor unwashed masses will feel when stories start circulating about some deadly hole, crack or loose gear in gmail.

    the good news is that awareness and suspicion levels about software have gone way up in the last 18 months. the bad news is that skill and effort levels for dealing with this shit haven't gone anywhere. i get my read from the 3rd and 4th year undergrads i teach. smart as they may be, most are just beginning to sense that working on redmond's software may have a downside. the students in question were stunned recently when attachments created in Word were banned until further notice.

    so what's the bottom line here? has google been getting too much whitewash? is the problem solved? should people be falling all over themselves to revive their hotmail accounts? can non-geeks ever find a realistic way to manage their software expectations?

    disclaimer: we're doing several weeks this term on google. then vista's drm nightmare. i am not, however, prepared to disclose how many gmail invitations i sent out in 2006.

  22. per-site fix is obvious by r00t · · Score: 2, Informative

    Lots of ways:

    a. Place a 128-bit random number (UUID/GUID) into the URL for the contacts info.

    b. Check the referrer. (foreign javascript should not be able to forge this)

    c. Place an encrypted copy of the cookie into the URL of the contacts info.

    d. Embed the contacts info in the page instead.

  23. can't spoof it by r00t · · Score: 1

    Who has the gmail cookie?
    Who wants to do the spoofing?
    How is the spoofer going to get the cookie?

    Right...

    1. Re:can't spoof it by yosofun · · Score: 1

      Who has the gmail cookie? ... js Who wants to do the spoofing? ... evilMan How is the spoofer going to get the cookie? ... ajax

    2. Re:can't spoof it by r00t · · Score: 1

      So you have a zero-day browser vulnerability that lets you see cookies from other sites. Good for you.

      Mind sharing?

      Your zero-day vulnerability is way bigger news than this gmail bug.

  24. Don't volunteer that much info to Google by mabu · · Score: 1, Interesting

    This is only a problem for people who are violating one of the primary security policies in the first place, and that's putting your contact list in Gmail in the first place. While Google may claim to not be evil now, there's no guarantee at any time in the future, all the information they collect from you and on you won't be given or sold to other entities or otherwise exploited for nefarious purposes. In fact, it's pretty much an inevitability this will happen, so it's not smart in the first place to store much information on their systems when more secure alternatives already exist.

    1. Re:Don't volunteer that much info to Google by shellbeach · · Score: 2, Interesting

      This is only a problem for people who are violating one of the primary security policies in the first place, and that's putting your contact list in Gmail in the first place. While Google may claim to not be evil now, there's no guarantee at any time in the future, all the information they collect from you and on you won't be given or sold to other entities or otherwise exploited for nefarious purposes. Whilst this is true, it's just the same as giving one's details to banks, credit card companies, phone companies, etc, etc ... they all have access to private and confidential information. I'm not sure that there's any more reason to suspect that they're any better or worse than Google - and judging from all the credit card snail-mail spam (from rival companies) that I've got since reluctantly obtaining a credit card, there's very good evidence to suggest that they wilfully share this info.

      Of course, by placing all your email in the hands of a company, you're undoubtedly taking a huge risk. But - perhaps unfortunately - it doesn't stop me doing it! I guess you have to hope that the huge amounts of bad will and loss of custom a company would get from using or distributing such information is incentive enough to leave well alone ...

    2. Re:Don't volunteer that much info to Google by Anonymous Coward · · Score: 0

      It occured to me the other day that so many people are now using google analytics, and since I almost always have a gmail tab open, so now google tracks me by name, and they now have a very thourough and detailed map of my browsing habits. I wonder how much money that could make them if they decide to exploit it.

  25. Fixed for me... by carney1979 · · Score: 0

    As reported, it is fixed, at least in my case where I'm using Firefox 2.0 on Linux.

    I like how open source software bugs get fixed (usually) really fast when compared to non-open source software.

    David

    1. Re:Fixed for me... by CNeb96 · · Score: 1

      It's a problem with gmail which effects every browser. No open source software involved.

  26. Not Fixed by astrosmash · · Score: 4, Informative

    Still works for me. You can run this script from a local html file to check:

    <html>
    <head>
    <script>
    function google(a) {
    document.write("<ol>");
    for (i = 0; i < a.Body.Contacts.length; i++) {
    document.write("<li>" + a.Body.Contacts[i].Email + "</li>");
    }
    document.write("</ol>");
    }
    </script>
    <script src="http://docs.google.com/data/contacts?out=js&s how=ALL&psort=Affinity&callback=google&max=99999"> </script></head>
    <body>
    Hello
    </body>
    </html>

    --
    ENDUT! HOCH HECH!
    1. Re:Not Fixed by complete+loony · · Score: 1

      JS is often cached. The code you posted did not work for me.

      --
      09F91102 no, 455FE104 nope, F190A1E8 uh-uh, 7A5F8A09 that's not it, C87294CE no. Ah! 452F6E403CDF10714E41DFAA257D313F.
  27. 3rd party cookie problem by rogersc · · Score: 0, Offtopic

    It looks to me as if the real culprit is 3rd party cookies. These have almost no legitimate use, and are mainly used by advertisers like doubleclick.net to track users. Third party cookies are turned on by default in the browsers, but you can turn them off. This is another reason to turn them off.

  28. D is an AJAX candidate by Anonymous Coward · · Score: 0

    You forgot AJAX: Store the contacts on the server as an XML resource and let the browser cache the XML. Replace the JSON load/unload code with stuff that loads the XML contact resources in the background and invalidates the cache with blank data at logout.

  29. Hmm by Anonymous Coward · · Score: 0

    Only happens in FireFox....and not IE7 (IE6 wasn't tested). at the time of my posting this, only 66 replies.

    Funny. If it said "this only happens in IE" there would be 500+ replies, all saying how badly IE sucks and how you should use Opera or FF.

    Funny how the /. fanbois ignore things that are exposures of security issues with Firefox...

    1. Re:Hmm by RvLeshrac · · Score: 0, Flamebait

      Better yet, if it was a vulnerability that only affected IE, it would be IE's fault.

      Since the vulnerability only shows up in Firefox, however, it obviously must be the website's fault.

      Think of the absurdity. "Three individuals purchased steak from Tesco recently. One of the individuals died after braising her cut in potassium cyanide, and a full investigation has been launched against the grocer. The other two individuals cited have suffered no ill effects."

      --
      This signature does not exist. It has never existed. It is all a figment of your imagination.
  30. Speaking of grammar errors... by Artifice_Eternity · · Score: 1

    "By simply logging in to GMail and visiting a website, a malicious website can steal your contact list, and all their details. ..."

    In other words, the submitter says that when a malicious website logs into Gmail and visits a website, it can steal my contact list.

    Someone needs to learn how to use dependent clauses. The subject of the sentence above is a malicious website, and that's who is being described in the dependent clause as logging into Gmail and visiting a website.

  31. Untested in most used browser? by Anonymous Coward · · Score: 0

    How can get to front page an article about some browser vulnerabilities that says it's untested on the most used one?
    "With some cell phones you can call for free. It works with Phillips and Siemens, it does not on Panasonic, and has not been tested on Nokia, SonyEriccson or Motorola."
    Lol, then test it before wasting our time.

  32. I'm running at least two Firefox by Anonymous Coward · · Score: 0

    I'm using one Firefox instance only for GMail/Yahoo!/eBay/banking website and another one for surfing. Both instances are launched from separate user accounts, displayed on the same X (but in different 'virtual desktops'). I don't ever enter any personal information in the 'unsafe' user account I use for surfing. It's a sad state of affair, but it's a fact that the lists of vulnerabilities for every single browser is lloonngg (browser more secure than IE [not hard] have regularly vulnerabilities rated 'critical'). So a long time ago I decided that surfing from my main user account was not a good idea. This post brougth to you by a throwaway user called 'temp' that has only one non-hidden dir: ~/firefox/. For some time I was even surfing using a temp user on a throwaway Xen para-virtualized Linux guest, but sometimes I watch some Youtube/Metacafe crap and it wasn't nice over VNC.

  33. Re:Typical of /. by Anonymous Coward · · Score: 0

    Waaahhhh!!!

  34. Nope; it's more of Google's arrogant sloppiness by Anonymous Coward · · Score: 0

    I like how so many of you are pointing the blame to anyone BUT Google.
    Susbsitute Hotmail for GMail in the article, and see if you have the same spin.
    We all know that if hotmail had this vulnerability, there'd be hundreds of posts here gloating. Instead, we have Google sycophants spinning like crazy!!

    Get it through your thick skulls - Google's programmers are no better than anyone elses. They all come from the same universities. Google programmers are not gods, they're humans, and just as capable as screwups as anyone else. Maybe even more so, given the arrogance of the company that leads their employees to believe their own press clippings about how superiour they are to anyone else.

    This is not the first time that Google has been extremely sloppy and careless with users' personal info, and it won't be the last.
    And to think, this is the company that slashdotters advocate businesses use for corporate email and corporate document storage!! LOLOLOL

  35. Re:Wow - MODERATORS PLEASE READ by multisync · · Score: 1

    C'mon, mods. Follow the links and read before moderating.

    --
    I don't care why you're posting AC
  36. nope by r00t · · Score: 1

    I spoof the referrer all the time, using the "wget" command. That does no good for attacking gmail though, because how am I to get the required cookie?

    The spoof would have to work from Javascript or Java, creating connections on behalf of the user. Merely opening a TCP/IP socket won't do, because you'd not be able to shove the cookie down the wire.

    1. Re:nope by mrchaotica · · Score: 1

      I don't know a whole lot about cookies, but wouldn't you think `wget` would provide a way to download them if you need to?

      --

      "[Regarding the 'cloud,'] ownership was what made America different than Russia." -- Woz

    2. Re:nope by r00t · · Score: 1

      You can certainly get YOUR OWN cookies using wget. You may then use wget to break into your own account. You can even create defective cookies, which can be used for some fun at horrifically-designed web sites.

      You don't get to run wget from within a browser belonging to somebody else, which is where you need to do the spoofing if you want to grab contacts info from somebody else.

  37. GMail is beta by asCii88 · · Score: 2, Funny

    You shouldn't be suprised... as you all know GMail is still in beta.

    1. Re:GMail is beta by owlstead · · Score: 1

      Hmm, funny you would mention that. It seems to be a pretty stupid bug, but maybe this is why it is still in beta, not just because Google tries to get out of their responsabilities.

  38. Doesn't work in Opera 9.02 by Rui+del-Negro · · Score: 1

    It doesn't seem to work in Opera 9.02, despite some people saying that it works on every browser. Either Google has changed something or the example code isn't working.

  39. Doesn't work in GYAFD by Anonymous Coward · · Score: 0

    Worth noting that this exploit doesn't work at all if you use Google Apps For Your Domain, you just get a JS file saying "success: false"

  40. Explanation & Possible Solutions by kazad · · Score: 2, Interesting

    I posted this on reddit which broke the story earlier, and on my blog. Thought you might find it useful.

    Quick follow-up. On digg someone posted the un-obfuscated code: http://www.cc.gatech.edu/~achille/contacts-source. txt

    How it works

    The code is pretty straightforward. Basically, Google docs has an embedded script that will run a callback function, passing the function your contact list as an object. The embedded script presumably checks a cookie to ensure you are logged into a Google account before handing over the list.

    Unfortunately, the script doesnt check what page is making the request. So, if you are logged in on window 1, window 2 (an evil site) can make the function call. Since you are logged in somewhere, the cookie is valid and the request goes through.

    Also, if you check the object that is returned, you see fields for the contact's name, email and "affinity". Presumably, a higher affinity means a more-emailed contact, so it may be possible to know the relative weight of links.

    Possible solutions

    Google is run by smart people and I'm sure they'll have this fixed soon. A few suggestions appear to be popping up, all centered on making sure the user is on a Google.com page and not a random site:

    Referrer blocking: Block all requests from sites not in the google.com domain. However, some people run referrer-blocking software. It may be the price they have to pay for security, but there could be other consequences.

    Script checks: An idea I had was to check the window.location (just like you check the cookie) to make sure it's coming from a google.com domain. This is another way to see what page is making the request.

    Challenge-response: Google pages (like Gmail) can have some token or unique, computed data that they submit with their requests. Random pages won't have access to this token when they make the function call.

    (From user JRF on reddit): Include part of cookie in the request URL as a unique token that only a "real" Google page would know. Need to watch out for proxies/browser history (accessible from other pages) being able to access this unique data. May need to seed or salt it in a challenge-response system.

    It's interesting thinking of fixes for this - do you have any other suggestions for how Google would fix this?

    1. Re:Explanation & Possible Solutions by appavi · · Score: 1

      I have posted this solution earlier in this thread. Since you are asking I am posting it again. Easiest way is to filter by HTTP Request method.
      1. Check for the HTTP Request method. If it is POST, send the data. For other request methods like HEAD, GET send HTTP Status code 403(Forbidden).
      2. For Google applications, they should use XMLHttpRequest and POST method to retrieve the data. This will be allowed due to same domain policy.
      3. Unless otherwise specified, browsers does a GET request for a required resource. So javascript url in scripts tag of third party web sites will be processed as GET by browser and will get a 403 response code. So third party websites must use POST to get google data which is impossible due to same domain restrictions.

    2. Re:Explanation & Possible Solutions by IAmGarethAdams · · Score: 1

      I agree with your comments, but a 405 (Method Not Allowed) HTTP status code would be an ideal choice rather than 403

    3. Re:Explanation & Possible Solutions by appavi · · Score: 1

      Thanks for your comment. I forgot about 405. 405 will be the appropriate status code in this case.

    4. Re:Explanation & Possible Solutions by kazad · · Score: 1

      Thanks for the comment. I had wondered about POST requests as well, but a few sources seem to say that POST requests can be forged using Javascript.

      http://getahead.ltd.uk/blog/joe/2007/01/01/csrf_at tacks_or_how_to_avoid_exposing_your_gmail_contacts .html

      "Switching to POST and denying GET: Forms can be trivially altered with DOM manipulation to forge POST requests."

      I'm not an expert in CSRF (hadn't heard about it till this incident, which sparked my interest), but is this a problem? Do you know how this could be done?

    5. Re:Explanation & Possible Solutions by appavi · · Score: 1

      Even I am also new to Cross site scripting and I am learning about it. Today I discovered that I was wrong when I said third party websites cant make POST request to websites in different domain. Actually they can make POST requests through iframes but they cant read the data sent by the server due to same origin policy[1].

      When a request is sent to the server either one of the following things may happen,
      1. Data remains the same in the server after the server completes the request.
      Ex. Get the list of all contacts. In this case data is not changed in the server side. This is just a Data request.
      2. Data gets changed due to the incoming request.
      Ex. Transfer $100 from Account A to B. In this case data gets changed in the server side.

      My solution works only for request which are of type 1 and it will fail for requests of type 2. Gmail vulnerability discovered now belongs to type 1 request where data is not changed. Even if the third party web sites makes a POST request to Google site, they will not be able to read the data. So my solution works for Gmail vulnerability but it may not work for other type of requests where data is changed in the server side due to the client request.

      [1] I simulated this case in my pc, I was able to make POST requests using to a different website iframes. But I was not able to read the data that was sent from the server to the iframe. If you want peek at these files, just drop me an email.

  41. First link in the aritcle by rootEToTheIPi · · Score: 1

    I tried the first link in the article and I got a page with only this text: google ({ Success: false, Errors: [] }) It seems to not work. I'm using Firefox v. 1.5.0.9, and I was logged in to gmail at the time. Can anyone explain this?

    --
    When it comes to pastry theft, I take the cake.
    1. Re:First link in the aritcle by ninjapiratemonkey · · Score: 1

      They fixed the javascript problem, but your contact list can still be accessed through xml so, while the original problem that was found has been corrected, there's still other problems that work just as well, and probably many more yet to be discoverd ones.

      --
      01110000 01010111 01101110 00110011 01100100
    2. Re:First link in the aritcle by nwbvt · · Score: 1

      You mean probably many more yet to be published ones. Google (and the rest of us) will only find out about these if the person who finds them is nice enough to tell everyone. While I'm guessing most people in the world are nice enough to do that, its the few who aren't that I'm worried about...

      But I guess these security violations and performance problems and accessibility issues are all small prices to pay if you want a fancy "Web 2.0" website...

      --
      Mathematics is made of 50 percent formulas, 50 percent proofs, and 50 percent imagination.
  42. Some details on how it works by joe_fish · · Score: 1
  43. Nonsense by truth_revealed · · Score: 2, Interesting

    XML has no special cross-domain security over plain JSON.

    JSON is not the problem here. The problem was the stupid google({}) function call wrapped around the JSON in the reply. Remove that stupid function call and everything is fine. Since you cannot receive or send data via XmlHttpRequest to a domain other than the one that served up the HTML, you will not be at risk if only JSON is returned.

    The sky is falling!
    The sky is falling!
    Sheesh.

    1. Re:Nonsense by Bogtha · · Score: 1

      XML has no special cross-domain security over plain JSON.

      It's not XML that is special, it's JSON, because it can be parsed as JavaScript.

      Since you cannot receive or send data via XmlHttpRequest to a domain other than the one that served up the HTML, you will not be at risk if only JSON is returned.

      You misunderstand, the whole point is that you don't need XMLHttpRequest if the data can be parsed as JavaScript. You just need to include it with a <script> element.

      --
      Bogtha Bogtha Bogtha
    2. Re:Nonsense by kalirion · · Score: 1

      You misunderstand, the whole point is that you don't need XMLHttpRequest if the data can be parsed as JavaScript. You just need to include it with a element.

      Huh? I must be missing something big here, because I thought the whole point of XMLHttpRequest is so that you could easily query the server for data without reloading any pages or (i)frames. Lots of people get that data in XML format, others use plain text, and seems others use JSON. Whatever the format, you need XMLHttpRequest to get that data from the server. If you just included it in a element on page load, it would be a plain old "WEB 1.0" web page, the kind you get if you click on the "Basic HTML" link in GMail.

    3. Re:Nonsense by mongus · · Score: 1

      You don't have to use XMLHttpRequest. You can dynamically add a script node to the document if you've got JavaScript you want to include from a different site.

      Here's an example.

    4. Re:Nonsense by truth_revealed · · Score: 1

      It is very simple. The text google({"foo":"bar"}) is valid javascript when included and parsed via a script tag. The JSON text {"foo":"bar"} is not valid Javascript when included parsed via a script tag. It is a syntax error in Firefox, Mozilla, IE6 and every browser I've tried.

      I only mentioned XmlHttpRequest because some have incorrectly argued that you could still make an XHR call to a foreign website and get the raw JSON information. XHR prevents this with its site-of-origin policy. This bug was solely caused by Google's incorrect use of Javascript.

      JSON is fine for use in AJAX web sites, and the sky is not falling.

    5. Re:Nonsense by kalirion · · Score: 1

      Oh, I didn't realize you could do that. Well, learn something new every day :) Thanks!

  44. +5 Right on the Money by truth_revealed · · Score: 1

    I agree completely. It is a Google bug, plain and simple. JSON in a browser is perfectly safe if used correctly.

  45. not anymore by Sledgedot · · Score: 1

    google has already fixed this problem

  46. Fixed by linuxci · · Score: 1
    1. Re:Fixed by davidmcg · · Score: 1

      Not quite, that particular exploit has been fixed but the list is still freely available in XML form.

  47. What A Waste by cwells · · Score: 1

    This was a complete waste of a post! Unless its intent was to drum up some reader responses due to a decline in web activity which perhaps led to a decline in revenue for this site. Just thinking out loud.

  48. My solution by XNormal · · Score: 1

    I run gmail and other google services requiring login from a separate browser. Set the theme so this browser is visually distinct from your main browser. On Linux use a wrapper script to start with a different user. On Windows you can use K-Meleon (unfortunately, PortableFirefox cannot run in parallel with regular firefox).

    Not perfect, but it works for me.

    --
    Stop worrying about the risks of nuclear power and start worrying about the risks of not using nuclear power.