mirror of
https://github.com/hoppscotch/hoppscotch.git
synced 2026-04-26 09:16:03 +03:00
[PR #5902] [MERGED] fix(backend): prevent IDOR in user collection and request endpoints #5408
Labels
No labels
CodeDay
a11y
browser limited
bug
bug fix
cli
core
critical
design
desktop
discussion
docker
documentation
duplicate
enterprise
feature
feature
fosshack
future
good first issue
hacktoberfest
help wanted
i18n
invalid
major
minor
need information
need testing
not applicable to hoppscotch
not reproducible
pull-request
question
refactor
resolved
sandbox
self-host
spam
stale
testmu
wip
wont fix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/hoppscotch#5408
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/hoppscotch/hoppscotch/pull/5902
Author: @mirarifhasan
Created: 2/24/2026
Status: ✅ Merged
Merged: 2/24/2026
Merged by: @jamesgeorge007
Base:
next← Head:fix/GHSA-m5pg-r4jp-qq75📝 Commits (2)
e220edachore: require user UID for user collection lookupse914061chore: remove redundant ownership checks and add test📊 Changes
10 files changed (+329 additions, -230 deletions)
View changed files
📝
packages/hoppscotch-backend/src/errors.ts(+2 -4)📝
packages/hoppscotch-backend/src/team-collection/team-collection.service.spec.ts(+10 -21)📝
packages/hoppscotch-backend/src/team-collection/team-collection.service.ts(+72 -42)📝
packages/hoppscotch-backend/src/team-request/team-request.service.ts(+32 -17)📝
packages/hoppscotch-backend/src/user-collection/user-collection.resolver.ts(+5 -2)📝
packages/hoppscotch-backend/src/user-collection/user-collection.service.spec.ts(+72 -45)📝
packages/hoppscotch-backend/src/user-collection/user-collection.service.ts(+95 -74)📝
packages/hoppscotch-backend/src/user-environment/user-environments.resolver.ts(+1 -1)📝
packages/hoppscotch-backend/src/user-request/user-request.service.spec.ts(+1 -0)📝
packages/hoppscotch-backend/src/user-request/user-request.service.ts(+39 -24)📄 Description
Closes BE-722
What's changed
This PR fixes a security vulnerability (GHSA-m5pg-r4jp-qq75) where Insecure Direct Object Reference (IDOR) allowed authenticated users to access, resources belonging to other users by manipulating
user-collection.Notes to reviewers
Nil
Summary by cubic
Adds strict user ownership validation to user collections and requests to prevent IDOR (GHSA-m5pg-r4jp-qq75). All lookups and move/reorder/delete operations are now scoped to the authenticated user or team. Closes BE-722.
Bug Fixes
Migration
Written for commit
e914061a55. Summary will update on new commits.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.