Skip to content

Race Condition Vulnerabilit that making user lose privileges #2

@superoo1

Description

@superoo1

code in https://github.com/anerg2046/go-admin-server/blob/master/app/http/repo/Role.go , the function Assign .
when giving someone privileges it will remove the user's all privileges first. In some Race Conditions , it will make user lose privileges
rce_condition

exploit:
requests the api in 50 threads ,
threads

comm users has no privileges,and the slow sql log see delete all the user's casbin_rule

slow_log
and you can not login the system .
cant_login

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions