Skip to content

Conversation

@cvxluo
Copy link
Contributor

@cvxluo cvxluo commented Feb 10, 2026

Fix: IDOR in Issue Group Operations via Qualified Short ID

This PR resolves an IDOR (Insecure Direct Object Reference) vulnerability in the get_group_list helper function.

Why this change?
Previously, when get_group_list was called with qualified short IDs (e.g., "PROJECT-123"), it only validated organization membership. This allowed users to access and modify groups in projects they did not have explicit access to, as long as they were part of the same organization.

How this change addresses the issue?
The get_group_list function has been updated to:

  1. Properly separate integer group IDs from qualified short IDs.
  2. When fetching groups by qualified short ID, it now explicitly filters the results to ensure that only groups from projects the user has access to are returned.
  3. Inaccessible groups are silently skipped to prevent information disclosure.

New tests have been added to tests/sentry/api/helpers/test_group_index.py to verify project access filtering and handling of mixed ID types.

Legal Boilerplate

Look, I get it. The entity doing business as "Sentry" was incorporated in the State of Delaware in 2015 as Functional Software, Inc. and is gonna need some rights from me in order to utilize my contributions in this here PR. So here's the deal: I retain all rights, title and interest in and to my contributions, and by keeping this boilerplate intact I confirm that Sentry can use, modify, copy, and redistribute my contributions, under Sentry's choice of terms.


Linear Issue: ID-1351

Open in Cursor Open in Web

This commit fixes a security vulnerability where users could access and modify
groups from projects they don't have access to by using qualified short IDs
(e.g., 'PROJECT-123').

The issue was in the get_group_list function which would fetch groups by
qualified short ID without validating that the user has access to the project.

Changes:
- Modified get_group_list to filter groups by accessible projects when using
  qualified short IDs
- Added comprehensive tests to verify project access validation
- Handles mixed integer IDs and qualified short IDs correctly

Security Impact:
- Prevents unauthorized access to issue groups across projects within the same
  organization
- Ensures all group operations (resolve, assign, merge, etc.) respect project
  permissions

Co-authored-by: Charlie Luo <cvxluo@gmail.com>
@cursor
Copy link
Contributor

cursor bot commented Feb 10, 2026

Cursor Agent can help with this pull request. Just @cursor in comments and I'll start working on changes in this branch.
Learn more about Cursor Agents

@linear
Copy link

linear bot commented Feb 10, 2026

@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Feb 10, 2026
Co-authored-by: Charlie Luo <cvxluo@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Backend Automatically applied to PRs that change backend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants