CVEfocus › CVE database › CVE-2023-45286

CVE-2023-45286HTTP request body disclosure in github.com/go-resty/resty/v2

CVSS 5.9 MediumEPSS 0.7% (higher than 55% of CVEs)Published 2023-11-28Updated 2024-08-28Assigner: Go

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

3Fixed
2Fix pending
3Under investigation
1Will not fix

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.

ReleasePackageStatusFixed versionAdvisory
Ubuntu 26.10golang-github-go-resty-restyFix pendingUBUNTU-CVE-2023-45286
Ubuntu 26.04golang-github-go-resty-restyUnder investigationUBUNTU-CVE-2023-45286
Ubuntu 25.10golang-github-go-resty-restyWill not fix
Ubuntu decided not to fix this in this release
UBUNTU-CVE-2023-45286
Ubuntu 24.04golang-github-go-resty-restyUnder investigationUBUNTU-CVE-2023-45286
Ubuntu 22.04golang-github-go-resty-restyUnder investigationUBUNTU-CVE-2023-45286
Debian 14golang-github-go-resty-restyFixed2.10.0-2DEBIAN-CVE-2023-45286
Debian 13golang-github-go-resty-restyFixed2.10.0-2DEBIAN-CVE-2023-45286
Debian 12golang-github-go-resty-restyFix pendingDEBIAN-CVE-2023-45286
Go librarygithub.com/go-resty/resty/v2Fixed2.11.0GHSA-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.

References

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.