newbee-ltd / newbee-mall-plus

🔥 🎉newbee-mall-plus 项目是 newbee-mall 项目的升级版本,增加了优惠券模块、商品秒杀模块、支付宝支付,优化了搜索功能,后续会继续增加功能模块以及流行的技术栈。

Home Page:http://121.4.124.33:9001

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[security vulnerability] Arbitrary Coupon Delete Vulnerability

GatekeeperBuster opened this issue · comments

Recently, our team found an arbitrary coupon usage vulnerability in the latest version of the project.
The vulnerability logic is present in the file: https://github.com/newbee-ltd/newbee-mall-plus/blob/main/src/main/java/ltd/newbee/mall/controller/mall/CouponController.java#L67

Unauthorized access to the @DeleteMapping("coupon/{couponUserId}") API enables attackers to manipulate the query param couponUserId and delete coupons belonging to other users.

image

To address this vulnerability, we strongly recommend that developers implement access control policies to ensure that only privileged users or the owner are authorized to perform the delete operation.