Skip to content

Fix: Reject submit-signed from different session wallet - #294

Merged
karagozemin merged 6 commits into
Fortexa-stellar:mainfrom
Olasunkanmi975:fix-issue-201-session-wallet-auth
Oct 1, 2026
Merged

karagozemin merged 6 commits into
Fortexa-stellar:mainfrom
Olasunkanmi975:fix-issue-201-session-wallet-auth

Conversation

@Olasunkanmi975

@Olasunkanmi975 Olasunkanmi975 commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor

Closes #201

Description

This PR addresses the security vulnerability outlined in #201, where login sessions, cookies, and the submit route evaluated the wallet independently. It enforces a strict auth-to-payment integration by ensuring a session opened by one account cannot authorize another account's payment.

Changes Made

  • Session State: Modified AuthSession in session.ts to directly store the authenticated public key during the login challenge.
  • Refresh Route Locks: Updated /api/auth/refresh to verify the state of the session wallet. If the wallet is revoked or if the account is temporarily locked, the refresh token is invalidated.
  • Transaction Verification: Updated /api/stellar/submit-signed to securely verify the transaction's source account and its cryptographic signer against the active session's public key. Returns 403 on mismatch.
  • Offline Signature Validation: Added verifySignedXdrSigner in client.ts to cryptographically verify XDR signatures using the @stellar/stellar-sdk.
  • Test Fixtures: Mocked test fixtures appropriately so that tests correctly supply the session wallet without failing on Freighter fixtures.

@drips-wave

drips-wave Bot commented Sep 30, 2026

Copy link
Copy Markdown

@Olasunkanmi975 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@Olasunkanmi975

Copy link
Copy Markdown
Contributor Author

@karagozemin please kindly review and merge

@karagozemin
karagozemin merged commit d7a4149 into Fortexa-stellar:main Oct 1, 2026
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Reject signed submits from a wallet that is not the session wallet

2 participants