Bug Bounty Report March 29, 2019

HackerOne #2575 — Slack OAuth Authorization Bypass Token Theft via redirect_uri Manipulation

Source: HackerOne Report #2575

Vulnerability Summary

A critical OAuth authorization bypass vulnerability in Slack allowed attackers to steal OAuth access tokens by manipulating the redirect_uri parameter during the OAuth authorization flow. This is one of the classic OAuth implementation flaws.

Technical Details

The OAuth 2.0 authorization code flow works as follows:

  1. The application redirects the user to the authorization server
  2. The user authorizes the application
  3. The authorization server redirects back to the redirect_uri with an authorization code
  4. The application exchanges the code for an access token

The vulnerability existed in step 3: Slack's OAuth implementation did not properly validate that the redirect_uri parameter matched the pre-registered redirect URI for the application. An attacker could:

Impact

Why redirect_uri Validation Matters

The redirect_uri parameter is a critical security control in OAuth. Without strict validation:

Remediation

Slack fixed the vulnerability by implementing strict redirect_uri validation:

  1. The redirect_uri must exactly match the pre-registered URI for the application
  2. Partial matches or substring matching are rejected
  3. The validation happens server-side, not just client-side

Lessons for OAuth Implementation