CVE-2024-42368: Github.com/open telemetry/opentelemetry collector contrib/extension/bearertokenauthextension Open-telemetry Has An Observable Timing Vulnerability

MODERATE
Advisory Identifier: GHSA-rfxf-mf63-cpqv
CVSS 6.5
CWE-208
Published
Advisory Summary

CVE-2024-42368 is a MODERATE (CVSS 6.5) open-telemetry has an observable timing vulnerability (CWE-208: Observable Timing Discrepancy) affecting Github.com/open telemetry/opentelemetry collector contrib/extension/bearertokenauthextension libraries in the Go ecosystem. The issue involves open-telemetry has an observable timing discrepancy. Remediation is available by upgrading affected packages to version 0.107.0.

CVE-2024-42368 at a Glance

CVE Identifier CVE-2024-42368
GHSA Identifier GHSA-rfxf-mf63-cpqv
Severity MODERATE
CVSS v3.1 Base Score 6.5
CWE Classification CWE-208: Observable Timing Discrepancy
Affected Product Github.com/open telemetry/opentelemetry collector contrib/extension/bearertokenauthextension
Package Ecosystem Go
Published Date
Last Updated

Security Impact

CVSS: 6.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:N/I:L/A:L).

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 None (C:N)
Integrity Low (I:L)
Availability Low (A:L)

How to Fix CVE-2024-42368

To remediate this vulnerability, upgrade all affected Github.com/open telemetry/opentelemetry collector contrib/extension/bearertokenauthextension 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/open-telemetry/opentelemetry-collector-contrib/extension/bearertokenauthextension fixed: 0.107.0
Upgrade github.com/open-telemetry/opentelemetry-collector-contrib/extension/bearertokenauthextension to 0.107.0
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/open-telemetry/opentelemetry-collector-contrib/extension/bearertokenauthextension

How to Check if You Are Affected

To determine whether your application is affected by CVE-2024-42368, inspect your project dependencies for Github.com/open telemetry/opentelemetry collector contrib/extension/bearertokenauthextension:

inspect dependencies for github.com/open-telemetry/opentelemetry-collector-contrib/extension/bearertokenauthextension

Analyze the terminal output to locate any version of Github.com/open telemetry/opentelemetry collector contrib/extension/bearertokenauthextension in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.107.0), 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-208: Observable Timing Discrepancy, where two separate operations in a product require different amounts of time to complete, in a way that is observable to an actor and reveals security-relevant information about the state of the product, such as whether a particular operation was successful or not. In Github.com/open telemetry/opentelemetry collector contrib/extension/bearertokenauthextension, 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

### Summary The bearertokenauth extension's server authenticator performs a simple, non-constant time string comparison of the received & configured bearer tokens. ### Details https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/9128a9258fe1fee36f198f97b1e3371fc7b77a93/extension/bearertokenauthextension/bearertokenauth.go#L189-L196 For background on the type of vulnerability, see https://ropesec.com/articles/timing-attacks/. ### Impact This impacts anyone using the `bearertokenauth` server authenticator. Malicious clients with network access to the collector may perform a timing attack against a collector with this authenticator to guess the configured token, by iteratively sending tokens and comparing the response time. This would allow an attacker to introduce fabricated or bad data into the collector's telemetry pipeline. ### Fix The observable timing vulnerability was fixed by @axw in v0.107.0 (PR https://github.com/open-telemetry/opentelemetry-collector-contrib/pull/34516) by using constant-time comparison. ### Workarounds - upgrade to v0.107.0 or above, or, if you're unable to upgrade at this time, - don't expose the receiver using `bearertokenauth` to network segments accessible by potential attackers, or - change the receiver to use a different authentication extension instead, or - disable the receiver relying on `bearertokenauth`

CVE-2024-42368 Affected Github.com/open telemetry/opentelemetry collector contrib/extension/bearertokenauthextension Versions

1 component(s)
Fixed Versions:
0.107.0
Product / Package Ecosystem Affected Versions Fixed Version
github.com/open-telemetry/opentelemetry-collector-contrib/extension/bearertokenauthextension
Go
≥ 0.80.0
< 0.107.0
0.107.0

References

Frequently Asked Questions

What is CVE-2024-42368?
CVE-2024-42368 is a security vulnerability in Github.com/open telemetry/opentelemetry collector contrib/extension/bearertokenauthextension involving open-telemetry has an Observable Timing Discrepancy under CWE-208: Observable Timing Discrepancy.
Which Github.com/open telemetry/opentelemetry collector contrib/extension/bearertokenauthextension versions are affected?
Affected versions include releases prior to 0.107.0 across affected packages: github.com/open-telemetry/opentelemetry-collector-contrib/extension/bearertokenauthextension.
What version fixes CVE-2024-42368?
Upgrading to 0.107.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is github.com/open-telemetry/opentelemetry-collector-contrib/extension/bearertokenauthextension affected?
Yes, github.com/open-telemetry/opentelemetry-collector-contrib/extension/bearertokenauthextension is affected in releases prior to 0.107.0. Upgrade your dependency to 0.107.0 or later.
What is the CVSS score of CVE-2024-42368?
CVE-2024-42368 has a CVSS v3.1 base score of 6.5 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:L.
What CWE is associated with CVE-2024-42368?
CVE-2024-42368 is classified under CWE-208: Observable Timing Discrepancy (Two separate operations in a product require different amounts of time to complete, in a way that is observable to an actor and reveals security-relevant information about the state of the product, such as whether a particular operation was successful or not.).
How can I check Go dependencies for CVE-2024-42368?
Run the dependency tree command: 'inspect dependencies for github.com/open-telemetry/opentelemetry-collector-contrib/extension/bearertokenauthextension'. 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-rfxf-mf63-cpqv",
  "modified" : "2024-08-13T21:57:31Z",
  "published" : "2024-08-13T18:59:32Z",
  "aliases" : [ "CVE-2024-42368" ],
  "summary" : "open-telemetry has an Observable Timing Discrepancy",
  "details" : "### Summary\n\nThe bearertokenauth extension's server authenticator performs a simple, non-constant time string comparison of the received & configured bearer tokens.\n\n### Details\n\nhttps://github.com/open-telemetry/opentelemetry-collector-contrib/blob/9128a9258fe1fee36f198f97b1e3371fc7b77a93/extension/bearertokenauthextension/bearertokenauth.go#L189-L196\n\nFor background on the type of vulnerability, see https://ropesec.com/articles/timing-attacks/.\n\n### Impact\n\nThis impacts anyone using the `bearertokenauth` server authenticator. Malicious clients with network access to the collector may perform a timing attack against a collector with this authenticator to guess the configured token, by iteratively sending tokens and comparing the response time. This would allow an attacker to introduce fabricated or bad data into the collector's telemetry pipeline.\n\n### Fix\n\nThe observable timing vulnerability was fixed by @axw in v0.107.0 (PR https://github.com/open-telemetry/opentelemetry-collector-contrib/pull/34516) by using constant-time comparison.\n\n### Workarounds\n\n- upgrade to v0.107.0 or above, or, if you're unable to upgrade at this time,\n- don't expose the receiver using `bearertokenauth` to network segments accessible by potential attackers, or\n- change the receiver to use a different authentication extension instead, or\n- disable the receiver relying on `bearertokenauth`",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:L"
  }, {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:L/VA:L/SC:N/SI:N/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/open-telemetry/opentelemetry-collector-contrib/extension/bearertokenauthextension"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0.80.0"
      }, {
        "fixed" : "0.107.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/open-telemetry/opentelemetry-collector-contrib/security/advisories/GHSA-rfxf-mf63-cpqv"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-42368"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/open-telemetry/opentelemetry-collector-contrib/pull/34516"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/open-telemetry/opentelemetry-collector-contrib/commit/c9bd3eff0bb357d9c812a0d8defd3b09db95699a"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/open-telemetry/opentelemetry-collector-contrib"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-208" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-08-13T18:59:32Z",
    "nvd_published_at" : "2024-08-13T20:15:08Z"
  }
}