GCVE Workshop - 22 September 2026 (14:00-18:00), Luxembourg Before The Vulnopticon Conference - Registration

FKIE_CVE-2023-45286

Vulnerability from fkie_nvd - Published: 2023-11-28 17:15 - Updated: 2026-06-17 06:28
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.
Impacted products
Vendor Product Version
resty_project resty *

{
  "affected": [
    {
      "affectedData": [
        {
          "collectionURL": "https://pkg.go.dev",
          "defaultStatus": "unaffected",
          "packageName": "github.com/go-resty/resty/v2",
          "product": "github.com/go-resty/resty/v2",
          "programRoutines": [
            {
              "name": "handleRequestBody"
            },
            {
              "name": "Backoff"
            },
            {
              "name": "Request.Delete"
            },
            {
              "name": "Request.Execute"
            },
            {
              "name": "Request.Get"
            },
            {
              "name": "Request.Head"
            },
            {
              "name": "Request.Options"
            },
            {
              "name": "Request.Patch"
            },
            {
              "name": "Request.Post"
            },
            {
              "name": "Request.Put"
            },
            {
              "name": "Request.Send"
            }
          ],
          "vendor": "github.com/go-resty/resty/v2",
          "versions": [
            {
              "lessThan": "2.11.0",
              "status": "affected",
              "version": "2.10.0",
              "versionType": "semver"
            }
          ]
        }
      ],
      "source": "security@golang.org"
    }
  ],
  "configurations": [
    {
      "nodes": [
        {
          "cpeMatch": [
            {
              "criteria": "cpe:2.3:a:resty_project:resty:*:*:*:*:*:go:*:*",
              "matchCriteriaId": "433974E8-CB64-4BBB-BB5A-9F072275B86F",
              "versionEndIncluding": "2.10.0",
              "vulnerable": true
            }
          ],
          "negate": false,
          "operator": "OR"
        }
      ]
    }
  ],
  "cveTags": [],
  "descriptions": [
    {
      "lang": "en",
      "value": "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\u0027t 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."
    },
    {
      "lang": "es",
      "value": "Una condici\u00f3n de ejecuci\u00f3n en go-resty puede dar como resultado la divulgaci\u00f3n del cuerpo de la solicitud HTTP entre solicitudes. Esta condici\u00f3n se puede desencadenar llamando a sync.Pool.Put con el mismo *bytes.Buffer m\u00e1s de una vez, cuando los reintentos de solicitud est\u00e1n habilitados y se produce un reintento. La llamada a sync.Pool.Get devolver\u00e1 un bytes.Buffer al que no se le ha llamado bytes.Buffer.Reset. Este b\u00fafer sucio contendr\u00e1 el cuerpo de la solicitud HTTP de una solicitud no relacionada, y go-resty le agregar\u00e1 el cuerpo de la solicitud HTTP actual, enviando dos cuerpos en una solicitud. El sync.Pool en cuesti\u00f3n se define a nivel de paquete, por lo que un servidor completamente ajeno podr\u00eda recibir el cuerpo de la solicitud."
    }
  ],
  "id": "CVE-2023-45286",
  "lastModified": "2026-06-17T06:28:35.330",
  "metrics": {
    "cvssMetricV31": [
      {
        "cvssData": {
          "attackComplexity": "HIGH",
          "attackVector": "NETWORK",
          "availabilityImpact": "NONE",
          "baseScore": 5.9,
          "baseSeverity": "MEDIUM",
          "confidentialityImpact": "HIGH",
          "integrityImpact": "NONE",
          "privilegesRequired": "NONE",
          "scope": "UNCHANGED",
          "userInteraction": "NONE",
          "vectorString": "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N",
          "version": "3.1"
        },
        "exploitabilityScore": 2.2,
        "impactScore": 3.6,
        "source": "nvd@nist.gov",
        "type": "Primary"
      }
    ],
    "ssvcV203": [
      {
        "source": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
        "ssvcData": {
          "id": "CVE-2023-45286",
          "options": [
            {
              "exploitation": "none"
            },
            {
              "automatable": "no"
            },
            {
              "technicalImpact": "partial"
            }
          ],
          "role": "CISA Coordinator",
          "timestamp": "2024-08-28T20:00:00.708483Z",
          "version": "2.0.3"
        }
      }
    ]
  },
  "published": "2023-11-28T17:15:08.280",
  "references": [
    {
      "source": "security@golang.org",
      "url": "https://github.com/go-resty/resty/commit/577fed8730d79f583eb48dfc81674164e1fc471e"
    },
    {
      "source": "security@golang.org",
      "tags": [
        "Exploit",
        "Issue Tracking"
      ],
      "url": "https://github.com/go-resty/resty/issues/739"
    },
    {
      "source": "security@golang.org",
      "tags": [
        "Issue Tracking"
      ],
      "url": "https://github.com/go-resty/resty/issues/743"
    },
    {
      "source": "security@golang.org",
      "tags": [
        "Issue Tracking",
        "Patch"
      ],
      "url": "https://github.com/go-resty/resty/pull/745"
    },
    {
      "source": "security@golang.org",
      "tags": [
        "Vendor Advisory"
      ],
      "url": "https://pkg.go.dev/vuln/GO-2023-2328"
    },
    {
      "source": "af854a3a-2127-422b-91ae-364da2661108",
      "url": "https://github.com/go-resty/resty/commit/577fed8730d79f583eb48dfc81674164e1fc471e"
    },
    {
      "source": "af854a3a-2127-422b-91ae-364da2661108",
      "tags": [
        "Exploit",
        "Issue Tracking"
      ],
      "url": "https://github.com/go-resty/resty/issues/739"
    },
    {
      "source": "af854a3a-2127-422b-91ae-364da2661108",
      "tags": [
        "Issue Tracking"
      ],
      "url": "https://github.com/go-resty/resty/issues/743"
    },
    {
      "source": "af854a3a-2127-422b-91ae-364da2661108",
      "tags": [
        "Issue Tracking",
        "Patch"
      ],
      "url": "https://github.com/go-resty/resty/pull/745"
    },
    {
      "source": "af854a3a-2127-422b-91ae-364da2661108",
      "tags": [
        "Vendor Advisory"
      ],
      "url": "https://pkg.go.dev/vuln/GO-2023-2328"
    }
  ],
  "sourceIdentifier": "security@golang.org",
  "vulnStatus": "Modified",
  "weaknesses": [
    {
      "description": [
        {
          "lang": "en",
          "value": "CWE-362"
        }
      ],
      "source": "nvd@nist.gov",
      "type": "Primary"
    }
  ]
}



Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Forecast uses a logistic model when the trend is rising, or an exponential decay model when the trend is falling. Fitted via linearized least squares.

Sightings

Author Source Type Date Other

Nomenclature

  • Seen: The vulnerability was mentioned, discussed, or observed by the user.
  • Confirmed: The vulnerability has been validated from an analyst's perspective.
  • Published Proof of Concept: A public proof of concept is available for this vulnerability.
  • Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
  • Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
  • Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
  • Not confirmed: The user expressed doubt about the validity of the vulnerability.
  • Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.

Loading…

Detection rules are retrieved from Rulezet.

Loading…

Loading…

Related by attack behaviour

Vulnerabilities whose description is nearest to this one in the vector space of the CIRCL/vulnerability-attack-technique-biencoder model. This is a similarity search over the bi-encoder space (plain cosine), not a classification, and it has no measured accuracy.


Loading…