5.9
MEDIUM
CVE-2023-45286
Go-Resty HTTP Request Body Disclosure Race Condition
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.

INFO

Published Date :

Nov. 28, 2023, 5:15 p.m.

Last Modified :

Jan. 4, 2024, 7:15 p.m.

Remotely Exploitable :

Yes !

Impact Score :

3.6

Exploitability Score :

2.2
Affected Products

The following products are affected by CVE-2023-45286 vulnerability. Even if cvefeed.io is aware of the exact versions of the products that are affected, the information is not represented in the table below.

ID Vendor Product Action
1 Resty_project resty
References to Advisories, Solutions, and Tools

Here, you will find a curated list of external links that provide in-depth information, practical solutions, and valuable tools related to CVE-2023-45286.

URL Resource
https://github.com/go-resty/resty/commit/577fed8730d79f583eb48dfc81674164e1fc471e
https://github.com/go-resty/resty/issues/739 Exploit Issue Tracking
https://github.com/go-resty/resty/issues/743 Issue Tracking
https://github.com/go-resty/resty/pull/745 Issue Tracking Patch
https://pkg.go.dev/vuln/GO-2023-2328 Vendor Advisory

We scan GitHub repositories to detect new proof-of-concept exploits. Following list is a collection of public exploits and proof-of-concepts, which have been published on GitHub (sorted by the most recently updated).

Results are limited to the first 15 repositories due to potential performance issues.

The following list is the news that have been mention CVE-2023-45286 vulnerability anywhere in the article.

The following table lists the changes that have been made to the CVE-2023-45286 vulnerability over time.

Vulnerability history details can be useful for understanding the evolution of a vulnerability, and for identifying the most recent changes that may impact the vulnerability's severity, exploitability, or other characteristics.

  • CVE Modified by [email protected]

    May. 14, 2024

    Action Type Old Value New Value
  • CVE Modified by [email protected]

    Jan. 04, 2024

    Action Type Old Value New Value
    Added Reference Go Project https://github.com/go-resty/resty/commit/577fed8730d79f583eb48dfc81674164e1fc471e [No types assigned]
  • Reanalysis by [email protected]

    Dec. 05, 2023

    Action Type Old Value New Value
    Changed CPE Configuration OR *cpe:2.3:a:resty_project:resty:*:*:*:*:*:go:*:* versions up to (excluding) 2.10.0 OR *cpe:2.3:a:resty_project:resty:*:*:*:*:*:go:*:* versions up to (including) 2.10.0
  • Initial Analysis by [email protected]

    Dec. 04, 2023

    Action Type Old Value New Value
    Added CVSS V3.1 NIST AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N
    Changed Reference Type https://github.com/go-resty/resty/issues/739 No Types Assigned https://github.com/go-resty/resty/issues/739 Exploit, Issue Tracking
    Changed Reference Type https://github.com/go-resty/resty/issues/743 No Types Assigned https://github.com/go-resty/resty/issues/743 Issue Tracking
    Changed Reference Type https://github.com/go-resty/resty/pull/745 No Types Assigned https://github.com/go-resty/resty/pull/745 Issue Tracking, Patch
    Changed Reference Type https://pkg.go.dev/vuln/GO-2023-2328 No Types Assigned https://pkg.go.dev/vuln/GO-2023-2328 Vendor Advisory
    Added CWE NIST CWE-362
    Added CPE Configuration OR *cpe:2.3:a:resty_project:resty:*:*:*:*:*:go:*:* versions up to (excluding) 2.10.0
  • CVE Received by [email protected]

    Nov. 28, 2023

    Action Type Old Value New Value
    Added 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.
    Added Reference Go Project https://github.com/go-resty/resty/issues/743 [No types assigned]
    Added Reference Go Project https://github.com/go-resty/resty/issues/739 [No types assigned]
    Added Reference Go Project https://github.com/go-resty/resty/pull/745 [No types assigned]
    Added Reference Go Project https://pkg.go.dev/vuln/GO-2023-2328 [No types assigned]
EPSS is a daily estimate of the probability of exploitation activity being observed over the next 30 days. Following chart shows the EPSS score history of the vulnerability.
CWE - Common Weakness Enumeration

While CVE identifies specific instances of vulnerabilities, CWE categorizes the common flaws or weaknesses that can lead to vulnerabilities. CVE-2023-45286 is associated with the following CWEs:

Common Attack Pattern Enumeration and Classification (CAPEC)

Common Attack Pattern Enumeration and Classification (CAPEC) stores attack patterns, which are descriptions of the common attributes and approaches employed by adversaries to exploit the CVE-2023-45286 weaknesses.

Exploit Prediction

EPSS is a daily estimate of the probability of exploitation activity being observed over the next 30 days.

0.10 }} 0.02%

score

0.43634

percentile

CVSS31 - Vulnerability Scoring System
Attack Vector
Attack Complexity
Privileges Required
User Interaction
Scope
Confidentiality
Integrity
Availability