Skip to content

PRP: Secret extractor for Salesforce OAuth Access Token and Refresh Token #1381

@0xXA

Description

@0xXA
  • Secret name: Salesforce OAuth Access Token and Refresh Token
  • Risk in exposing the secret:
  • Access token leaks allow attackers to immediately call Salesforce APIs (Authorization: Bearer <token>) as the victim.
  • Refresh token leaks are more severe, since they can be exchanged indefinitely for new access tokens, providing persistent unauthorized access.
  • Validation method:
  • Send POST to https://login.salesforce.com/services/oauth2/token with grant_type=refresh_token and the leaked refresh token.
  • If valid, a new access token is issued.
  • Regex:
  • 3MVG[0-9A-Za-z]{80,} → Salesforce OAuth Client ID
  • [A-Za-z0-9._-]{20,60} near keywords client_secret → Client Secret
  • 00D[0-9A-Za-z]{8,} → Salesforce Org ID prefix (often embedded in tokens)
  • 00D[0-9A-Za-z]{8,}![A-Za-z0-9._-]{60,} → Common access token format
  • [A-Za-z0-9._-]{100,} near refresh_token → Refresh token

Metadata

Metadata

Assignees

No one assigned

    Labels

    PRPPatch Reward Program: This label is added to all PRP related issues for easy filteringPRP:RequestPatch Reward Program: This issue is a PRP contribution request and is being reviewed by the panel.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions