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

[security vulnerability] Arbitrary User Information Access Vulnerability #103

Open
GatekeeperBuster opened this issue May 5, 2023 · 0 comments

Comments

@GatekeeperBuster
Copy link

Recently, our team found an arbitrary user info access vulnerability in the latest version of the project.

The vulnerability logic is present in the file: https://github.com/youlaitech/youlai-mall/blob/master/youlai-system/system-boot/src/main/java/com/youlai/system/controller/SysUserController.java#L59.

image

The API getUserDetail() is not protected by the @PreAuthorize annotation, which means that a regular user can access other users' information by requesting /api/v1/users/{userId}/form, just as admin users can. This could lead to a breach of user privacy data.

We highly recommend that developers add the @PreAuthorize annotation for getUserDetail() to ensure that only admin users can access this API and prevent unauthorized access to sensitive user information.

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

No branches or pull requests

1 participant