gsd-2023-45286
Vulnerability from gsd
Modified
2023-12-13 01:20
Details
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.
Aliases
Aliases



{
   GSD: {
      alias: "CVE-2023-45286",
      id: "GSD-2023-45286",
   },
   gsd: {
      metadata: {
         exploitCode: "unknown",
         remediation: "unknown",
         reportConfidence: "confirmed",
         type: "vulnerability",
      },
      osvSchema: {
         aliases: [
            "CVE-2023-45286",
         ],
         details: "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.",
         id: "GSD-2023-45286",
         modified: "2023-12-13T01:20:38.301205Z",
         schema_version: "1.4.0",
      },
   },
   namespaces: {
      "cve.org": {
         CVE_data_meta: {
            ASSIGNER: "security@golang.org",
            ID: "CVE-2023-45286",
            STATE: "PUBLIC",
         },
         affects: {
            vendor: {
               vendor_data: [
                  {
                     product: {
                        product_data: [
                           {
                              product_name: "github.com/go-resty/resty/v2",
                              version: {
                                 version_data: [
                                    {
                                       version_affected: "<",
                                       version_name: "2.10.0",
                                       version_value: "2.11.0",
                                    },
                                 ],
                              },
                           },
                        ],
                     },
                     vendor_name: "github.com/go-resty/resty/v2",
                  },
               ],
            },
         },
         credits: [
            {
               lang: "en",
               value: "Logan Attwood (@lattwood)",
            },
         ],
         data_format: "MITRE",
         data_type: "CVE",
         data_version: "4.0",
         description: {
            description_data: [
               {
                  lang: "eng",
                  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'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.",
               },
            ],
         },
         problemtype: {
            problemtype_data: [
               {
                  description: [
                     {
                        lang: "eng",
                        value: "CWE-200: Exposure of Sensitive Information to an Unauthorized Actor",
                     },
                  ],
               },
            ],
         },
         references: {
            reference_data: [
               {
                  name: "https://github.com/go-resty/resty/issues/743",
                  refsource: "MISC",
                  url: "https://github.com/go-resty/resty/issues/743",
               },
               {
                  name: "https://github.com/go-resty/resty/issues/739",
                  refsource: "MISC",
                  url: "https://github.com/go-resty/resty/issues/739",
               },
               {
                  name: "https://github.com/go-resty/resty/pull/745",
                  refsource: "MISC",
                  url: "https://github.com/go-resty/resty/pull/745",
               },
               {
                  name: "https://github.com/go-resty/resty/commit/577fed8730d79f583eb48dfc81674164e1fc471e",
                  refsource: "MISC",
                  url: "https://github.com/go-resty/resty/commit/577fed8730d79f583eb48dfc81674164e1fc471e",
               },
               {
                  name: "https://pkg.go.dev/vuln/GO-2023-2328",
                  refsource: "MISC",
                  url: "https://pkg.go.dev/vuln/GO-2023-2328",
               },
            ],
         },
      },
      "nvd.nist.gov": {
         cve: {
            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",
                     },
                  ],
               },
            ],
            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'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.",
               },
               {
                  lang: "es",
                  value: "Una condición de ejecución en go-resty puede dar como resultado la divulgación del cuerpo de la solicitud HTTP entre solicitudes. Esta condición se puede desencadenar llamando a sync.Pool.Put con el mismo *bytes.Buffer más de una vez, cuando los reintentos de solicitud están habilitados y se produce un reintento. La llamada a sync.Pool.Get devolverá un bytes.Buffer al que no se le ha llamado bytes.Buffer.Reset. Este búfer sucio contendrá el cuerpo de la solicitud HTTP de una solicitud no relacionada, y go-resty le agregará el cuerpo de la solicitud HTTP actual, enviando dos cuerpos en una solicitud. El sync.Pool en cuestión se define a nivel de paquete, por lo que un servidor completamente ajeno podría recibir el cuerpo de la solicitud.",
               },
            ],
            id: "CVE-2023-45286",
            lastModified: "2024-01-04T19:15:08.737",
            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",
                  },
               ],
            },
            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",
               },
            ],
            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.

Security Advisory comment format.

This schema specifies the format of a comment related to a security advisory.

UUIDv4 of the comment
UUIDv4 of the Vulnerability-Lookup instance
When the comment was created originally
When the comment was last updated
Title of the comment
Description of the comment
The identifier of the vulnerability (CVE ID, GHSA-ID, PYSEC ID, etc.).



Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Sightings

Author Source Type Date

Nomenclature

  • Seen: The vulnerability was mentioned, discussed, or seen somewhere by the user.
  • Confirmed: The vulnerability is confirmed from an analyst perspective.
  • Exploited: This vulnerability was exploited and seen by the user reporting the sighting.
  • Patched: This vulnerability was successfully patched by the user reporting the sighting.
  • Not exploited: This vulnerability was not exploited or seen by the user reporting the sighting.
  • Not confirmed: The user expresses doubt about the veracity of the vulnerability.
  • Not patched: This vulnerability was not successfully patched by the user reporting the sighting.