CVE-2023-45286
HTTP request body disclosure in github.com/go-resty/resty/v2
- Published
- Updated
- Reserved
- Assigned by
- Go
Description
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.
Scores
| Scored by | CVSS | Score | Vector |
|---|---|---|---|
| NVDNVD · Modified | 3.1 | Medium5.9 | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N |
- EPSS (exploitation in 30 days)
- 0.72% · top 46% of all CVEs (6 Nov 2026)
- CISA SSVC
- Exploitation: none · Automatable: no · Technical impact: partial
The list uses the assigner's score when there is one, then CISA's, then NVD's: Medium 5.9.
Weakness
- CWE-200: Exposure of Sensitive Information to an Unauthorized Actor
- CWE-362 (opens in a new tab)All about CWE-362 and its CVEs
Affected products
github.com/go-resty/resty/v2 · github.com/go-resty/resty/v2
- affected 2.10.0 – < 2.11.0
Affected packages
From reviewed advisories of the GitHub Advisory Database.
- Gogithub.com/go-resty/resty/v2GHSA-xwh9-gc39-5298 (opens in a new tab)
References (5)
- https://github.com/go-resty/resty/issues/743 (opens in a new tab)x_transferred
- https://github.com/go-resty/resty/issues/739 (opens in a new tab)x_transferred
- https://github.com/go-resty/resty/pull/745 (opens in a new tab)x_transferred
- https://github.com/go-resty/resty/commit/577fed8730d79f583eb48dfc81674164e1fc471e (opens in a new tab)x_transferred
- https://pkg.go.dev/vuln/GO-2023-2328 (opens in a new tab)x_transferred
Sources
The same CVE in the primary databases and aggregators, to check against.
- CVE.org record (opens in a new tab)
- CVE List JSON (GitHub) (opens in a new tab)
- NVD (opens in a new tab)
- FIRST EPSS (opens in a new tab)
- OSV.dev (opens in a new tab)
- GitHub Advisory GHSA-xwh9-gc39-5298 (opens in a new tab)
- CIRCL Vulnerability-Lookup (opens in a new tab)
Badge for a README or a ticket
[](https://trackcve.app/cve/CVE-2023-45286)Record last updated .