-
-
Notifications
You must be signed in to change notification settings - Fork 4.6k
fix(security): IDOR in OrganizationCodeMappingsEndpoint - scope Project by organization #104978
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
…ct by organization Fixes IDOR vulnerability where Project was queried without organization scoping, allowing users to potentially access/check projects from other organizations by guessing project IDs. Changes: - Added organization_id=organization.id to Project.objects.get() query - Updated test to verify cross-org project access returns 404
tests/sentry/integrations/api/endpoints/test_organization_code_mappings.py
Show resolved
Hide resolved
|
Thanks for the review @oioki! Re: existing mitigation - You're correct that the
As you noted, the security impact is minor since access was already blocked, but this aligns with best practices for multi-tenant data access. Re: the test - The test wasn't deleted, it was renamed from Happy to make any adjustments if you'd prefer a different approach! |
|
This pull request has gone three weeks without activity. In another week, I will close it. But! If you comment or otherwise update it, I will reset the clock, and if you add the label "A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀 |
|
Will try to wrap up today |
1d0e709 to
efeca00
Compare
|
this is ready for merge can someone mash approve - verified the IDOR/behavior and I think its what we desire at this point may not be ultra critical. i just wanna merge it or close it |
efeca00 to
1d0e709
Compare
Summary
Fixes IDOR vulnerability in
OrganizationCodeMappingsEndpoint.post()whereProjectwas queried without organization scoping, allowing users to potentially access/probe projects from other organizations by guessing project IDs.Changes
organization_id=organization.idtoProject.objects.get()query in the POST handlerSecurity Impact
Before this fix, an attacker could:
Test plan
test_idor_project_from_different_orgadded to verify cross-org access is blocked