Advisory

GHSA-5pf6-2qwx-pxm2

Also known as: CVE-2024-28110, GO-2024-2618

Summary

Go SDK for CloudEvents's use of WithRoundTripper to create a Client leaks credentials

Details

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

Severity

High Basis: The source's own band: HIGH

Dates

Published
2024-03-06 20:11 UTC
Modified
2026-09-10 03:50 UTC

Affected packages and fixes

github.com/cloudevents/sdk-go/v2

Go · All systems

Affected

  • introduced 0, fixed 2.15.2 (semver)

Fixed versions

2.15.2

Fix

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

View this record on OSV.dev

Source

Source: GitHub Advisory Database (reviewed advisories) · CC BY 4.0

Sources & licences