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

asd

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/master/src/main/java/ltd/newbee/mall/service/impl/NewBeeMallOrderServiceImpl.java#L199.

image

The developer failed to check the ownership of the couponUserId with the access user when updating the coupon status via newBeeMallUserCouponRecordMapper.updateByPrimaryKeySelective(), leading to the usage of arbitrary coupon via craft request to /saveOrder (i.e., https://github.com/newbee-ltd/newbee-mall-plus/blob/master/src/main/java/ltd/newbee/mall/controller/mall/OrderController.java#L83),

image

We recommend that developers add the access control policy to ensure that the owner of the coupon is the current accessor.

已修复