[Backend] GET /v1/users/:publicKey/events has no auth, letting anyone enumerate a wallet's history
Labels: backend, bug, security, third-wave-audit File/location: backend/src/routes/v1/user.routes.ts:185 (router.get('/:publicKey/events', getUserEvents)), backend/src/controllers/user.controller.ts:116-169 (getUserEvents)
Description:
Unlike GET /v1/events (which requires requireAuth and rejects any address other than the caller's own publicKey, per the fix for #825), the sibling endpoint GET /v1/users/:publicKey/events has no auth middleware at all and performs no ownership check — any unauthenticated caller can pass an arbitrary Stellar public key and retrieve that wallet's full paginated stream-event history (amounts, counterparties, timestamps), enabling wallet activity/financial surveillance.
Acceptance Criteria:
- [ ] GET /v1/users/:publicKey/events requires authentication
- [ ] The endpoint rejects (403) requests where the authenticated caller's publicKey does not match the :publicKey path param, mirroring the check already applied to GET /v1/events
- [ ] A regression test asserts an unauthenticated request is rejected and an authenticated request for a different wallet's publicKey is rejected
Notes: This is the same vulnerability class fixed for GET /v1/events under #825, and is likely part of the divergence already noted by closed issue #1271 ('Duplicated "list events for a wallet" implementations with divergent feature sets') — but that issue's title does not call out the missing auth check specifically, and the auth gap is still live on this endpoint. See also GET /v1/users/:publicKey (getUser) and GET /v1/streams/summary/:address (getUserStreamSummary), which are also unauthenticated but expose comparatively less sensitive aggregate/public data by design.
Hi maintainers,
I reviewed this issue and would like to contribute the fix.
Implementation approach:
- Audit authorization boundaries and enforce defensive validation barriers.
- Implement multi-role permission checks and invocation validation.
- Write adversarial unit tests simulating edge failure modes and invalid callers.
- Ensure zero regressions across existing test suites and CI workflows.
I can deliver a clean, tested PR within 24 hours. Please assign!
@OmniZlatoon has applied to work on this issue as part of the Stellar Wave Program's 10th wave.
Good morning my Maintainer. Can I borrow this issue sir? I'll repay by doing a fine work getting the job done. My ETA is 3 hours
ℹ️ Repo Maintainers: To accept this application, review their application or assign @OmniZlatoon to this issue.
@innocentharuna has applied to work on this issue as part of the Stellar Wave Program's 10th wave.
hey maintainer, please kindly assign this to me, i can surely fix it
ℹ️ Repo Maintainers: To accept this application, review their application or assign @innocentharuna to this issue.
@Teejay2696 has applied to work on this issue as part of the Stellar Wave Program's 10th wave.
Hi maintainer, I can fix this kindly assign
ℹ️ Repo Maintainers: To accept this application, review their application or assign @Teejay2696 to this issue.
@CollinsKRO has applied to work on this issue as part of the Stellar Wave Program's 10th wave.
Hi Maintainer, I can fix this pls assign. ETA 5hrs
ℹ️ Repo Maintainers: To accept this application, review their application or assign @CollinsKRO to this issue.
@fadesany has applied to work on this issue as part of the Stellar Wave Program's 10th wave.
Hello maintainer, i would like to work on this issue
ℹ️ Repo Maintainers: To accept this application, review their application or assign @fadesany to this issue.
Congratulations, @fadesany! 🎉 Your application was accepted by the repo's maintainers, and the issue is due on October 22, 2026.
🧑💻 @fadesany: Please resolve the issue such that the repo's maintainers have enough time to review your contribution before the due date. You'll earn Points for completing the issue on-time, which will make you eligible for a share of the Stellar Wave Program's reward pool.
[!WARNING] When opening a PR, please link it to this issue to ensure it gets tracked accurately. Points are awarded when this issue is marked as completed by the maintainer.
🤠 Repo maintainers: Please keep an eye on the contributor's progress and review their work before the due date. You can manage this issue, including adjusting its complexity and points, here.
🌊 Happy Wave 🌊
This issue has been completed by @fadesany as part of the Stellar Wave Program's 10th Wave 🥳
😎 @fadesany: You earned 200 Points for completing this issue! Once the Wave's rewards are finalized, you'll be eligible for a percentage of the Wave's reward pool based on the percentage of total points you've earned. Learn more here. You can also Leave a review to share your experience working on this issue.
🧑💻 Repo maintainers: How'd the contributor do? Leave a review to share your experience working with them.