open-telemetry has an Observable Timing Discrepancy
Moderate severity
GitHub Reviewed
Published
Aug 13, 2024
in
open-telemetry/opentelemetry-collector-contrib
•
Updated Aug 13, 2024
Package
Affected versions
>= 0.80.0, < 0.107.0
Patched versions
0.107.0
Description
Published to the GitHub Advisory Database
Aug 13, 2024
Reviewed
Aug 13, 2024
Published by the National Vulnerability Database
Aug 13, 2024
Last updated
Aug 13, 2024
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 open-telemetry/opentelemetry-collector-contrib#34516) by using constant-time comparison.
Workarounds
bearertokenauth
to network segments accessible by potential attackers, orbearertokenauth
References