github.com/cloudevents/sdk-go/v2
Affected
- introduced
0, fixed2.15.2(semver)
Fixed versions
2.15.2
Fix
- Fixed version
2.15.2go get github.com/cloudevents/sdk-go/[email protected]
Advisory
Also known as: CVE-2024-28110, GO-2024-2618
Go SDK for CloudEvents's use of WithRoundTripper to create a Client leaks credentials
Impact
_What kind of vulnerability is it? Who is impacted?_
Using cloudevents.WithRoundTripper to create a cloudevents.Client with an authenticated http.RoundTripper causes the go-sdk to leak credentials to arbitrary endpoints.
The relevant code is here (also inline, emphasis added):
<pre>if p.Client == nil {
p.Client = http.DefaultClient
}
if p.roundTripper != nil {
p.Client.Transport = p.roundTripper
}
</pre>
When the transport is populated with an authenticated transport such as:
... then http.DefaultClient is modified with the authenticated transport and will start to send Authorization tokens to
any endpoint it is used to contact!
Found and patched by: @tcnghia and @mattmoor
Patches
v.2.15.2
High Basis: The source's own band: HIGH
0, fixed 2.15.2 (semver)2.15.2
2.15.2go get github.com/cloudevents/sdk-go/[email protected]Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.
Check your own computer: guard packages check
Source: GitHub Advisory Database (reviewed advisories) · CC BY 4.0