Toutes les vulnérabilités
MEDIUMAppSec

APPSEC-PELOTON-API-2021

API · Peloton

Résumé

On May 5, 2021 Pen Test Partners researcher Jan Masters and TechCrunch publicly disclosed that Peloton's API exposed the private account data of its users, having been reported privately to Peloton on January 20, 2021. The API had endpoints, including a workout-details POST endpoint, a user-search GET endpoint, and GraphQL endpoints, that performed no authorization checks: unauthenticated requests returned account data such as user IDs, location/city, age, gender, weight, workout statistics, birthday, and group/studio attendance, even for users who had set their profiles to private, because the privacy flag was not enforced at the API layer. This is a missing/insufficient-authorization flaw on an API serving over 3 million subscribers' data. A partial fix on February 2, 2021 only restricted the API to authenticated Peloton members, so anyone willing to create an account could still pull any other user's private data until the full fix around early May.

Comment l’éviter dans votre code

  • Require authentication and authorization on every API endpoint, including GraphQL resolvers; never serve account data to anonymous callers.
  • Enforce privacy settings at the API layer, not just the UI; a private flag must block data in the response itself.
  • Restricting an API to logged-in users is not authorization; check that the caller owns or may access each requested object.
  • Default new endpoints to deny and add explicit per-object authorization before returning user records.
  • Run a tracked vulnerability-disclosure process so reported flaws are remediated within the disclosure window.

Références

Vulnérabilités liées

Tout AppSec →