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

Found 2 known vulnerabilities in the Gin(GO-2022-0969 & GO-2022-0288) #3332

Closed
mstmdev opened this issue Sep 22, 2022 · 1 comment · Fixed by #3333
Closed

Found 2 known vulnerabilities in the Gin(GO-2022-0969 & GO-2022-0288) #3332

mstmdev opened this issue Sep 22, 2022 · 1 comment · Fixed by #3333

Comments

@mstmdev
Copy link
Contributor

mstmdev commented Sep 22, 2022

Scan Vulnerability Database with the following command

$ go install golang.org/x/vuln/cmd/govulncheck@latest
$ govulncheck ./...
Vulnerability #1: GO-2022-0969
  HTTP/2 server connections can hang forever waiting for a clean
  shutdown that was preempted by a fatal error. This condition can
  be exploited by a malicious client to cause a denial of service.

  Call stacks in your code:
      gin.go:561:18: github.com/gin-gonic/gin.Engine.RunListener calls net/http.Serve, which eventually calls golang.org/x/net/http2.Server.ServeConn

  Found in: golang.org/x/net/http2@v0.0.0-20211112202133-69e39bad7dc2
  Fixed in: golang.org/x/net/http2@v0.0.0-20220906165146-f3363e06e74c
  More info: https://pkg.go.dev/vuln/GO-2022-0969

Vulnerability #2: GO-2022-0288
  An attacker can cause unbounded memory growth in servers
  accepting HTTP/2 requests.

  Call stacks in your code:
      gin.go:561:18: github.com/gin-gonic/gin.Engine.RunListener calls net/http.Serve, which eventually calls golang.org/x/net/http2.Server.ServeConn

  Found in: golang.org/x/net/http2@v0.0.0-20211112202133-69e39bad7dc2
  Fixed in: golang.org/x/net/http2@v0.0.0-20211209124913-491a49abca63
  More info: https://pkg.go.dev/vuln/GO-2022-0288
@jerome-laforge
Copy link
Contributor

As workaround in order to mitigate this CVE:

go get golang.org/x/net@latest
go: upgraded golang.org/x/net v0.0.0-20220624214902-1bab6f366d9e => v0.0.0-20220921203646-d300de134e69
go: upgraded golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a => v0.0.0-20220728004956-3c1f35247d10

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

Successfully merging a pull request may close this issue.

2 participants