Bugzilla – Bug 1217625
VUL-0: TRACKERBUG: CVE-2023-45286: go-resty: HTTP request body disclosure in github.com/go-resty/resty/v2
Last modified: 2023-11-29 10:08:29 UTC
A race condition in go-resty can result in HTTP request body disclosure across requests. This condition can be triggered by calling sync.Pool.Put with the same *bytes.Buffer more than once, when request retries are enabled and a retry occurs. The call to sync.Pool.Get will then return a bytes.Buffer that hasn't had bytes.Buffer.Reset called on it. This dirty buffer will contain the HTTP request body from an unrelated request, and go-resty will append the current HTTP request body to it, sending two bodies in one request. The sync.Pool in question is defined at package level scope, so a completely unrelated server could receive the request body. References: http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2023-45286
resty/v2 embedded in the following packages: openSUSE:Factory/golang-github-prometheus-prometheus,3,github.com/go-resty/resty/v2,v2.7.0 openSUSE:Factory/teleport,8,github.com/go-resty/resty/v2,v2.3.0 openSUSE:Factory/traefik,9,github.com/go-resty/resty/v2,v2.1.1-0.20191201195748-d7b97669fe48 openSUSE:Factory/weave-gitops,9,github.com/go-resty/resty/v2,v2.7.0 SUSE:ALP:Source:Standard:1.0/golang-github-prometheus-prometheus,3,github.com/go-resty/resty/v2,v2.7.0 SUSE:SLE-12:Update/golang-github-prometheus-prometheus,1,github.com/go-resty/resty/v2,v2.1.1-0.20191201195748-d7b97669fe48 SUSE:SLE-15-SP1:Update/golang-github-prometheus-prometheus,1,github.com/go-resty/resty/v2,v2.1.1-0.20191201195748-d7b97669fe48 SUSE:SLE-15-SP3:Update:Products:SES7:Update/rook,3,gopkg.in/resty.v1,v1.12.0 SUSE:SLE-15:Update/golang-github-prometheus-prometheus,1,github.com/go-resty/resty/v2,v2.1.1-0.20191201195748-d7b97669fe48
The issue was introduced in go-resty/v2 v2.10.0. None of the packages are affected. Closing