Skip to content

Fix #1370: Correct ownership check for remittances - #1578

Merged
ogazboiz merged 2 commits into
LabsCrypt:mainfrom
T-kesh:fix-issue-1370
Aug 3, 2026
Merged

Fix #1370: Correct ownership check for remittances#1578
ogazboiz merged 2 commits into
LabsCrypt:mainfrom
T-kesh:fix-issue-1370

Conversation

@T-kesh

@T-kesh T-kesh commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

Description: Fixes #1370.

A critical vulnerability in backend/src/controllers/remittanceController.ts allowed any authenticated user to submit another user's pending remittance. The ownership validation was incorrectly comparing a value to itself (remittance.senderId !== remittance.senderId and senderAddress !== senderAddress).

This PR corrects the logic in both submitRemittanceTransaction and getRemittance to securely compare the remittance's sender ID against the authenticated sender's wallet address (remittance.senderId !== senderAddress).

@ogazboiz ogazboiz mentioned this pull request Aug 3, 2026
6 tasks

@ogazboiz ogazboiz left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

excellent find, both ownership checks in remittanceController were tautologies (senderAddress !== senderAddress) so any authenticated user could read or submit any remittance. verified senderId is populated from req.user.publicKey at creation, so the address comparison is sound. merging as a priority authz fix. a follow-up 403 cross-user test would be welcome (see the coverage in #1444 for inspiration).

if you want to keep contributing, join us on Telegram: https://t.me/+DOylgFv1jyJlNzM0

@ogazboiz
ogazboiz merged commit 0a5f510 into LabsCrypt:main Aug 3, 2026
14 checks passed
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.

[Backend] Any user can submit another user's pending remittance

2 participants