didi / KnowStreaming

一站式云原生实时流数据平台,通过0侵入、插件化构建企业级Kafka服务,极大降低操作、存储和管理实时流数据门槛
https://knowstreaming.com
GNU Affero General Public License v3.0
6.93k stars 1.28k forks source link

[Escalation of Privileges] Unauthorized users can create a new user with admin role #1128

Open gaogaostone opened 1 year ago

gaogaostone commented 1 year ago

Env

Steps to reproduce this issue

  1. Get the role id of user "admin". We can send such request to the server. The request is without cookie or token, aka it is unauthorized. If the user's id is not 1, we can guess it with brute force. As shown in the picture, we get the role id 1677.
image
  1. Create a new user with "admin" role. We can send such request to the server. The request is without cookie or token, aka it is unauthorized.

    image
  2. Log on the new user with password. We logged on with an admin role.

image

Expected Results

Unauthorized users should not get user's detail info and should not create a new user.

Actual Results

Unauthorized users get user's detail info and create a new user. The created user logs successfully.