-2

Closely related to the Meta question Can Google and Cloudflare find my SE password?

In short the SE login page loads javascript from Google and Cloudfare.

I believe the javascript has full access to the DOM and can trivially find my password.

  1. Is it true that Google and Cloudfare can find my SE password?
  2. Is hardening against (1) needed?

Please do not tell me "trust them".

1
  • "Is it true that Google and Cloudfare can find my SE password?" -- why do you think they can? You seem to assume they can, but can you show that this is a risk?
    – schroeder
    Oct 21, 2022 at 14:46

3 Answers 3

5

I believe the javascript has full access to the DOM and can trivially find my password.

In general: Javascript included with the script tag directly into the page has full access to the DOM, no matter where this Javascript is included from. But Javascript only included in iframe or so does not, it has only access to the DOM of the specific iframe.

I don't want to do an analysis of the current login page (which might also change in the future so that the answer gets stale). But based on above general statement you should be able to analyze, if the current integration of third parties into the login page is a risk or not.

SE login page loads javascript from Google and Cloudfare ... Please do not tell me "trust them".

I'm not sure which browser you are using, but Google Chrome has the majority of the market share. And the browser has way more access to any site you visit with it than a Javascript loaded from a specific site.

Additionally Stackoverflow seems to use a CDN (currently Fastly, not Cloudflare) which is usually the TLS endpoint too. Such a CDN could inject arbitrary things into any website served by the CDN and could this way also do way more harm than a single included Javascript file.

In other words - you need to trust them, even if not for the specific included Javascript files.

0

Any code can be modified to send data to any unauthorised 3rd party. This is not unique to SE, Google, or Cloudflare. Nor is this a problem with Javascript downloaded from 3rd parties. The problem is never where the script is downloaded from, but where the page sends data. That's what you need to check on.

-1

No, it cannot see your password.

When you try to login on SE using Google authentication, two scenarios are possible (oversimplified):

  1. You are not logged in on Google:
  • SE redirect you to Google
  • Google shows you the login page and you log in
  • Google asks with you want to login on SE using its auth
  • You are redirected to SE with a token enabling you to login with Google
  1. You are already logged in on Google:
  • SE redirect you to Google
  • Google asks with you want to login on SE using its auth
  • You are redirected to SE with a token enabling you to login with Google

So SE will not run Javascript on a Google domain, and you never have to enter your Google password on a SE hosted page.

Not speaking about SE, but about every site that allows you to use Google, Facebook, Twitter and others for authentication: be careful to see if you are really on a Google (or Facebook, Twitter) domain before supplying your password. It's trivial to make a page that looks exact like Google authentication page but it's not. You may end up giving away your passwords.

6
  • 1
    I am not loging with Google, I login with email and password. Looking at the HTML source I still see scripts from Google and Cloudfare, can you check the source?
    – joro
    Oct 21, 2022 at 13:53
  • Have you seem what are those scripts? They are JQuery, Stacks, things like that. Lots of large sites uses those scripts, and Google/Cloudflare hosts them so your browser caches one copy and every site using those scripts already have the script loaded. SE could host those themselves, but it would mean more things to download (more bandwidth paid) and a slower site (more unhappy users).
    – ThoriumBR
    Oct 21, 2022 at 13:57
  • The scripts can change at any time, auditing current scripts is irrelevant for the future.
    – joro
    Oct 21, 2022 at 14:05
  • @joro then is your question if any site that loads code on a webpage is able to see a password? What you asked is if this site can see passwords now.
    – schroeder
    Oct 21, 2022 at 14:36
  • 1
    This answer considers the scenario of using the “log in with Google” flow. You're correct that SE can't obtain the user's Google password. However, OP's question is actually about Google scripts (e.g. code injected via Google Tag Manager) potentially being able to obtain the user's Stack Exchange password. That risk definitely exists on a technical level.
    – amon
    Oct 21, 2022 at 15:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.