Skip to content

Commit

Permalink
data/reports: add GO-2023-2328.yaml
Browse files Browse the repository at this point in the history
Aliases: CVE-2023-45286

Updates #2328

Change-Id: I5c53cf4e061c940f30dd68ae3593ff3b39f168bf
Reviewed-on: https://go-review.googlesource.com/c/vulndb/+/545206
LUCI-TryBot-Result: Go LUCI <[email protected]>
Reviewed-by: Damien Neil <[email protected]>
  • Loading branch information
tatianab committed Nov 27, 2023
1 parent cb7bbc5 commit edf27d2
Show file tree
Hide file tree
Showing 3 changed files with 218 additions and 0 deletions.
103 changes: 103 additions & 0 deletions data/cve/v5/GO-2023-2328.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
{
"dataType": "CVE_RECORD",
"dataVersion": "5.0",
"cveMetadata": {
"cveId": "CVE-2023-45286"
},
"containers": {
"cna": {
"providerMetadata": {
"orgId": "1bb62c36-49e3-4200-9d77-64a1400537cc"
},
"title": "HTTP request body disclosure in github.com/go-resty/resty/v2",
"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."
}
],
"affected": [
{
"vendor": "github.com/go-resty/resty/v2",
"product": "github.com/go-resty/resty/v2",
"collectionURL": "https://pkg.go.dev",
"packageName": "github.com/go-resty/resty/v2",
"versions": [
{
"version": "2.10.0",
"lessThan": "",
"status": "affected",
"versionType": "semver"
}
],
"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"
}
],
"defaultStatus": "unaffected"
}
],
"problemTypes": [
{
"descriptions": [
{
"lang": "en",
"description": "CWE-200: Exposure of Sensitive Information to an Unauthorized Actor"
}
]
}
],
"references": [
{
"url": "https://github.com/go-resty/resty/issues/743"
},
{
"url": "https://github.com/go-resty/resty/issues/739"
},
{
"url": "https://github.com/go-resty/resty/pull/745"
},
{
"url": "https://pkg.go.dev/vuln/GO-2023-2328"
}
],
"credits": [
{
"lang": "en",
"value": "Logan Attwood (@lattwood)"
}
]
}
}
}
71 changes: 71 additions & 0 deletions data/osv/GO-2023-2328.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
{
"schema_version": "1.3.1",
"id": "GO-2023-2328",
"modified": "0001-01-01T00:00:00Z",
"published": "0001-01-01T00:00:00Z",
"aliases": [
"CVE-2023-45286"
],
"summary": "HTTP request body disclosure in github.com/go-resty/resty/v2",
"details": "A race condition in go-resty can result in HTTP request body disclosure across requests.\n\nThis 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.\n\nThe sync.Pool in question is defined at package level scope, so a completely unrelated server could receive the request body.",
"affected": [
{
"package": {
"name": "github.com/go-resty/resty/v2",
"ecosystem": "Go"
},
"ranges": [
{
"type": "SEMVER",
"events": [
{
"introduced": "2.10.0"
}
]
}
],
"ecosystem_specific": {
"imports": [
{
"path": "github.com/go-resty/resty/v2",
"symbols": [
"Backoff",
"Request.Delete",
"Request.Execute",
"Request.Get",
"Request.Head",
"Request.Options",
"Request.Patch",
"Request.Post",
"Request.Put",
"Request.Send",
"handleRequestBody"
]
}
]
}
}
],
"references": [
{
"type": "REPORT",
"url": "https://github.com/go-resty/resty/issues/743"
},
{
"type": "REPORT",
"url": "https://github.com/go-resty/resty/issues/739"
},
{
"type": "FIX",
"url": "https://github.com/go-resty/resty/pull/745"
}
],
"credits": [
{
"name": "Logan Attwood (@lattwood)"
}
],
"database_specific": {
"url": "https://pkg.go.dev/vuln/GO-2023-2328"
}
}
44 changes: 44 additions & 0 deletions data/reports/GO-2023-2328.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
id: GO-2023-2328
modules:
- module: github.com/go-resty/resty/v2
versions:
- introduced: 2.10.0
vulnerable_at: 2.10.0
packages:
- package: github.com/go-resty/resty/v2
symbols:
- handleRequestBody
derived_symbols:
- Backoff
- Request.Delete
- Request.Execute
- Request.Get
- Request.Head
- Request.Options
- Request.Patch
- Request.Post
- Request.Put
- Request.Send
summary: HTTP request body disclosure in github.com/go-resty/resty/v2
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.
credits:
- Logan Attwood (@lattwood)
references:
- report: https://github.com/go-resty/resty/issues/743
- report: https://github.com/go-resty/resty/issues/739
- fix: https://github.com/go-resty/resty/pull/745
cve_metadata:
id: CVE-2023-45286
cwe: 'CWE-200: Exposure of Sensitive Information to an Unauthorized Actor'

0 comments on commit edf27d2

Please sign in to comment.