{"id":"CVE-2026-47701","aliases":["CVE-2026-47701","GHSA-cxh2-4639-vmc5","GO-2026-5339"],"related":[],"kind":"vulnerability","state":"published","title":"OpenTelemetry Operator: ServiceMonitor bearerTokenFile reads arbitrary local file and sends contents as bearer auth","summary":"The OpenTelemetry Operator is a Kubernetes Operator for the OpenTelemetry Collector. Prior to 0.152.0, cmd/otel-allocator TargetAllocator instances with targetAllocator.prometheusCR.enabled set to true preserve a selected ServiceMonitor endpoint's bearerTokenFile value as HTTPClientConfig.Authorization.CredentialsFile. A tenant who can create or update a ServiceMonitor matched by serviceMonitorSelector and serviceMonitorNamespaceSelector can point bearerTokenFile at a file in the Collector pod, including /var/run/secrets/kubernetes.io/serviceaccount/token, and direct scraping to a tenant-controlled endpoint. The Collector reads that file at scrape time and sends its contents as bearer authorization on every scrape interval. Exploitation also requires the Collector service-account token or another sensitive file to be mounted and the Collector to reach the chosen target. The DenyFSAccessThroughSMs control was absent, allowing disclosure of the Collector's service-account JWT or other mounted files, and resulting Kubernetes API impact is limited by the Collector service account's permissions. This issue is fixed in version 0.152.0.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"The OpenTelemetry Operator is a Kubernetes Operator for the OpenTelemetry Collector. Prior to 0.152.0, cmd/otel-allocator TargetAllocator instances with targetAllocator.prometheusCR.enabled set to true preserve a selected ServiceMonitor endpoint's bearerTokenFile value as HTTPClientConfig.Authorization.CredentialsFile. A tenant who can create or update a ServiceMonitor matched by serviceMonitorSelector and serviceMonitorNamespaceSelector can point bearerTokenFile at a file in the Collector pod, including /var/run/secrets/kubernetes.io/serviceaccount/token, and direct scraping to a tenant-controlled endpoint. The Collector reads that file at scrape time and sends its contents as bearer authorization on every scrape interval. Exploitation also requires the Collector service-account token or another sensitive file to be mounted and the Collector to reach the chosen target. The DenyFSAccessThroughSMs control was absent, allowing disclosure of the Collector's service-account JWT or other mounted files, and resulting Kubernetes API impact is limited by the Collector service account's permissions. This issue is fixed in version 0.152.0.","source":"cvelist"},{"lang":"en","text":"## 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'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.\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'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.\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's service account token via ServiceMonitor bearerTokenFile references. This is the equivalent of `ArbitraryFSAccessThroughSMs.Deny` from the Prometheus Operator.","format":"markdown","source":"ghsa"},{"lang":"en","text":"OpenTelemetry Operator for Kubernetes's ServiceMonitor bearerTokenFile reads arbitrary local file and sends contents as bearer auth in github.com/open-telemetry/opentelemetry-operator","format":"markdown","source":"go"}],"published":"2026-06-10T17:24:01.000Z","modified":"2026-09-25T14:23:59.847Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:N/A:N","score":7.7,"rating":"HIGH"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:N/A:N","score":7.7,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:N/A:N","score":7.7,"rating":"HIGH"}],"cwes":["CWE-200"],"affected":[{"ranges":[{"version":"< 0.152.0","status":"affected"}],"vendor":"open-telemetry","product":"opentelemetry-operator","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"0.152.0"}],"ecosystem":"Go","package":"github.com/open-telemetry/opentelemetry-operator","purl":"pkg:golang/github.com/open-telemetry/opentelemetry-operator","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"0.152.0"}],"ecosystem":"Go","package":"github.com/open-telemetry/opentelemetry-operator","purl":"pkg:golang/github.com/open-telemetry/opentelemetry-operator","source":"go"}],"references":[{"url":"https://github.com/open-telemetry/opentelemetry-operator/security/advisories/GHSA-cxh2-4639-vmc5","tags":["advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://github.com/open-telemetry/opentelemetry-operator/pull/5104","tags":["fix","web","x-refsource-misc"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://github.com/open-telemetry/opentelemetry-operator/commit/95a8c2a3dc64a762d3ab8eba8c903b5702a03a9c","tags":["x-refsource-misc"],"sources":["cvelist","nvd"]},{"url":"https://github.com/open-telemetry/opentelemetry-operator/releases/tag/v0.152.0","tags":["x-refsource-misc"],"sources":["cvelist","nvd"]},{"url":"https://github.com/open-telemetry/opentelemetry-operator","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2026-09-14T16:42:50.633Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-47701","url":"https://www.cve.org/CVERecord?id=CVE-2026-47701","licence":"CVE Terms of Use","modified":"2026-09-14T16:43:18.575Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-cxh2-4639-vmc5","url":"https://github.com/advisories/GHSA-cxh2-4639-vmc5","licence":"CC-BY-4.0","modified":"2026-09-10T03:51:08.687Z"},{"source":"go","name":"Go Vulnerability Database","id":"GO-2026-5339","url":"https://pkg.go.dev/vuln/GO-2026-5339","licence":"CC-BY-4.0","modified":"2026-06-25T19:45:31.867Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-47701","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-47701","licence":"Public domain","modified":"2026-09-25T14:23:59.847Z"}],"updatedAt":"2026-11-25T22:59:38.291Z","epss":{"score":0.0028,"percentile":0.21966,"date":"2026-12-01T12:00:22.000Z"}}