The bearertokenauth extension's server authenticator performs a simple, non-constant time string comparison of the received & configured bearer tokens.
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/.
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.
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.
bearertokenauth
to network segments accessible by potential attackers, orbearertokenauth
{ "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" }