Skip to content
Heist/ feed
Back to feed
MediumFix available

golang-github-go-resty-resty — security advisory

Type: advisorySources: OSVAdvisory ID: DEBIAN-CVE-2023-45286

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.

Products
golang-github-go-resty-resty
Affected versions
2.10.0-1, 2.10.0-2, 2.6.0-1
Fixed versions
2.10.0-2
CVEs
CVE-2023-45286
Confirmed fixed CVEs
Not specified
Updated in this feed
1 Nov 2026, 16:11 UTC · Revision 1

Source evidence

DEBIAN-CVE-2023-45286

core-osv · Original source

Published 28 Nov 2023, 17:15 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.

osv:DEBIAN-CVE-2023-45286

golang-github-go-resty-resty

Fixed versions: Not specified

golang-github-go-resty-resty

Fixed versions: 2.10.0-2

golang-github-go-resty-resty

Fixed versions: 2.10.0-2

Complete source record
{
  "id": "70130b6d7164076a590659578b2d70cbd178bb0dfa4fad50659876bece520d33",
  "url": "https://osv.dev/vulnerability/DEBIAN-CVE-2023-45286",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "DEBIAN-CVE-2023-45286",
    "summary": "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.",
    "evidence": "osv:DEBIAN-CVE-2023-45286",
    "products": [
      {
        "name": {
          "value": "golang-github-go-resty-resty",
          "evidence": "/affected/0/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [],
        "affected_versions": [
          {
            "value": "2.10.0-1",
            "evidence": "/affected/0/versions"
          },
          {
            "value": "2.10.0-2",
            "evidence": "/affected/0/versions"
          },
          {
            "value": "2.6.0-1",
            "evidence": "/affected/0/versions"
          }
        ]
      },
      {
        "name": {
          "value": "golang-github-go-resty-resty",
          "evidence": "/affected/1/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "2.10.0-2",
            "evidence": "/affected/1/ranges"
          }
        ],
        "affected_versions": []
      },
      {
        "name": {
          "value": "golang-github-go-resty-resty",
          "evidence": "/affected/2/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "2.10.0-2",
            "evidence": "/affected/2/ranges"
          }
        ],
        "affected_versions": []
      }
    ],
    "severity": "medium",
    "structured": {
      "id": "DEBIAN-CVE-2023-45286",
      "aliases": [
        "DEBIAN-CVE-2023-45286"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                }
              ]
            }
          ],
          "package": {
            "name": "golang-github-go-resty-resty",
            "purl": "pkg:deb/debian/golang-github-go-resty-resty?arch=source&distro=bookworm",
            "ecosystem": "Debian:12"
          },
          "versions": [
            "2.10.0-1",
            "2.10.0-2",
            "2.6.0-1"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/debian-osv/debian-cve-osv/DEBIAN-CVE-2023-45286.json"
          },
          "ecosystem_specific": {
            "urgency": "not yet assigned"
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "2.10.0-2"
                }
              ]
            }
          ],
          "package": {
            "name": "golang-github-go-resty-resty",
            "purl": "pkg:deb/debian/golang-github-go-resty-resty?arch=source&distro=trixie",
            "ecosystem": "Debian:13"
          },
          "database_specific": {
            "source": "https://storage.googleapis.com/debian-osv/debian-cve-osv/DEBIAN-CVE-2023-45286.json"
          },
          "ecosystem_specific": {
            "urgency": "not yet assigned"
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "2.10.0-2"
                }
              ]
            }
          ],
          "package": {
            "name": "golang-github-go-resty-resty",
            "purl": "pkg:deb/debian/golang-github-go-resty-resty?arch=source&distro=forky",
            "ecosystem": "Debian:14"
          },
          "database_specific": {
            "source": "https://storage.googleapis.com/debian-osv/debian-cve-osv/DEBIAN-CVE-2023-45286.json"
          },
          "ecosystem_specific": {
            "urgency": "not yet assigned"
          }
        }
      ],
      "modified": "2026-10-26T18:02:49.509064459Z",
      "provider": "osv",
      "upstream": [
        "CVE-2023-45286"
      ],
      "references": [
        "https://security-tracker.debian.org/tracker/CVE-2023-45286"
      ]
    },
    "related_cves": [
      {
        "value": "CVE-2023-45286",
        "evidence": "/upstream"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 456920,
  "published_at": "2023-11-28T17:15:08.28+00:00"
}