CVE-2023-45286HTTP request body disclosure in github.com/go-resty/resty/v2
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.
What to do
Fixed builds are available from Debian, Go: see the table below for the fixed version per release.
Debian, Ubuntu have not shipped a fix for every release yet.
Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.
curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \ -H "Content-Type: text/plain" --data-binary @inventory.txt
Vendor status at a glance
Status by vendor and release
From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.
| Release | Package | Status | Fixed version | Advisory |
|---|---|---|---|---|
| Ubuntu 26.10 | golang-github-go-resty-resty | Fix pending | UBUNTU-CVE-2023-45286 | |
| Ubuntu 26.04 | golang-github-go-resty-resty | Under investigation | UBUNTU-CVE-2023-45286 | |
| Ubuntu 25.10 | golang-github-go-resty-resty | Will not fix Ubuntu decided not to fix this in this release | UBUNTU-CVE-2023-45286 | |
| Ubuntu 24.04 | golang-github-go-resty-resty | Under investigation | UBUNTU-CVE-2023-45286 | |
| Ubuntu 22.04 | golang-github-go-resty-resty | Under investigation | UBUNTU-CVE-2023-45286 | |
| Debian 14 | golang-github-go-resty-resty | Fixed | 2.10.0-2 | DEBIAN-CVE-2023-45286 |
| Debian 13 | golang-github-go-resty-resty | Fixed | 2.10.0-2 | DEBIAN-CVE-2023-45286 |
| Debian 12 | golang-github-go-resty-resty | Fix pending | DEBIAN-CVE-2023-45286 | |
| Go library | github.com/go-resty/resty/v2 | Fixed | 2.11.0 | GHSA-xwh9-gc39-5298 |
What the vendor says
As published in the CVE record by Go, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.
- github.com/go-resty/resty/v2: affected: 2.10.0 to before 2.11.0; fixed in
2.11.0
References
- https://github.com/go-resty/resty/issues/743
- https://github.com/go-resty/resty/issues/739
- https://github.com/go-resty/resty/pull/745
- https://github.com/go-resty/resty/commit/577fed8730d79f583eb48dfc81674164e1fc471e
- https://pkg.go.dev/vuln/GO-2023-2328
About this page
Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.