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] Free Payment of Orders #613

Open
GatekeeperBuster opened this issue Jul 3, 2023 · 0 comments
Open

[security vulnerability] Free Payment of Orders #613

GatekeeperBuster opened this issue Jul 3, 2023 · 0 comments

Comments

@GatekeeperBuster
Copy link

Recently, our team found a vulnerability causing the free payment of orders in the latest version of the project.

The vulnerability logic is present in the file:
https://github.com/macrozheng/mall/blob/master/mall-portal/src/main/java/com/macro/mall/portal/service/impl/OmsPortalOrderServiceImpl.java#L246

image

The issue arises from the lack of verification of the user's privilege level when updating the order status using orderMapper.updateByPrimaryKeySelective(). Additionally, access to the corresponding callback API /order/paySuccess (located at: https://github.com/macrozheng/mall/blob/master/mall-portal/src/main/java/com/macro/mall/portal/controller/OmsPortalOrderController.java#L51) has not been restricted to the normal user. As a result, attackers can manipulate the param orderId and change the payment status of unpaid orders to achieve free payment.

image

To address this vulnerability, we recommend that developers implement access control policies to restrict the modification of order status.

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