CVE-2026-47256: Github.com/open telemetry/opentelemetry collector contrib/exporter/sentryexporter Path Traversal Vulnerability

MODERATE
Advisory Identifier: GHSA-4jvg-4jfx-fmhc
CVSS 5.3
CWE-74 CWE-22
Published
Advisory Summary

CVE-2026-47256 is a MODERATE (CVSS 5.3) path traversal vulnerability (CWE-74: Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection')) affecting Github.com/open telemetry/opentelemetry collector contrib/exporter/sentryexporter libraries in the Go ecosystem. The issue involves path traversal in sentry exporter via attacker-controlled service.name reaches privileged sentry api endpoints with operator bearer token. Remediation is available by upgrading affected packages to version 0.154.0.

CVE-2026-47256 at a Glance

CVE Identifier CVE-2026-47256
GHSA Identifier GHSA-4jvg-4jfx-fmhc
Severity MODERATE
CVSS v3.1 Base Score 5.3
CWE Classification CWE-74: Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection')
Affected Product Github.com/open telemetry/opentelemetry collector contrib/exporter/sentryexporter
Package Ecosystem Go
Published Date
Last Updated

Security Impact

CVSS: 5.3

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality Low (C:L)
Integrity None (I:N)
Availability None (A:N)

How to Fix CVE-2026-47256

To remediate this vulnerability, upgrade all affected Github.com/open telemetry/opentelemetry collector contrib/exporter/sentryexporter dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

github.com/open-telemetry/opentelemetry-collector-contrib/exporter/sentryexporter fixed: 0.154.0
Upgrade github.com/open-telemetry/opentelemetry-collector-contrib/exporter/sentryexporter to 0.154.0
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for github.com/open-telemetry/opentelemetry-collector-contrib/exporter/sentryexporter

How to Check if You Are Affected

To determine whether your application is affected by CVE-2026-47256, inspect your project dependencies for Github.com/open telemetry/opentelemetry collector contrib/exporter/sentryexporter:

inspect dependencies for github.com/open-telemetry/opentelemetry-collector-contrib/exporter/sentryexporter

Analyze the terminal output to locate any version of Github.com/open telemetry/opentelemetry collector contrib/exporter/sentryexporter in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.154.0), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-74: Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection'), where the product constructs all or part of a command, data structure, or record using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify how it is parsed or interpreted when it is sent to a downstream component. In Github.com/open telemetry/opentelemetry collector contrib/exporter/sentryexporter, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

Summary The Sentry exporter constructs Sentry API URLs by interpolating the span's service.name resource attribute into the URL path without validation. Because service.name is controlled by remote OTLP senders and the operator-configured bearer token is attached to every request, a crafted service name can reach arbitrary Sentry API endpoints reachable by that token — including privileged admin, organization, and member endpoints within the configured Sentry organization. Affected - exporter/sentryexporter/sentry_exporter.go (lines 715–737) — extractProjectSlug returns the attacker-controlled service.name directly as the slug. - exporter/sentryexporter/sentry_exporter.go (lines 745–809) — getOrCreateProjectEndpoint passes the raw slug to GetOTLPEndpoints at line 761. - exporter/sentryexporter/sentry_client.go (lines 190–244) — GetProjectKeys interpolates the slug into fmt.Sprintf URL path and attaches the operator bearer token on line 207. - exporter/sentryexporter/sentry_client.go (lines 327–363) — GetOTLPEndpoints calls GetProjectKeys on line 329 with the raw slug. - exporter/sentryexporter/config.go (lines 55–108) — projectSlugRegexp is applied only to operator config mappings inside validateRoutingConfig, never to runtime-derived slugs. Root cause 1. extractProjectSlug (sentry_exporter.go:715–737) reads service.name from pcommon.Resource.Attributes() without schema validation and returns the raw string on line 736. 2. GetProjectKeys (sentry_client.go:192) calls fmt.Sprintf("%s/api/0/projects/%s/%s/keys/", c.baseURL, orgSlug, projectSlug). The slug is treated as a single path segment but no validation is performed. 3. projectSlugRegexp (config.go:58) — defined as ^[a-z0-9_-]{1,50}$ — is referenced only inside validateRoutingConfig on line 98 (config-time only). No runtime callsite exists. 4. Go net/http preserves literal .. and / characters in URL paths when constructed via fmt.Sprintf. 5. The operator-configured DSN / bearer token is attached unconditionally to every outbound request (sentry_client.go:207): req.Header.Set("Authorization", fmt.Sprintf("Bearer %s", c.authToken)). Exploitation Primary: query-string injection (reliable across all deployments) Attacker emits service.name = "foo?injected_query=". URL becomes https://sentry.io/api/0/projects/ORG-SLUG/foo?injected_query=/keys/. The trailing /keys/ is consumed as part of the query string. The resource endpoint is /api/0/projects/ORG-SLUG/foo. The attacker can reach any GET-based Sentry API endpoint reachable by the bearer token. This vector is not dependent on server-side path normalization and works in all deployment configurations. Secondary: path traversal (nginx-dependent) Attacker emits a span with service.name = "foo/../../members". Resulting URL: https://sentry.io/api/0/projects/ORG-SLUG/foo/../../members/keys/ After server-side normalization (nginx resolves .. segments): https://sentry.io/api/0/projects/ORG-SLUG/members/keys/ The operator bearer token authenticates the request. Effectiveness depends on whether the Sentry deployment normalizes .. segments before routing (standard nginx behaviour). Amplified: telemetry redirect for data exfiltration Attacker-owned Sentry project slug → span data for other applications is exported to an attacker-controlled Sentry project, leaking operational telemetry. The collector fetches the DSN/keys for the attacker's slug and subsequently forwards legitimate traces/logs to the attacker-controlled destination. Threat model - Attacker capabilities: remote OTLP trace sender (application-level span emission). - Operator capabilities: configures Sentry DSN, bearer token, base URL; sets up receiver pipeline. - The attacker does NOT control operator YAML. The attacker DOES control resource attribute values on spans they emit. Realistic deployment - Kubernetes cluster with OpenTelemetry Collector forwarding traces from multiple applications to Sentry SaaS or self-hosted Sentry. - One compromised or malicious application reaches the collector via OTLP. - The collector is configured with a valid Sentry bearer token for the organization. Remediation Apply the existing projectSlugRegexp to runtime-derived slugs, not only to operator config mappings: ``` import "regexp" var runtimeSlugPattern = regexp.MustCompile(`^[a-zA-Z0-9_-]+$`) func (s *endpointState) extractProjectSlug(attrs pcommon.Map) string { attrValue, exists := attrs.Get(s.attributeKey) if !exists || attrValue.Type() != pcommon.ValueTypeStr { return "" } serviceName := attrValue.Str() if serviceName == "" { return "" } if s.projectMapping != nil { if mappedSlug, ok := s.projectMapping[serviceName]; ok { return mappedSlug } } if !runtimeSlugPattern.MatchString(serviceName) { return "" // reject; drop the span or use a fallback default project } return serviceName } Alternatively, reject at URL construction: func (c *sentryClient) GetProjectKeys(ctx context.Context, orgSlug, projectSlug string) ([]projectKey, error) { if !runtimeSlugPattern.MatchString(projectSlug) { return nil, fmt.Errorf("invalid project slug: %q", projectSlug) } baseURL := fmt.Sprintf("%s/api/0/projects/%s/%s/keys/", c.baseURL, orgSlug, projectSlug) // ... } ``` Apply the runtime regex to ALL slug-derived URL components (including orgSlug if it can ever be attacker-influenced), not just to config-time validation. Credit Reported by independent security research by Martin Brodeur.

CVE-2026-47256 Affected Github.com/open telemetry/opentelemetry collector contrib/exporter/sentryexporter Versions

1 component(s)
Fixed Versions:
0.154.0
Product / Package Ecosystem Affected Versions Fixed Version
github.com/open-telemetry/opentelemetry-collector-contrib/exporter/sentryexporter
Go
< 0.154.0
0.154.0

References

Frequently Asked Questions

What is CVE-2026-47256?
CVE-2026-47256 is a security vulnerability in Github.com/open telemetry/opentelemetry collector contrib/exporter/sentryexporter involving Path traversal in Sentry exporter via attacker-controlled service.name reaches privileged Sentry API endpoints with operator bearer token under CWE-74: Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection').
Which Github.com/open telemetry/opentelemetry collector contrib/exporter/sentryexporter versions are affected?
Affected versions include releases prior to 0.154.0 across affected packages: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/sentryexporter.
What version fixes CVE-2026-47256?
Upgrading to 0.154.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is github.com/open-telemetry/opentelemetry-collector-contrib/exporter/sentryexporter affected?
Yes, github.com/open-telemetry/opentelemetry-collector-contrib/exporter/sentryexporter is affected in releases prior to 0.154.0. Upgrade your dependency to 0.154.0 or later.
What is the CVSS score of CVE-2026-47256?
CVE-2026-47256 has a CVSS v3.1 base score of 5.3 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N.
What CWE is associated with CVE-2026-47256?
CVE-2026-47256 is classified under CWE-74: Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection') (The product constructs all or part of a command, data structure, or record using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify how it is parsed or interpreted when it is sent to a downstream component.).
How can I check Go dependencies for CVE-2026-47256?
Run the dependency tree command: 'inspect dependencies for github.com/open-telemetry/opentelemetry-collector-contrib/exporter/sentryexporter'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-4jvg-4jfx-fmhc",
  "modified" : "2026-06-18T15:04:10Z",
  "published" : "2026-06-18T15:04:10Z",
  "aliases" : [ "CVE-2026-47256" ],
  "summary" : "opentelemetry-collector-contrib sentryexporter: Path traversal in Sentry exporter via attacker-controlled service.name reaches privileged Sentry API endpoints with operator bearer token",
  "details" : "Summary               \n         \n  The Sentry exporter constructs Sentry API URLs by interpolating the span's service.name resource attribute into the URL path without validation. Because\n  service.name is controlled by remote OTLP senders and the operator-configured bearer token is attached to every request, a crafted service name can reach\n  arbitrary Sentry API endpoints reachable by that token — including privileged admin, organization, and member endpoints within the configured Sentry\n  organization.                                                                                                                                               \n                                          \n  Affected                                                                                                                                                    \n                                                                                                                                                              \n  - exporter/sentryexporter/sentry_exporter.go (lines 715–737) — extractProjectSlug returns the attacker-controlled service.name directly as the slug.        \n  - exporter/sentryexporter/sentry_exporter.go (lines 745–809) — getOrCreateProjectEndpoint passes the raw slug to GetOTLPEndpoints at line 761.              \n  - exporter/sentryexporter/sentry_client.go (lines 190–244) — GetProjectKeys interpolates the slug into fmt.Sprintf URL path and attaches the operator bearer\n   token on line 207.                                                                                                                                         \n  - exporter/sentryexporter/sentry_client.go (lines 327–363) — GetOTLPEndpoints calls GetProjectKeys on line 329 with the raw slug.\n  - exporter/sentryexporter/config.go (lines 55–108) — projectSlugRegexp is applied only to operator config mappings inside validateRoutingConfig, never to   \n  runtime-derived slugs.                                                                                                                                      \n                                                                                                                                                              \n  Root cause                                                                                                                                                  \n                                                                                                                                                              \n  1. extractProjectSlug (sentry_exporter.go:715–737) reads service.name from pcommon.Resource.Attributes() without schema validation and returns the raw      \n  string on line 736.                                                                                                                                         \n  2. GetProjectKeys (sentry_client.go:192) calls fmt.Sprintf(\"%s/api/0/projects/%s/%s/keys/\", c.baseURL, orgSlug, projectSlug). The slug is treated as a\n  single path segment but no validation is performed.                                                                                                         \n  3. projectSlugRegexp (config.go:58) — defined as ^[a-z0-9_-]{1,50}$ — is referenced only inside validateRoutingConfig on line 98 (config-time only). No\n  runtime callsite exists.                                                                                                                                    \n  4. Go net/http preserves literal .. and / characters in URL paths when constructed via fmt.Sprintf.                                                         \n  5. The operator-configured DSN / bearer token is attached unconditionally to every outbound request (sentry_client.go:207): req.Header.Set(\"Authorization\", \n  fmt.Sprintf(\"Bearer %s\", c.authToken)).                                                                                                                     \n                                            \n  Exploitation                                                                                                                                                \n                                                                                                                                                              \n  Primary: query-string injection (reliable across all deployments)                                                                                           \n                                                                                                                                                              \n  Attacker emits service.name = \"foo?injected_query=\".\n                                                                                                                                                              \n  URL becomes https://sentry.io/api/0/projects/ORG-SLUG/foo?injected_query=/keys/.\n                                                                                                                                                              \n  The trailing /keys/ is consumed as part of the query string. The resource endpoint is /api/0/projects/ORG-SLUG/foo. The attacker can reach any GET-based\n  Sentry API endpoint reachable by the bearer token. This vector is not dependent on server-side path normalization and works in all deployment               \n  configurations.                           \n                                                                                                                                                              \n  Secondary: path traversal (nginx-dependent)\n                                                                                                                                                              \n  Attacker emits a span with service.name = \"foo/../../members\".\n                                          \n  Resulting URL: https://sentry.io/api/0/projects/ORG-SLUG/foo/../../members/keys/\n                                                                                                                                                              \n  After server-side normalization (nginx resolves .. segments): https://sentry.io/api/0/projects/ORG-SLUG/members/keys/\n                                                                                                                                                              \n  The operator bearer token authenticates the request. Effectiveness depends on whether the Sentry deployment normalizes .. segments before routing (standard\n  nginx behaviour).                                                                                                                                           \n                                            \n  Amplified: telemetry redirect for data exfiltration                                                                                                         \n                                            \n  Attacker-owned Sentry project slug → span data for other applications is exported to an attacker-controlled Sentry project, leaking operational telemetry.  \n  The collector fetches the DSN/keys for the attacker's slug and subsequently forwards legitimate traces/logs to the attacker-controlled destination.         \n   \n  Threat model                                                                                                                                                \n                                            \n  - Attacker capabilities: remote OTLP trace sender (application-level span emission).                                                                        \n  - Operator capabilities: configures Sentry DSN, bearer token, base URL; sets up receiver pipeline.\n  - The attacker does NOT control operator YAML. The attacker DOES control resource attribute values on spans they emit.\n                                          \n  Realistic deployment\n                                                                                                                                                              \n  - Kubernetes cluster with OpenTelemetry Collector forwarding traces from multiple applications to Sentry SaaS or self-hosted Sentry.\n  - One compromised or malicious application reaches the collector via OTLP.                                                                                  \n  - The collector is configured with a valid Sentry bearer token for the organization.\n\n                                                                                                                                                              \n  Remediation\n                                                                                                                                                              \n  Apply the existing projectSlugRegexp to runtime-derived slugs, not only to operator config mappings:\n  ```                                                                                                                                                            \n  import \"regexp\"                           \n\n  var runtimeSlugPattern = regexp.MustCompile(`^[a-zA-Z0-9_-]+$`)\n                                          \n  func (s *endpointState) extractProjectSlug(attrs pcommon.Map) string {\n      attrValue, exists := attrs.Get(s.attributeKey)                                                                                                          \n      if !exists || attrValue.Type() != pcommon.ValueTypeStr {\n          return \"\"                                                                                                                                           \n      }                                     \n      serviceName := attrValue.Str()                                                                                                                          \n      if serviceName == \"\" {\n          return \"\"                                                                                                                                           \n      }                                     \n      if s.projectMapping != nil {\n          if mappedSlug, ok := s.projectMapping[serviceName]; ok {                                                                                            \n              return mappedSlug\n          }                                                                                                                                                   \n      }                                     \n      if !runtimeSlugPattern.MatchString(serviceName) {\n          return \"\" // reject; drop the span or use a fallback default project\n      }\n      return serviceName                                                                                                                                      \n  }\n                                                                                                                                                              \n  Alternatively, reject at URL construction:  \n                                          \n  func (c *sentryClient) GetProjectKeys(ctx context.Context, orgSlug, projectSlug string) ([]projectKey, error) {\n      if !runtimeSlugPattern.MatchString(projectSlug) {                                                                                                       \n          return nil, fmt.Errorf(\"invalid project slug: %q\", projectSlug)\n      }                                                                                                                                                       \n      baseURL := fmt.Sprintf(\"%s/api/0/projects/%s/%s/keys/\", c.baseURL, orgSlug, projectSlug)\n      // ...                                                                                                                                                  \n  }                                       \n```                                                                                                                                                              \n  Apply the runtime regex to ALL slug-derived URL components (including orgSlug if it can ever be attacker-influenced), not just to config-time validation.   \n   \n  Credit                                                                                                                                                      \n                                            \n  Reported by independent security research by Martin Brodeur.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/sentryexporter"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "0.154.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/open-telemetry/opentelemetry-collector-contrib/security/advisories/GHSA-4jvg-4jfx-fmhc"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/open-telemetry/opentelemetry-collector-contrib"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-22", "CWE-74" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-06-18T15:04:10Z",
    "nvd_published_at" : null
  }
}