GHSA-CXH2-4639-VMC5
Vulnerability from github – Published: 2026-06-10 17:24 – Updated: 2026-06-10 17:24Affected
Repository: github.com/open-telemetry/opentelemetry-operator Component: cmd/otel-allocator (TargetAllocator) Companion: Prometheus Operator API types (CRDs)
Summary
OpenTelemetry Operator's TargetAllocator watches ServiceMonitor resources via the Prometheus Operator CR watcher and converts each selected endpoint into a Prometheus scrape configuration entry. The endpoint field bearerTokenFile is preserved through the conversion as HTTPClientConfig.Authorization.CredentialsFile. The OpenTelemetry Collector, configured with the Prometheus receiver, then loads that scrape config and, at scrape time, reads the file from its own pod filesystem and sends the contents as Authorization: Bearer ... to the scrape endpoint.
A tenant who can create or update a ServiceMonitor selected by TargetAllocator can set bearerTokenFile: /var/run/secrets/kubernetes.io/serviceaccount/token and a scrape target the tenant controls. The Collector then ships its mounted service account JWT to that target on every scrape interval.
The Prometheus Operator project addressed the same primitive via the ArbitraryFSAccessThroughSMs.Deny admission/runtime guard.
Preconditions
The OpenTelemetry Collector needs to be deployed with targetAllocator.prometheusCR.enabled: true and serviceMonitorSelector / serviceMonitorNamespaceSelector matching at least one namespace where the attacker can create or update ServiceMonitor (or paired with a TargetAllocator resource with the same respective settings). The Collector pod needs to have its service account token mounted. The Collector needs to be able to reach the scrape target chosen by the attacker.
Impact
Tenant ServiceMonitor write becomes equivalent to the OpenTelemetry Collector pod's service account against the Kubernetes API. Real impact depends on what the Collector service account is granted in a given deployment. Typical cluster monitoring setups grant pod, node, endpoint, namespace, and service list across the cluster, which is enough to enumerate and identify further targets. The same primitive can read any file the Collector pod has on disk including mounted certificates and other tokens.
Fix
https://github.com/open-telemetry/opentelemetry-operator/pull/5104 adds support to disable service and podmonitor endpoints that read arbitrary files.
DenyFSAccessThroughSMs causes the Target Allocator to drop ServiceMonitor and PodMonitor endpoints that reference arbitrary files on the file system. When enabled, endpoints with bearerTokenFile, tlsConfig.caFile, tlsConfig.certFile, or tlsConfig.keyFile are dropped from the produced scrape configuration while the remaining endpoints are kept. This prevents tenants from stealing the Collector's service account token via ServiceMonitor bearerTokenFile references. This is the equivalent of ArbitraryFSAccessThroughSMs.Deny from the Prometheus Operator.
{
"affected": [
{
"package": {
"ecosystem": "Go",
"name": "github.com/open-telemetry/opentelemetry-operator"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "0.152.0"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2026-47701"
],
"database_specific": {
"cwe_ids": [
"CWE-200"
],
"github_reviewed": true,
"github_reviewed_at": "2026-06-10T17:24:01Z",
"nvd_published_at": null,
"severity": "HIGH"
},
"details": "## Affected\n\nRepository: github.com/open-telemetry/opentelemetry-operator\nComponent: cmd/otel-allocator (TargetAllocator)\nCompanion: Prometheus Operator API types (CRDs)\n\n## Summary\n\nOpenTelemetry Operator\u0027s TargetAllocator watches `ServiceMonitor` resources via the Prometheus Operator CR watcher and converts each selected endpoint into a Prometheus scrape configuration entry. The endpoint field `bearerTokenFile` is preserved through the conversion as `HTTPClientConfig.Authorization.CredentialsFile`. The OpenTelemetry Collector, configured with the Prometheus receiver, then loads that scrape config and, at scrape time, reads the file from its own pod filesystem and sends the contents as `Authorization: Bearer ...` to the scrape endpoint.\n\nA tenant who can create or update a `ServiceMonitor` selected by TargetAllocator can set `bearerTokenFile: /var/run/secrets/kubernetes.io/serviceaccount/token` and a scrape target the tenant controls. The Collector then ships its mounted service account JWT to that target on every scrape interval.\n\nThe Prometheus Operator project addressed the same primitive via the `ArbitraryFSAccessThroughSMs.Deny` admission/runtime guard.\n\n## Preconditions\n\nThe OpenTelemetry Collector needs to be deployed with `targetAllocator.prometheusCR.enabled: true` and `serviceMonitorSelector` / `serviceMonitorNamespaceSelector` matching at least one namespace where the attacker can create or update `ServiceMonitor` (or paired with a TargetAllocator resource with the same respective settings). The Collector pod needs to have its service account token mounted. The Collector needs to be able to reach the scrape target chosen by the attacker.\n\n## Impact\n\nTenant `ServiceMonitor` write becomes equivalent to the OpenTelemetry Collector pod\u0027s service account against the Kubernetes API. Real impact depends on what the Collector service account is granted in a given deployment. Typical cluster monitoring setups grant pod, node, endpoint, namespace, and service list across the cluster, which is enough to enumerate and identify further targets. The same primitive can read any file the Collector pod has on disk including mounted certificates and other tokens.\n\n## Fix\n\nhttps://github.com/open-telemetry/opentelemetry-operator/pull/5104 adds support to disable service and podmonitor endpoints that read arbitrary files. \n`DenyFSAccessThroughSMs` causes the Target Allocator to drop ServiceMonitor and PodMonitor endpoints that reference arbitrary files on the file system. When enabled, endpoints with bearerTokenFile, tlsConfig.caFile, tlsConfig.certFile, or tlsConfig.keyFile are dropped from the produced scrape configuration while the remaining endpoints are kept. This prevents tenants from stealing the Collector\u0027s service account token via ServiceMonitor bearerTokenFile references. This is the equivalent of `ArbitraryFSAccessThroughSMs.Deny` from the Prometheus Operator.",
"id": "GHSA-cxh2-4639-vmc5",
"modified": "2026-06-10T17:24:01Z",
"published": "2026-06-10T17:24:01Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/open-telemetry/opentelemetry-operator/security/advisories/GHSA-cxh2-4639-vmc5"
},
{
"type": "WEB",
"url": "https://github.com/open-telemetry/opentelemetry-operator/pull/5104"
},
{
"type": "PACKAGE",
"url": "https://github.com/open-telemetry/opentelemetry-operator"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:N/A:N",
"type": "CVSS_V3"
}
],
"summary": "OpenTelemetry Operator for Kubernetes\u0027s ServiceMonitor bearerTokenFile reads arbitrary local file and sends contents as bearer auth"
}
Sightings
| Author | Source | Type | Date | Other |
|---|
Nomenclature
- Seen: The vulnerability was mentioned, discussed, or observed by the user.
- Confirmed: The vulnerability has been validated from an analyst's perspective.
- Published Proof of Concept: A public proof of concept is available for this vulnerability.
- Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
- Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
- Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
- Not confirmed: The user expressed doubt about the validity of the vulnerability.
- Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.