Listen to this Post
OpenTelemetry Go versions 1.5.0 through 1.44.0 can include trace exporter endpoint configuration in an internal diagnostic log emitted when an SDK TracerProvider is created. The default OpenTelemetry logger does not emit this event. Exposure requires an application to install a logger that enables OpenTelemetry’s internal Info-level diagnostics and for someone other than the intended audience to have access to those logs. The logged configuration can disclose the address of the trace collector and whether the OTLP/HTTP connection is configured as insecure. The Zipkin exporter logs its complete collector URL, so credentials in URL userinfo or tokens in the query string are also disclosed if an application embeds them there. OTLP authentication headers, TLS key material, and exported span data are not included in this log. Exporter MarshalLog implementations that caused this configuration to be included in internal logs were introduced by a1fff3c. When sdk/trace.NewTracerProvider constructs a provider, it records a TracerProvider created internal Info event containing the provider configuration. In affected versions, the configuration’s MarshalLog methods recursively include the provider’s span processors, each processor’s span exporter, and for the OTLP trace exporter, its client configuration. This causes the following values to be present in the event: OTLP trace gRPC configured endpoint; OTLP trace HTTP configured endpoint and the Insecure flag; and Zipkin complete collector URL. OpenTelemetry Go does not emit this event with its default logger, which only emits errors. An application must explicitly configure a sufficiently verbose logger with otel.SetLogger. The required logr verbosity is version-dependent: versions 1.5.0 through 1.14.x use V(1) for this Info event; and versions 1.15.0 through 1.44.0 use V(4). OTLP header configuration is not part of the marshaled object, so credentials supplied with WithHeaders or the corresponding environment variables are not exposed. The documented OTLP WithEndpoint input is a collector address rather than a credential-bearing URL. The higher-risk case is therefore the Zipkin collector URL, which is retained and logged in full, or an application passing sensitive data in an OTLP endpoint outside the documented format. This is a conditional disclosure through application logs. Affected applications must enable verbose OpenTelemetry internal diagnostics and configure a trace exporter containing information they do not intend to expose to readers of those logs. In that configuration, a person or system with log access can learn the trace collector address and internal network topology. If credentials or tokens are embedded directly in a Zipkin collector URL, those values can also be recovered from the logs. There is no exposure with the default OpenTelemetry logger, and the vulnerable log is generated from local application configuration rather than remotely supplied span data. OTLP authentication headers, certificate or private-key contents, and telemetry payloads are not logged by this path. Upgrade the affected OpenTelemetry Go modules to version 1.45.0 or later. The fix in 3a1412d stops recursively marshaling exporter and client configuration and records their types instead. If an immediate upgrade is not possible, keep OpenTelemetry internal logging below the Info verbosity described above; do not embed credentials or tokens in exporter endpoint URLs; use authentication headers or another supported credential mechanism; and restrict access to existing logs and rotate any credentials that may already have been recorded.
DailyCVE Form:
Platform: OpenTelemetry Go SDK
Version: 1.5.0 to 1.44.0
Vulnerability : Endpoint configuration logged
Severity: Medium
date: 2024-08-22
Prediction: 2024-09-05
What Undercode Say:
go mod download go.opentelemetry.io/[email protected]
package main
import (
"bytes"
"context"
"fmt"
"github.com/go-logr/logr/funcr"
"go.opentelemetry.io/otel"
"go.opentelemetry.io/otel/exporters/zipkin"
sdktrace "go.opentelemetry.io/otel/sdk/trace"
)
func main() {
var logs bytes.Buffer
otel.SetLogger(funcr.New(func(_, args string) {
_, _ = logs.WriteString(args)
}, funcr.Options{Verbosity: 4}))
exporter, err := zipkin.New(
"http://user:[email protected]:9411/api/v2/spans?token=secret",
)
if err != nil {
panic(err)
}
tp := sdktrace.NewTracerProvider(sdktrace.WithBatcher(exporter))
_ = tp.Shutdown(context.Background())
fmt.Println(logs.String())
}
Exploit: (Educational Purposes!)
package main
import (
"bytes"
"context"
"fmt"
"github.com/go-logr/logr/funcr"
"go.opentelemetry.io/otel"
"go.opentelemetry.io/otel/exporters/zipkin"
sdktrace "go.opentelemetry.io/otel/sdk/trace"
)
func main() {
var logs bytes.Buffer
otel.SetLogger(funcr.New(func(_, args string) {
_, _ = logs.WriteString(args)
}, funcr.Options{Verbosity: 4}))
exporter, err := zipkin.New(
"http://user:[email protected]:9411/api/v2/spans?token=secret",
)
if err != nil {
panic(err)
}
tp := sdktrace.NewTracerProvider(sdktrace.WithBatcher(exporter))
_ = tp.Shutdown(context.Background())
fmt.Println(logs.String())
}
Protection:
Upgrade OpenTelemetry Go modules to version 1.45.0 or later.
Keep internal logging below Info verbosity.
Do not embed credentials in exporter URLs.
Use authentication headers instead of URL credentials.
Restrict access to existing application logs.
Rotate any credentials that may have been recorded.
Impact:
A person or system with log access can learn the trace collector address and internal network topology. If credentials or tokens are embedded directly in a Zipkin collector URL, those values can also be recovered from the logs. There is no exposure with the default OpenTelemetry logger. OTLP authentication headers, certificate or private-key contents, and telemetry payloads are not logged by this path.
🎯Let’s Practice Exploiting & Learn Patching For Free:
🎓 Live Courses & Certifications:
Join Undercode Academy for Verified Certifications
🚀 Request a Custom Project:
Secure, high-velocity infrastructure and disruptive technological engineering. Contact our engineering team for high-tier development and proprietary systems:
[email protected]
💎 Smart Architecture | 🛡️ Secure by Design | ⭐ Trusted by Thousands
Sources:
Reported By: github.com
Extra Source Hub:
Undercode

