{"answers":{"affected":"3 open source packages ship an affected version, including github.com/go-resty/resty/v2. It affects 1 product.","exploited":"There is no known exploitation of CVE-2023-45286 in the wild and no public exploit code.","fix":"Upgrade github.com/go-resty/resty/v2 to 2.11.0 or later.","what":"CVE-2023-45286 is a medium-severity vulnerability in github.com/go-resty/resty/v2, published on 28 Nov 2023. An attacker can exploit it over the internet without logging in, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2023-45286 and fix it if it is affected.\n\nWhat it is: CVE-2023-45286 is a medium-severity vulnerability in github.com/go-resty/resty/v2, published on 28 Nov 2023. An attacker can exploit it over the internet without logging in, with no action from the victim.\nExploitation: There is no known exploitation of CVE-2023-45286 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- github.com/go-resty/resty/v2 (Go): affected from 2.10.0; fixed in 2.11.0\n- github.com/go-resty/resty/v2 (Go): affected from 2.10.0; fixed in 2.11.0\n- github.com/go-resty/resty/v2 (Go): affected from 2.10.0; fixed in 2.11.0\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2023-45286/ (Markdown: https://insights.sbomify.com/CVE-2023-45286/index.md)","id":"CVE-2023-45286","markdown":"https://insights.sbomify.com/CVE-2023-45286/index.md","name":"CVE-2023-45286","record":{"aliases":["AZL-32050","DEBIAN-CVE-2023-45286","GHSA-xwh9-gc39-5298","GO-2023-2328","UBUNTU-CVE-2023-45286"],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["data_read"],"network_reachable":"yes","non_default_config":true,"product_category":"Go HTTP client library","requires_auth":"none","summary":"A race condition in go-resty allows HTTP request body disclosure across requests when retries are enabled, potentially leaking sensitive data to unrelated servers.","user_interaction":"not_required","vuln_class":"race_condition"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"Go","cpe":[{"product":"resty","vendor":"resty_project"}],"cvss":{"score":5.9,"severity":"medium","source":"nvd","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N","version":"3.1"},"cwes":[{"id":"CWE-362","name":"Concurrent Execution using Shared Resource with Improper Synchronization"}],"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.","ecosystems":["Go"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"none_known"},"has_fix":true,"headline":"HTTP request body disclosure in github.com/go-resty/resty/v2","id":"CVE-2023-45286","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"Go","product":null,"products":[],"type":"race_condition","year":"2023"},"n_packages":3,"n_references":5,"next":{"headline":"Before Go 1.20, the RSA based key exchange methods in crypto/tls may exhibit a timing side channel","id":"CVE-2023-45287"},"packages":[{"ecosystem":"Go","fixed":["2.11.0"],"introduced":["2.10.0"],"last_affected":[],"package":"github.com/go-resty/resty/v2","purl":null,"source":"GHSA-xwh9-gc39-5298"},{"ecosystem":"Go","fixed":["2.11.0"],"introduced":["2.10.0"],"last_affected":[],"package":"github.com/go-resty/resty/v2","purl":"pkg:golang/github.com/go-resty/resty/v2","source":"GHSA-xwh9-gc39-5298"},{"ecosystem":"Go","fixed":["2.11.0"],"introduced":["2.10.0"],"last_affected":[],"package":"github.com/go-resty/resty/v2","purl":"pkg:golang/github.com/go-resty/resty/v2","source":"GO-2023-2328"}],"prev":{"headline":"Command 'go get' may unexpectedly fallback to insecure git in cmd/go","id":"CVE-2023-45285"},"products":["github.com/go-resty/resty/v2"],"published":"2023-11-28","related":[],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"attribution","licence":"CC BY 4.0","name":"Go Vulnerability Database","prefix":"GO"},{"class":"attribution","licence":"US public information, NVD API terms","name":"NVD"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"}],"ssvc":{"automatable":"no","exploitation":"none","technical_impact":"partial"},"state":"PUBLISHED","updated":"2024-08-28","vendors":["github.com/go-resty/resty/v2"]},"summary":"A race condition in go-resty allows HTTP request body disclosure across requests when retries are enabled, potentially leaking sensitive data to unrelated servers.","url":"https://insights.sbomify.com/CVE-2023-45286/"}