/

CVE-2026-42602

Severity:

HIGH RISK

(8.1)

Authentication Bypass / Improper Authentication

CVE-2026-42602

Analyzed

Vulnerability type

Category:

Authentication Bypass / Improper Authentication

CWE:

CWE-208, CWE-287, CWE-290, CWE-294, CWE-347

Impact:

Unauthorized Access to Telemetry Endpoints and Potential Data Exposure

Severity:

HIGH RISK

(8.1)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

azureauthextension's Azure Authenticator Extension contains a server-side authentication bypass that accepts any Azure access token the collector's identity can mint, as long as it matches a token fetched using a Host-controlled scope.

Because bearer tokens are not validated as JWTs and are compared only by string equality against a server-side token derived from attacker-controlled input, an attacker with any valid Azure access token can authenticate to any OpenTelemetry receiver configured with auth: azure_auth.

Affected context

This vulnerability affects environments where:

  • OpenTelemetry Collectors are deployed with the azureauthextension Azure Authenticator Extension between versions 0.124.0 and 0.150.0, and
  • One or more receivers are configured with auth: azure_auth, and
  • The collector's identity (managed identity, service principal, or similar) can obtain Azure access tokens for multiple resource scopes (e.g., ARM, Microsoft Graph, Key Vault, Storage).

In such setups, the extension's Authenticate method compares the client's bearer token to a newly minted token using a scope derived from the client-supplied Host header, without validating the token as a JWT. This creates a situation where any valid token for any resource that the identity can access may be treated as valid for the telemetry endpoint, depending on how the Host header is chosen.

Exploit preconditions

  • Attack surface: Any OpenTelemetry Collector endpoint exposed over the network that uses auth: azure_auth for authentication (e.g., OTLP/gRPC or HTTP receivers).
  • Required access: Ability to:
  • Acquire at least one valid Azure access token for any resource the collector's configured identity can mint tokens for (e.g., ARM, Graph, Key Vault, Storage), and
  • Send HTTP/gRPC requests to the exposed collector endpoint, controlling the Host header and Authorization: Bearer token.
  • Trigger point: A client request to a protected receiver where the extension's Authenticate method:
  1. Reads the bearer token from the client.
  2. Uses its configured credential to obtain a token whose scope is derived from the client-controlled Host header.
  3. Compares the server-side token and client token using string equality.
  • Why exploitation is possible:
  • No JWT structure, signature, or claims validation is performed (CWE-347).
  • Authentication logic relies on comparing token strings rather than validating their intended audience, issuer, or scope (CWE-287, CWE-290).
  • The resource/scope for the server-side token request is derived from the untrusted Host header (CWE-294), making it possible for an attacker to select a scope that matches a token they already possess.
  • Tokens are replayable for their full issued lifetime, which is often several hours, increasing the practical attack window.

Why this happens

The core issue stems from treating opaque bearer tokens as simple secrets and validating them via string comparison instead of as structured, signed security tokens.

Specifically, the Authenticate method:

  • Does not parse the incoming bearer token as a JWT or validate its signature, issuer, audience, expiry, or scopes (CWE-347: Improper Verification of Cryptographic Signature).
  • Uses its own configured credential to obtain an access token with a scope derived directly from the untrusted Host header (CWE-294: Authentication Bypass by Capture-replay, and misuse of network headers for security context).
  • Compares the client token and server-minted token using direct string equality, implicitly assuming that "matching bytes" imply correct identity and intended audience (CWE-287: Improper Authentication, CWE-290: Authentication Bypass by Spoofing).

Because the collector's identity can mint tokens for multiple Azure resources, any valid token that matches one of these server-side tokens becomes a universal key for authenticating to the collector whenever the attacker chooses a compatible Host. This logic fails to bind tokens to their intended resource or caller and ignores core authentication properties such as audience restriction and proof-of-possession.

Potential impact

  • Unauthorized authentication to OpenTelemetry receivers that rely on auth: azure_auth.
  • Ingestion of malicious or fabricated telemetry data, potentially polluting observability pipelines and downstream analytics.
  • Exfiltration or observation of telemetry streams if receivers expose bidirectional or query-like capabilities.
  • Lateral movement within observability infrastructure, using compromised telemetry endpoints as a stepping stone to other internal systems.
  • Abuse of long-lived, replayable access tokens to maintain unauthorized access over time.

General mitigation guidance

Effective mitigation relies on enforcing proper token validation semantics and removing trust in client-controlled header-derived scopes:

  • Use token validation libraries or platform SDKs that:
  • Parse bearer tokens as JWTs or appropriate token formats,
  • Verify signatures against trusted issuers,
  • Enforce intended audience, resource, and scope constraints,
  • Check expiry and revocation indicators where available.
  • Decouple server-side token acquisition from client-controlled fields such as Host. Any resource/scope used to validate a token should be derived from trusted configuration, not from incoming requests.
  • Treat bearer tokens as credentials bound to a specific resource or audience, not as generic shared secrets that can be reused across services.
  • Apply least-privilege to the identity used by the collector, limiting the set of Azure resources for which it can mint tokens to only what is operationally necessary.
  • Restrict network exposure of OpenTelemetry Collector endpoints, placing them behind authenticated, well-validated frontends or service meshes whenever feasible.
  • Prefer secure-by-default authentication modules or middleware that encapsulate token verification logic, rather than custom comparison-based checks.

How teams detect issues like this

Detection generally focuses on both code-level and runtime signals:

  • Static analysis and code review:
  • Flag any authentication code that:
  • Compares access tokens or authorization headers using direct string equality.
  • Derives security-critical scopes, audiences, or resources from untrusted headers such as Host, X-Forwarded-Host, or query parameters.
  • Uses token acquisition APIs (e.g., Azure credential libraries) without subsequent independent validation of incoming tokens.
  • Review authentication middleware for:
  • Missing JWT parsing and signature verification.
  • Absence of audience, issuer, and expiry checks.
  • Configuration and deployment checks:
  • Scan collector configurations for receivers using auth: azure_auth and prioritize review of those exposed beyond a trusted internal network.
  • Validate that identity and authorization policies for the collector's backing identity follow least-privilege principles.
  • Runtime monitoring:
  • Monitor collector logs for:
  • Authentication successes from unexpected callers or network locations.
  • Repeated use of identical bearer tokens across multiple connections over extended periods.
  • Implement anomaly detection on telemetry ingestion patterns, e.g., unusual sources sending high volumes of data to authenticated receivers.
  • Automated SAST/IAST tools and CI policies can be configured to detect improper token validation patterns and untrusted header usage in security-critical flows.

Sources

SourceLink
github.comgithub.com/open-telemetry/opentelemetry-collector-contrib/security/advisories/GHSA-pjv4-3c63-699f

Frequently asked

questions

Yes, it is remotely exploitable when an OpenTelemetry Collector exposes endpoints using auth: azure_auth to networks where attackers can send requests, provided the attacker can obtain any valid Azure access token that the collector's identity could mint.

The attacker needs:

  • Network access to the collector's protected receiver endpoints, and
  • At least one valid Azure access token for any resource associated with the collector's configured identity (e.g., ARM, Microsoft Graph, Key Vault, Storage). This might come from a compromised workload, leaked token, or misconfigured identity.

The safest pattern is to replace string-based token comparison with robust token validation that:

  • Treats incoming tokens as structured, signed artifacts (JWT or equivalent),
  • Verifies signatures against trusted issuers,
  • Enforces audience/resource, scope, and expiry constraints, and
  • Uses only trusted configuration to determine validation parameters, never untrusted request headers.

To prevent similar flaws:

  • Standardize on well-tested authentication middleware and libraries rather than custom token comparison logic.
  • Establish security guidelines that forbid deriving security-critical values (scopes, audiences) from untrusted inputs like Host.
  • Include authentication and token-handling reviews in code review checklists.
  • Use static analysis and CI policies to flag direct token equality checks, missing JWT verification, and unsafe use of headers in auth flows.
Find out what's already
exploitable in your codebase.