Repository navigation
Update module go.opentelemetry.io/otel/sdk to v1.47.0 [SECURITY] - #585
renovate-update-app[bot] wants to merge 1 commit into
Conversation
775ce82 to
b5d6152
Compare
784a553 to
287853b
Compare
287853b to
bccdeb6
Compare
ℹ️ Artifact update noticeFile name: comp/otelcol/collector-contrib/def/go.modIn order to perform the update(s) described in the table above, Renovate ran the
Details:
File name: comp/otelcol/collector-contrib/impl/go.modIn order to perform the update(s) described in the table above, Renovate ran the
Details:
File name: comp/otelcol/ddflareextension/impl/go.modIn order to perform the update(s) described in the table above, Renovate ran the
Details:
File name: comp/otelcol/ddprofilingextension/impl/go.modIn order to perform the update(s) described in the table above, Renovate ran the
Details:
File name: comp/otelcol/otlp/components/exporter/datadogexporter/go.modIn order to perform the update(s) described in the table above, Renovate ran the
Details:
File name: comp/otelcol/otlp/components/exporter/logsagentexporter/go.modIn order to perform the update(s) described in the table above, Renovate ran the
Details:
File name: comp/otelcol/otlp/components/exporter/serializerexporter/go.modIn order to perform the update(s) described in the table above, Renovate ran the
Details:
File name: comp/otelcol/otlp/components/metricsclient/go.modIn order to perform the update(s) described in the table above, Renovate ran the
Details:
File name: comp/otelcol/otlp/components/processor/infraattributesprocessor/go.modIn order to perform the update(s) described in the table above, Renovate ran the
Details:
File name: go.modIn order to perform the update(s) described in the table above, Renovate ran the
Details:
File name: pkg/opentelemetry-mapping-go/otlp/attributes/go.modIn order to perform the update(s) described in the table above, Renovate ran the
Details:
File name: pkg/opentelemetry-mapping-go/otlp/logs/go.modIn order to perform the update(s) described in the table above, Renovate ran the
Details:
File name: pkg/opentelemetry-mapping-go/otlp/metrics/go.modIn order to perform the update(s) described in the table above, Renovate ran the
Details:
File name: pkg/trace/go.modIn order to perform the update(s) described in the table above, Renovate ran the
Details:
File name: pkg/trace/otel/go.modIn order to perform the update(s) described in the table above, Renovate ran the
Details:
File name: pkg/util/grpc/go.modIn order to perform the update(s) described in the table above, Renovate ran the
Details:
|
Note
This PR body was truncated due to platform limits.
This PR contains the following updates:
v1.45.0→v1.47.0v1.44.0→v1.47.0Warning
Some dependencies could not be looked up. Check the warning logs for more information.
opentelemetry-go: BSD kenv command not using absolute path enables PATH hijacking
CVE-2026-39883 / GHSA-hfvc-g4fc-pqhx
More information
Details
Summary
The fix for GHSA-9h8m-3fm2-qjrq (CVE-2026-24051) changed the Darwin
ioregcommand to use an absolute path but left the BSDkenvcommand using a bare name, allowing the same PATH hijacking attack on BSD and Solaris platforms.Root Cause
sdk/resource/host_id.goline 42:Compare with the fixed Darwin path at line 58:
The
execCommandhelper atsdk/resource/host_id_exec.gousesexec.Command(name, arg...)which searches$PATHwhen the command name contains no path separator.Affected platforms (per build tag in
host_id_bsd.go:4): DragonFly BSD, FreeBSD, NetBSD, OpenBSD, Solaris.The
kenvpath is reached when/etc/hostiddoes not exist (line 38-40), which is common on FreeBSD systems.Attack
go.opentelemetry.io/otel/sdkkenvbinary earlier in$PATHhostIDReaderBSD.read()callsexec.Command("kenv", ...)which resolves to the malicious binarySame attack vector and impact as CVE-2026-24051.
Suggested Fix
Use the absolute path:
On FreeBSD,
kenvis located at/bin/kenv.Severity
CVSS:4.0/AV:L/AC:H/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:NReferences
This data is provided by the GitHub Advisory Database (CC-BY 4.0).
OpenTelemetry-Go: Exporter config logging may leak endpoint URLs in info logs
CVE-2026-81870 / GHSA-8wmf-6v46-5gfg
More information
Details
Summary
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
TracerProvideris 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
MarshalLogimplementations that caused this configuration to be included in internal logs were introduced bya1fff3c.Details
When
sdk/trace.NewTracerProviderconstructs a provider, it records aTracerProvider createdinternal Info event containing the provider configuration. In affected versions, the configuration'sMarshalLogmethods recursively include:This causes the following values to be present in the event:
Insecureflag; andOpenTelemetry 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 requiredlogrverbosity is version-dependent:V(1)for this Info event; andV(4).OTLP header configuration is not part of the marshaled object, so credentials supplied with
WithHeadersor the corresponding environment variables are not exposed. The documented OTLPWithEndpointinput 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.Proof of concept
The following program demonstrates the behavior with OpenTelemetry Go 1.44.0. It deliberately places credentials and a token in the Zipkin collector URL and enables internal Info logging:
The
TracerProvider createdevent contains:For versions before 1.15.0, set
funcr.Options{Verbosity: 1}instead.Impact
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.
Remediation
Upgrade the affected OpenTelemetry Go modules to version 1.45.0 or later. The fix in
3a1412dstops recursively marshaling exporter and client configuration and records their types instead.If an immediate upgrade is not possible:
Severity
CVSS:4.0/AV:L/AC:L/AT:P/PR:L/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:NReferences
This data is provided by the GitHub Advisory Database (CC-BY 4.0).
OpenTelemetry-Go: UTF-8 replacement rune bypasses attribute length truncation
CVE-2026-81869 / GHSA-p9f8-wvj8-2fg8
More information
Details
Summary
The OpenTelemetry Go SDK trace package can fail to enforce
AttributeValueLengthLimitfor string attributes containing the valid Unicode replacement character U+FFFD. An oversized attacker-controlled attribute value that includes U+FFFD is returned untruncated, bypassing the configured memory/DoS protection and allowing increased per-span memory usage. The finding is low severity because it requires a deployment with attribute value length limits enabled and attacker-controlled data being recorded into span attributes.Introduced in commit 49a6536
Details
String and string-slice span attributes are truncated through
safeTruncatewhenAttributeValueLengthLimitis non-negative. The finding evidence identifies this enforcement path insdk/trace/span.go:303-331, with string attributes passed tosafeTruncateatsdk/trace/span.go:309-310and string-slice entries passed tosafeTruncatein the loop beginning atsdk/trace/span.go:312.safeTruncatefirst callssafeTruncateValidUTF8; if that returnsok=false, it callsstrings.ToValidUTF8(input, "")and retries. The relevant code is identified insdk/trace/span.go:337-355.safeTruncateValidUTF8treats anyutf8.RuneErrorfromutf8.DecodeRuneInStringas invalid UTF-8 and immediately returns the original input withok=false. However, Go also returnsutf8.RuneErrorfor a valid encoded U+FFFD rune. The validation artifact confirms this behavior with outputr=U+FFFD size=3 runeError=true.For an input such as
"AAAA" + U+FFFD + strings.Repeat("B", 20)and a limit of 5, the first truncation attempt sees U+FFFD asutf8.RuneErrorand returns the full input withok=false.strings.ToValidUTF8does not remove the valid U+FFFD rune, so the second attempt returns the same full input. As a result, the span attribute value remains 27 bytes long even though the configured limit is 5.PoC
validation-artifact.zip
The validation artifact contains a package-level Go test at
validation-artifact.tar:safe_truncate_bypass/safe_truncate_poc_test.goand supporting output atvalidation-artifact.tar:safe_truncate_bypass/runecheck_output.txt.Reproduction configuration:
pellared/opentelemetry-go49a6536from September 12, 2022sdk/traceunder thesdkmodulelimit := 5Commands:
Expected vulnerable output includes a failing test showing that the returned value exceeds the configured limit:
The artifact also records the standalone UTF-8 behavior needed for the bypass:
Expected output:
Impact
This is a Unicode handling and resource-limit bypass that weakens span attribute memory controls. Applications that enable
AttributeValueLengthLimitto bound memory usage can still store oversized attacker-controlled attribute values if those values contain U+FFFD. The practical impact is increased memory use and reduced denial-of-service protection in the instrumented process; the finding does not show confidentiality or integrity impact.Severity
CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:NReferences
This data is provided by the GitHub Advisory Database (CC-BY 4.0).
opentelemetry-go: AttributeValueLengthLimit is fully bypassed by attribute values composed of valid U+FFFD runes
CVE-2026-128085 / GHSA-q7gw-24fr-5p69
More information
Details
Summary
The
AttributeValueLengthLimitspan/log-record limit can be bypassed entirely with attribute values that consist of valid U+FFFD (REPLACEMENT CHARACTER) runes. The counting-based truncation introduced by the fix for GHSA-p9f8-wvj8-2fg8 (commite016a78c9, first released in v1.33.0) has an "optimistic" fast path that skips every U+FFFD without counting it and without falling back to the correct slow path. A value of 1000 U+FFFD runes (3000 bytes) is stored verbatim even with a limit of 5 characters (15 bytes). The same defect affects the attribute truncation paths ingo.opentelemetry.io/otel/sdk/trace(sdk/internal/attrnorm),go.opentelemetry.io/otel/sdk/log(sdk/log/internal/attrnorm), and the auto-instrumentation tracer ingo.opentelemetry.io/otel/trace(trace/auto.go, introduced inv1.35.0).This is an incomplete-fix issue: it is a distinct defect in the replacement code that GHSA-p9f8-wvj8-2fg8 introduced, affecting exactly the versions that advisory says are fixed (>= v1.33.0). The original advisory covers only the pre-v1.33.0 code.
Details
The shared truncation helper is generated from
internal/shared/attrnorm/truncate.go.tmpl. In the v1.46.0 release, the generated copies aresdk/internal/attrnorm/truncate.goandsdk/log/internal/attrnorm/truncate.go(identical logic, different package names). The optimistic path (v1.46.0,sdk/internal/attrnorm/truncate.go:175-199) is:rangeover a string yieldsutf8.RuneErrorboth for invalid bytes (size 1) and for a legitimately encoded U+FFFD (size 3). Only the size-1 case enters the slow path. A valid U+FFFD rune is therefore neither counted nor truncating: the loop slides over it. Consequences:count, so no truncation ever triggers and the value is returned unchanged, whatever its length.return s[:i]keeps all previously skipped U+FFFD runes, so the retained size grows linearly with the number of U+FFFD runes and is not bounded bylimit.The OpenTelemetry specification states that truncation applies "counting any character in it as 1". A valid U+FFFD is one character and must count as 1; here it counts as 0. The regression test suite of the repository contains no U+FFFD case, which is why this went unnoticed.
Call chains (v1.46.0):
span.SetAttributes->sdk/trace/span.go(normAttr) ->attrnorm.Truncate->sdk/internal/attrnorm/truncate.go(truncate)Record.AddAttributes/SetAttributes->sdk/log/record.go(attrnorm.TruncateValue) ->sdk/log/internal/attrnorm/truncate.go(truncate)Deduplication: GHSA-p9f8-wvj8-2fg8 describes the pre-v1.33.0 helper (
safeTruncateValidUTF8), which gave up truncating entirely for strings containing RuneError. The rewrite ine016a78c9replaced that code; this report concerns the rewritten code, is present only in versions that the advisory lists as fixed, and no public issue or advisory describes it.PoC
Minimal reproduction with the published release (no repository checkout needed). Go 1.25+ is required (the release declares
go 1.25.0; any recent toolchain auto-selects one).Create a directory with these files.
go.mod(then rungo mod tidyonce to fillgo.sum):otelgo_truncate_test.go:(The
-runpattern above selects the three truncation cases plus the control; the fourth test function is included because it is part of the exact file that produced the output below - it compiles but is not selected by the pattern, and its output does not appear.)otelgo_log_truncate_test.go:Run:
Expected output (captured against the published v1.46.0 modules; the three FAIL lines are the bypass being triggered and the PASS control proves the limit is active in the same setup; the only varying parts are the durations in parentheses and the total on the
FAIL otelpocsummary line):The mixed-string case stores 105 characters for a limit of 5: the 100 U+FFFD runes (300 uncounted bytes) are all retained, plus 5 of the 6 ASCII characters.
Impact
Applications that enable
AttributeValueLengthLimit(orWithAttributeValueLengthLimitfor logs) to bound attribute memory do not get that bound for values containing valid U+FFFD runes. Span and log-record attribute values are routinely derived from untrusted input (HTTP headers, request bodies, database fields), so an attacker can inflate per-span memory retention linearly, defeating the memory protection the operator explicitly enabled and accumulating increased memory usage over the span/log pipeline. Confidentiality and integrity are not affected.Suggested fix
In the optimistic loop, count every rune of size > 1 (including the legitimately encoded U+FFFD) and only divert size-1 invalid bytes to the slow path. Add regression cases for: pure U+FFFD strings, U+FFFD-dominated mixed strings, and a truncation point landing after a U+FFFD (the current
truncate_test.gohas no U+FFFD case).Severity
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:LReferences
This data is provided by the GitHub Advisory Database (CC-BY 4.0).
opentelemetry-go: AttributeValueLengthLimit is fully bypassed by attribute values composed of valid U+FFFD runes
CVE-2026-128085 / GHSA-q7gw-24fr-5p69
More information
Details
Summary
The
AttributeValueLengthLimitspan/log-record limit can be bypassed entirely with attribute values that consist of valid U+FFFD (REPLACEMENT CHARACTER) runes. The counting-based truncation introduced by the fix for GHSA-p9f8-wvj8-2fg8 (commite016a78c9, first released in v1.33.0) has an "optimistic" fast path that skips every U+FFFD without counting it and without falling back to the correct slow path. A value of 1000 U+FFFD runes (3000 bytes) is stored verbatim even with a limit of 5 characters (15 bytes). The same defect affects the attribute truncation paths ingo.opentelemetry.io/otel/sdk/trace(sdk/internal/attrnorm),go.opentelemetry.io/otel/sdk/log(sdk/log/internal/attrnorm), and the auto-instrumentation tracer ingo.opentelemetry.io/otel/trace(trace/auto.go, introduced inv1.35.0).This is an incomplete-fix issue: it is a distinct defect in the replacement code that GHSA-p9f8-wvj8-2fg8 introduced, affecting exactly the versions that advisory says are fixed (>= v1.33.0). The original advisory covers only the pre-v1.33.0 code.
Details
The shared truncation helper is generated from
internal/shared/attrnorm/truncate.go.tmpl. In the v1.46.0 release, the generated copies aresdk/internal/attrnorm/truncate.goandsdk/log/internal/attrnorm/truncate.go(identical logic, different package names). The optimistic path (v1.46.0,sdk/internal/attrnorm/truncate.go:175-199) is:rangeover a string yieldsutf8.RuneErrorboth for invalid bytes (size 1) and for a legitimately encoded U+FFFD (size 3). Only the size-1 case enters the slow path. A valid U+FFFD rune is therefore neither counted nor truncating: the loop slides over it. Consequences:count, so no truncation ever triggers and the value is returned unchanged, whatever its length.return s[:i]keeps all previously skipped U+FFFD runes, so the retained size grows linearly with the number of U+FFFD runes and is not bounded bylimit.The OpenTelemetry specification states that truncation applies "counting any character in it as 1". A valid U+FFFD is one character and must count as 1; here it counts as 0. The regression test suite of the repository contains no U+FFFD case, which is why this went unnoticed.
Call chains (v1.46.0):
span.SetAttributes->sdk/trace/span.go(normAttr) ->attrnorm.Truncate->sdk/internal/attrnorm/truncate.go(truncate)Record.AddAttributes/SetAttributes->sdk/log/record.go(attrnorm.TruncateValue) ->sdk/log/internal/attrnorm/truncate.go(truncate)Deduplication: GHSA-p9f8-wvj8-2fg8 describes the pre-v1.33.0 helper (
safeTruncateValidUTF8), which gave up truncating entirely for strings containing RuneError. The rewrite ine016a78c9replaced that code; this report concerns the rewritten code, is present only in versions that the advisory lists as fixed, and no public issue or advisory describes it.PoC
Minimal reproduction with the published release (no repository checkout needed). Go 1.25+ is required (the release declares
go 1.25.0; any recent toolchain auto-selects one).Create a directory with these files.
go.mod(then rungo mod tidyonce to fillgo.sum):otelgo_truncate_test.go:(The
-runpattern above selects the three truncation cases plus the control; the fourth test function is included because it is part of the exact file that produced the output below - it compiles but is not selected by the pattern, and its output does not appear.)otelgo_log_truncate_test.go:Run:
Expected output (captured against the published v1.46.0 modules; the three FAIL lines are the bypass being triggered and the PASS control proves the limit is active in the same setup; the only varying parts are the durations in parentheses and the total on the
FAIL otelpocsummary line):The mixed-string case stores 105 characters for a limit of 5: the 100 U+FFFD runes (300 uncounted bytes) are all retained, plus 5 of the 6 ASCII characters.
Impact
Applications that enable
AttributeValueLengthLimit(orWithAttributeValueLengthLimitfor logs) to bound attribute memory do not get that bound for values containing valid U+FFFD runes. Span and log-record attribute values are routinely derived from untrusted input (HTTP headers, request bodies, database fields), so an attacker can inflate per-span memory retention linearly, defeating the memory protection the operator explicitly enabled and accumulating increased memory usage over the span/log pipeline. Confidentiality and integrity are not affected.Suggested fix
In the optimistic loop, count every rune of size > 1 (including the legitimately encoded U+FFFD) and only divert size-1 invalid bytes to the slow path. Add regression cases for: pure U+FFFD strings, U+FFFD-dominated mixed strings, and a truncation point landing after a U+FFFD (the current
truncate_test.gohas no U+FFFD case).Severity
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:LReferences
This data is provided by OSV and the GitHub Advisory Database (CC-BY 4.0).
OpenTelemetry-Go: Exporter config logging may leak endpoint URLs in info logs
CVE-2026-81870 / GHSA-8wmf-6v46-5gfg / GO-2026-6505
More information
Details
Summary
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
TracerProvideris 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
MarshalLogimplementations that caused this configuration to be included in internal logs were introduced bya1fff3c.Details
When
sdk/trace.NewTracerProviderconstructs a provider, it records aTracerProvider createdinternal Info event containing the provider configuration. In affected versions, the configuration'sMarshalLogmethods recursively include:This causes the following values to be present in the event:
Insecureflag; andOpenTelemetry Go does not emit this event with its default logger, which only emits errors. An application must explicitly configure a sufficiently verbose logger with `ote