CVE-2024-28110: Github.com/cloudevents/sdk go/v2 Go SDK For CloudEvents's Use Vulnerability

HIGH
Advisory Identifier: GHSA-5pf6-2qwx-pxm2
CVSS 7.5
CWE-522
Published
Advisory Summary

CVE-2024-28110 is a HIGH (CVSS 7.5) go sdk for cloudevents's use vulnerability (CWE-522: Insufficiently Protected Credentials) affecting Github.com/cloudevents/sdk go/v2 libraries in the Go ecosystem. The issue involves go sdk for cloudevents's use of withroundtripper to create a client leaks credentials. Remediation is available by upgrading affected packages to version 2.15.2.

CVE-2024-28110 at a Glance

CVE Identifier CVE-2024-28110
GHSA Identifier GHSA-5pf6-2qwx-pxm2
Severity HIGH
CVSS v3.1 Base Score 7.5
CWE Classification CWE-522: Insufficiently Protected Credentials
Affected Product Github.com/cloudevents/sdk go/v2
Package Ecosystem Go
Published Date
Last Updated

Security Impact

CVSS: 7.5

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality High (C:H)
Integrity None (I:N)
Availability None (A:N)

How to Fix CVE-2024-28110

To remediate this vulnerability, upgrade all affected Github.com/cloudevents/sdk go/v2 dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

github.com/cloudevents/sdk-go/v2 fixed: 2.15.2
Upgrade github.com/cloudevents/sdk-go/v2 to 2.15.2
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for github.com/cloudevents/sdk-go/v2

How to Check if You Are Affected

To determine whether your application is affected by CVE-2024-28110, inspect your project dependencies for Github.com/cloudevents/sdk go/v2:

inspect dependencies for github.com/cloudevents/sdk-go/v2

Analyze the terminal output to locate any version of Github.com/cloudevents/sdk go/v2 in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.15.2), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-522: Insufficiently Protected Credentials, where the product transmits or stores authentication credentials, but it uses an insecure method that is susceptible to unauthorized interception and/or retrieval. In Github.com/cloudevents/sdk go/v2, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### 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](https://github.com/cloudevents/sdk-go/blob/67e389964131d55d65cd14b4eb32d57a47312695/v2/protocol/http/protocol.go#L104-L110) (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: - [oauth2.Transport](https://pkg.go.dev/golang.org/x/oauth2#Transport) - [idtoken.NewClient(...).Transport](https://pkg.go.dev/google.golang.org/api/idtoken#NewClient) ... 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

CVE-2024-28110 Affected Github.com/cloudevents/sdk go/v2 Versions

1 component(s)
Fixed Versions:
2.15.2
Product / Package Ecosystem Affected Versions Fixed Version
github.com/cloudevents/sdk-go/v2
Go
< 2.15.2
2.15.2

References

Frequently Asked Questions

What is CVE-2024-28110?
CVE-2024-28110 is a security vulnerability in Github.com/cloudevents/sdk go/v2 involving Go SDK for CloudEvents's use of WithRoundTripper to create a Client leaks credentials under CWE-522: Insufficiently Protected Credentials.
Which Github.com/cloudevents/sdk go/v2 versions are affected?
Affected versions include releases prior to 2.15.2 across affected packages: github.com/cloudevents/sdk-go/v2.
What version fixes CVE-2024-28110?
Upgrading to 2.15.2 (or the latest patched release for your respective branch) resolves the vulnerability.
Is github.com/cloudevents/sdk-go/v2 affected?
Yes, github.com/cloudevents/sdk-go/v2 is affected in releases prior to 2.15.2. Upgrade your dependency to 2.15.2 or later.
What is the CVSS score of CVE-2024-28110?
CVE-2024-28110 has a CVSS v3.1 base score of 7.5 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N.
What CWE is associated with CVE-2024-28110?
CVE-2024-28110 is classified under CWE-522: Insufficiently Protected Credentials (The product transmits or stores authentication credentials, but it uses an insecure method that is susceptible to unauthorized interception and/or retrieval.).
How can I check Go dependencies for CVE-2024-28110?
Run the dependency tree command: 'inspect dependencies for github.com/cloudevents/sdk-go/v2'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-5pf6-2qwx-pxm2",
  "modified" : "2026-02-17T19:40:16Z",
  "published" : "2024-03-06T20:11:59Z",
  "aliases" : [ "CVE-2024-28110" ],
  "summary" : "Go SDK for CloudEvents's use of WithRoundTripper to create a Client leaks credentials",
  "details" : "### Impact\n_What kind of vulnerability is it? Who is impacted?_\nUsing cloudevents.WithRoundTripper to create a cloudevents.Client with an authenticated http.RoundTripper causes the go-sdk to leak credentials to arbitrary endpoints.\n\nThe relevant code is [here](https://github.com/cloudevents/sdk-go/blob/67e389964131d55d65cd14b4eb32d57a47312695/v2/protocol/http/protocol.go#L104-L110) (also inline, emphasis added):\n\n<pre>if p.Client == nil {\n  p.Client = **http.DefaultClient**\n}\n\nif p.roundTripper != nil {\n  p.Client.**Transport = p.roundTripper**\n}\n</pre>\n\nWhen the transport is populated with an authenticated transport such as:\n- [oauth2.Transport](https://pkg.go.dev/golang.org/x/oauth2#Transport)\n- [idtoken.NewClient(...).Transport](https://pkg.go.dev/google.golang.org/api/idtoken#NewClient)\n\n... then http.DefaultClient is modified with the authenticated transport and will start to send Authorization tokens to\n**any endpoint** it is used to contact!\n\nFound and patched by: @tcnghia and @mattmoor\n\n### Patches\nv.2.15.2",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/cloudevents/sdk-go/v2"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "2.15.2"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 2.15.1"
    }
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/cloudevents/sdk-go/security/advisories/GHSA-5pf6-2qwx-pxm2"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/cloudevents/sdk-go/commit/de2f28370b0d2a0f64f92c0c6139fa4b8a7c3851"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/cloudevents/sdk-go"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/cloudevents/sdk-go/blob/67e389964131d55d65cd14b4eb32d57a47312695/v2/protocol/http/protocol.go#L104-L110"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-522" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-03-06T20:11:59Z",
    "nvd_published_at" : "2024-03-06T22:15:57Z"
  }
}