CVE-2024-42368
Medium · 6.5CVSS
6.5
EPSS
0.6%
Published
Aug 13, 2024
CISA due date
—
Cloudanix analysis
A flaw in how OpenTelemetry collectors check secret tokens lets attackers on the network guess the secret by measuring tiny differences in response speed, allowing them to feed false monitoring data into the system.
- Exploitation
- Remote Unauthenticated
- Attacker needs
- None
- Complexity
- Low
- Impact
- Data Tampering
- Component
- Library
- Class
- Cryptographic Weakness
- Remediation
- Upgrade
- Effort
- Low
- Patch risk
- Low
What it actually does
The bearertokenauth server authenticator performs a non-constant-time string comparison when validating received bearer tokens against the configured value, enabling remote timing attacks that can recover the secret token.
Why it matters to the business
An attacker with network access can obtain a valid bearer token, inject fabricated or malicious telemetry data into the collector pipeline, and degrade the accuracy and trustworthiness of observability data used for monitoring and incident response.
How an attack unfolds
An attacker with network access to an OpenTelemetry collector using the vulnerable bearertokenauth authenticator iteratively sends candidate bearer tokens, measures the server response latency for each attempt, and uses the timing differences to narrow down and eventually guess the correct token, after which the attacker can submit fabricated telemetry.
How to fix it
Upgrade the OpenTelemetry Collector to version 0.107.0 or later, or apply the fix commit 23d56edfa124dd490927372f435c6f317704cbff in the opentelemetry-collector-contrib repository; replace any static bearer-token configurations with short-lived tokens or switch to a constant-time comparison authenticator.
How to confirm the fix worked
Confirm the running collector binary or container image reports version 0.107.0 or newer; inspect the bearertokenauth extension configuration and source to verify constant-time comparison (crypto/subtle.ConstantTimeCompare or equivalent) is in use; perform a controlled timing test with known-good and known-bad tokens to verify response times are independent of token correctness.
Typical attack path
- Identify a collector endpoint protected by the bearertokenauth server authenticator
- Craft and send multiple bearer-token authentication attempts with incrementally different token values
- Measure and compare response times across attempts to perform statistical timing analysis
- Recover the full valid bearer token
- Use the recovered token to authenticate and inject fabricated traces, metrics, or logs
How to detect it
Review collector access logs for repeated authentication attempts from the same source IP or with varying bearer token lengths; look for unusually high volumes of 401 responses followed by a successful 200 from the same client; correlate with telemetry ingestion anomalies such as sudden spikes in trace or metric volume from a single authenticated source.
What your security team should do
- Immediately upgrade all collector instances to the fixed version 0.107.0 or the referenced commit
- Audit all deployments using bearertokenauth and rotate any long-lived bearer tokens
- Prefer short-lived, automatically rotated tokens or migrate to stronger authentication mechanisms
- Monitor EPSS and exploit maturity signals for any increase in observed attempts
The record
OpenTelemetry, also known as OTel, is a vendor-neutral open source Observability framework for instrumenting, generating, collecting, and exporting telemetry data such as traces, metrics, and logs. The bearertokenauth extension's server authenticator performs a simple, non-constant time string comparison of the received & configured bearer tokens. 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 using constant-time comparison in 0.107.0
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| Go | github.com/open-telemetry/opentelemetry-collector-contrib/extension/bearertokenauthextension | 0.80.0 | 0.107.0 |
| Chainguard | grafana-alloy | 0 | 1.3.0-r1 |
| Chainguard | grafana-alloy-compat | 0 | 1.3.0-r1 |
| Chainguard | grafana-alloy-fips | 0 | 1.3.0-r2 |
| Wolfi | grafana-alloy | 0 | 1.3.0-r1 |
| Wolfi | grafana-alloy-compat | 0 | 1.3.0-r1 |
| go | github.com/open-telemetry/opentelemetry-collector-contrib/extension/bearertokenauthextension | 0.80.0 | 0.107.0 |
Related vulnerabilities
- CVE-2026-34165 go-git is an extensible git implementation library written in pure Go. Also affects grafana-alloy
- CVE-2026-33762 go-git is an extensible git implementation library written in pure Go. Also affects grafana-alloy
- CVE-2026-32285 The Delete function fails to properly validate offsets when processing malformed JSON… Also affects grafana-alloy
- CVE-2026-32287 Boolean XPath expressions that evaluate to true can cause an infinite loop in… Also affects grafana-alloy
- CVE-2026-4427 Rejected reason: Duplicate of CVE-2026-32286 Also affects grafana-alloy
- CVE-2026-27141 Due to missing nil check, sending 0x0a-0x0f HTTP/2 frames will cause a running server to… Also affects grafana-alloy
- CVE-2026-26958 filippo.io/edwards25519 is a Go library implementing the edwards25519 elliptic curve with… Also affects grafana-alloy
- CVE-2026-25934 go-git is a highly extensible git implementation library written in pure Go. Also affects grafana-alloy