GHSA-rfxf-mf63-cpqv

Suggest an improvement
Source
https://github.com/advisories/GHSA-rfxf-mf63-cpqv
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2024/08/GHSA-rfxf-mf63-cpqv/GHSA-rfxf-mf63-cpqv.json
JSON Data
https://api.osv.dev/v1/vulns/GHSA-rfxf-mf63-cpqv
Aliases
Related
Published
2024-08-13T18:59:32Z
Modified
2024-08-13T23:42:03.241350Z
Severity
  • 6.5 (Medium) CVSS_V3 - CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:L CVSS Calculator
  • 6.9 (Medium) CVSS_V4 - 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 CVSS Calculator
Summary
open-telemetry has an Observable Timing Discrepancy
Details

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
Database specific
{
    "nvd_published_at": "2024-08-13T20:15:08Z",
    "cwe_ids": [
        "CWE-208"
    ],
    "severity": "MODERATE",
    "github_reviewed": true,
    "github_reviewed_at": "2024-08-13T18:59:32Z"
}
References

Affected packages

Go / github.com/open-telemetry/opentelemetry-collector-contrib/extension/bearertokenauthextension

Package

Name
github.com/open-telemetry/opentelemetry-collector-contrib/extension/bearertokenauthextension
View open source insights on deps.dev
Purl
pkg:golang/github.com/open-telemetry/opentelemetry-collector-contrib/extension/bearertokenauthextension

Affected ranges

Type
SEMVER
Events
Introduced
0.80.0
Fixed
0.107.0