Skip to content
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

[Vulnerability]Ignoring tenant filters can result in cross-tenant unauthorized authorization attacks #6943

Closed
vincywindy opened this issue Apr 29, 2024 · 1 comment

Comments

@vincywindy
Copy link
Contributor

vincywindy commented Apr 29, 2024

Documentation

Please check the official documentation before asking questions: https://aspnetboilerplate.com/Pages/Documents

GitHub Issues

GitHub issues are for bug reports, feature requests and other discussions about the framework.

If you're creating a bug/problem report, please include followings:

  • Your Abp package version.9.0
  • Your base framework: .Net Framework or .Net Core. .net 8
  • Exception message and stack trace if available.
  • Steps needed to reproduce the problem.

Please write in English.

Stack Overflow

Please use Stack Overflow for your questions about using the framework, templates and samples:

https://stackoverflow.com/questions/tagged/aspnetboilerplate

Use aspnetboilerplate tag in your questions.

Here is an example:
A permission named "TestPermission"
Two or more Tenants:(Tenant1,Tenant2....)
Each Tenants has a same rolename like "testrole"
testrole in Tenant1 has TestPermission
testrole in Tenant2 denied TestPermission
Here is an example appservice for the “TestPermission”
image
user1 has testrole in Tenant1, it will return true,because testrole in Tenant1 has TestPermission
user2 has testrole in Tenant2, it will return false,because testrole in Tenant2 none TestPermission,but it return true!
The reason is AbpRoleStore.FindByNameAsync search by name,when MayHaveTenant is disable, it will get other rolename cross tenant.
PixPin_2024-04-29_14-44-39
PixPin_2024-04-29_14-44-56
PixPin_2024-04-29_15-28-00
PixPin_2024-04-29_15-28-35

@m-aliozkaya
Copy link
Member

Hi @vincywindy,

I tested your pull request and reviewed the code. But such a change is not suitable for the architecture of the boilerplate. If we think like this, we would need to make similar changes in many places. Adding extra tenant filters in many places for developers would not be very sustainable. Instead, we often recommend not removing the MayHaveTenant filter.

@ismcagdas ismcagdas removed this from the v9.3 milestone May 20, 2024
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 a pull request may close this issue.

3 participants