Skip to content

[CRITICAL] Auth bypass — SEP-10 signature verification missing #24

Description

@DeFiVC

Description

verifyChallenge in src/modules/auth/auth.service.ts:78 compares signedChallenge !== stored.challengeToken — a plain string comparison. It never decodes a Stellar transaction envelope, never verifies a cryptographic signature against the user's public key, and never checks time bounds.

Any client that echoes back the challenge token string passes authentication without needing a Stellar private key.

Impact

Complete authentication bypass — attackers can authenticate as any user without owning their Stellar key.

File

src/modules/auth/auth.service.ts:78

Suggested Fix

Replace string comparison with proper SEP-10 verification using the Stellar SDK:

  • Decode the transaction envelope
  • Verify the signature against the claimed public key
  • Check time bounds (challenge expiration)
  • Verify the source account matches

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

GrantFox OSSIssue tracked in GrantFox OSSMaybe RewardedIssue may be eligible for a GrantFox rewardOfficial CampaignCampaign: Official CampaignbugSomething isn't workingcriticalsecuritySecurity concern

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions