Live data from Hacker News

Stealing OAuth tokens of Microsoft accounts via open redirect in Harvest App

eval.blog

61–70 of 114 posts

Re: Stealing OAuth tokens of Microsoft accounts via open redirect in Harvest App

#61
post #23
post #16

Earlier quoted context omitted.

Hackerone is beholden to the company running the bug bounty program. The extent that they are involved heavily depends on what services they are providing (triage, etc). At the most basic level, they're just providing a platform for disclosure of vulnerabilities and some boilerplate legalese to prevent legal departments from sueing researchers. In the vast majority of cases, companies deny requests for public disclos…

So, bug bounty programmes sprung up as a well to help coordinate disclosure and help researchers engage in responsible disclosure. A key part of responsible disclosure is the disclosure part. Often researchers would disclose unpatched issues to put weight on companies, even large companies, to actually patch issues. One of the side-effects of programs like Hackerone is that actually doing your own responsible disclos…

So, it basically sounds like we are missing a governed body consiting or researched with possibly tiered disclosure process (for severity) and the possibility to _maybe_ apply for an extension of disclosure. Would this ever happen?

Re: Stealing OAuth tokens of Microsoft accounts via open redirect in Harvest App

#62

How can I solve this problem cheaply? Here are a few thoughts: - Generate an encrypted token based on the redirect state value. - Store the mapping of tenant_id and unique state. - wait Microsoft support wildcard redirects.

First, just don't enable implicit grant. That makes it a lot harder to screw up.

State is for preventing CSRF, not transferring data. Don't abuse state, it's wrong.

Use your own authorize url, add an encrypted cookie and redirect to the real one. Even if the cookie is encrypted, only put some kind of session/cache key in it, don't actually send "info". Read cookie in callback then delete it.

Re: Stealing OAuth tokens of Microsoft accounts via open redirect in Harvest App

#63

Why wait 3 years for them to fix this? 90 days is more than enough time before disclosing it.

I can see longer than 90 days if there's some HUGE change required, and a decent sized team is allocated to the problem for most of their work time. OR if there's a solution but it needs to progress on a specific (and relatively short) timeline for customer notification.

However that additional leeway should be afforded by the researcher and/or their lawyers / representatives. It's something a company might ask for in good faith in response to a larger than usual issue.

Re: Stealing OAuth tokens of Microsoft accounts via open redirect in Harvest App

#64
post #43

RFC 6749 goes into details on how the authorization server should prevent this type of attack The authorization server MUST require public clients and SHOULD require confidential clients to register their redirection URIs. If a redirection URI is provided in the request, the authorization server MUST validate it against the registered value. So how is this possible, when presumably the Harvest app did not register th…

They are adding a second redirect on top and sticking it into the state parameter, presumably so they can redirect to anywhere. so the flow wanted was Go the some harvest authorize url, That redirects to the Microsoft authorize url with redirect_uri=registered_uri and state=some_encoded_final_uri, user enters credentials, redirect to a registered uri read state parameter and redirect to uri encoded in state. This exp…

It's kinda normal that you'd want to let a user log in and return them to the page they were at.

For example, if you're making a shopping website and a user asks to put something in their basket and you send them to log in, you'd want to return them to the item they were about to buy, not dump them back at the homepage.

What's the proper way of doing this, without "abusing state" ?

Re: Stealing OAuth tokens of Microsoft accounts via open redirect in Harvest App

#65

Earlier quoted context omitted.

They are adding a second redirect on top and sticking it into the state parameter, presumably so they can redirect to anywhere. so the flow wanted was Go the some harvest authorize url, That redirects to the Microsoft authorize url with redirect_uri=registered_uri and state=some_encoded_final_uri, user enters credentials, redirect to a registered uri read state parameter and redirect to uri encoded in state. This exp…

It's kinda normal that you'd want to let a user log in and return them to the page they were at. For example, if you're making a shopping website and a user asks to put something in their basket and you send them to log in, you'd want to return them to the item they were about to buy, not dump them back at the homepage. What's the proper way of doing this, without "abusing state" ?

Store the basket in a temporary cookie, not the oauth state parameter.

Re: Stealing OAuth tokens of Microsoft accounts via open redirect in Harvest App

#66
post #23
post #16

Earlier quoted context omitted.

Hackerone is beholden to the company running the bug bounty program. The extent that they are involved heavily depends on what services they are providing (triage, etc). At the most basic level, they're just providing a platform for disclosure of vulnerabilities and some boilerplate legalese to prevent legal departments from sueing researchers. In the vast majority of cases, companies deny requests for public disclos…

So, bug bounty programmes sprung up as a well to help coordinate disclosure and help researchers engage in responsible disclosure. A key part of responsible disclosure is the disclosure part. Often researchers would disclose unpatched issues to put weight on companies, even large companies, to actually patch issues. One of the side-effects of programs like Hackerone is that actually doing your own responsible disclos…

“responsible disclosure” is a meme to reframe immediate full disclosure as irresponsible. It is not.

Feel free to post all research results to f-d in full. This is a reasonable and responsible way to notify companies about vulnerabilities.

Re: Stealing OAuth tokens of Microsoft accounts via open redirect in Harvest App

#67
post #51

Earlier quoted context omitted.

If only tokens minted by MS were in scope of the vulnerability because of Harvest's outlook integration, maybe something like "Harvest OAuth CSRF Leaks Tokens of Microsoft Outlook Users" or "CSRF in Harvest's Outlook Integration Leaks User Tokens". If you want to add any editorializing around mitigation, linking to the OAuth RFC[0] that dictates a MUST for binding the users auth state with the request to prevent such…

Oh yes, that sounds better. I am changing the title now. Updated to "Stealing OAuth tokens of connected Microsoft accounts via open redirect in Harvest App"

Ok, I've updated the title above to that (shortened a bit to fit HN's 80 char limit). Thanks!

(Submitted title was "Microsoft Account's OAuth tokens leaking via open redirect in Harvest")

Re: Stealing OAuth tokens of Microsoft accounts via open redirect in Harvest App

#68
post #45
post #17

Worth quoting here... "...In the process of disclosing and patching this vulnerability, the Harvest team was barely responsive. The company acknowledged the vulnerability by triaging but took a very long time to fix the vulnerability. After 3 years of reporting, the company finally fixed the vulnerability silently and didn't bother to inform...no bounty or even HackerOne points were rewarded by the company..." And fr…

[deleted]

[deleted]

Re: Stealing OAuth tokens of Microsoft accounts via open redirect in Harvest App

#69

Earlier quoted context omitted.

They are adding a second redirect on top and sticking it into the state parameter, presumably so they can redirect to anywhere. so the flow wanted was Go the some harvest authorize url, That redirects to the Microsoft authorize url with redirect_uri=registered_uri and state=some_encoded_final_uri, user enters credentials, redirect to a registered uri read state parameter and redirect to uri encoded in state. This exp…

It's kinda normal that you'd want to let a user log in and return them to the page they were at. For example, if you're making a shopping website and a user asks to put something in their basket and you send them to log in, you'd want to return them to the item they were about to buy, not dump them back at the homepage. What's the proper way of doing this, without "abusing state" ?

Don't attach the sensitive URL parameters to the second redirect. The first redirect logs you in via cookie, and then if the second redirect is on the right origin it will have access to your cart.

Re: Stealing OAuth tokens of Microsoft accounts via open redirect in Harvest App

#70
Hi! I'm the person in charge of managing the bug bounty program, and I'd like to shed light on what happened from our end. I already apologized and explained this to @0xcrypto internally, but I believe that I should say something here to clarify what happened.

The truth here is that we were never able to fully reproduce the issue from the beginning, but struggled to close it because of the fear of missing something. Shortly after when we got back to the reporter for the last time, saying that we'll find a resolution, is when we were convinced that we were not able to reproduce it. Around that time we received a similar OAuth-related report. Unfortunately, this led to an internal mix-up, making us believe that we had addressed and communicated the resolution.

Because of the way I have notifications set up, I missed the follow-ups, and the issue stayed in Triage state indefinitely without receiving updates. This is by no means an excuse about the lack of updates, about which I'm deeply sorry. I've been a bug bounty hunter for many years and understand how frustrating it is to wait for updates from companies.

Finally, I'd like to reassure y'all that the security of our customers is of the utmost importance to us, and everything we say in our security page is true.

Post reply on HN