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

Directory Traversal Vulnerability #8

Closed
0clickjacking0 opened this issue May 4, 2022 · 1 comment
Closed

Directory Traversal Vulnerability #8

0clickjacking0 opened this issue May 4, 2022 · 1 comment

Comments

@0clickjacking0
Copy link

Vulnerability file address

internal/controllers/admin/setting/adminSystemController.go line 83 ,c.Query("path") the incoming path value is not filtered, resulting in directory traversal.

path = gstrings.JoinStr(configs.RootPath, c.Query("path"))

	files, err = ioutil.ReadDir(path)
	if err != nil {
		con.Error(c, "获取目录失败")
		return
	}

POC

http://ip:port/admin/setting/system/getdir?path=

Attack results pictures

image-20220504175652799

gphper added a commit that referenced this issue May 8, 2022
@gphper
Copy link
Owner

gphper commented May 10, 2022

You're right.,this bug has been fixed

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

2 participants