Sentry Exporter CVE-2026-47256
MEDIUMSeverity by source
AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N
Scope changes because attacker pivots from collector context to privileged Sentry org endpoints via operator token; C:H reflects potential org-wide data access.
Primary rating from GitHub Advisory.
CVSS VectorGitHub Advisory
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N
Lifecycle Timeline
2DescriptionGitHub Advisory
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
- extractProjectSlug (sentry_exporter.go:715-737) reads service.name from pcommon.Resource.Attributes() without schema validation and returns the raw
string on line 736.
- 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.
- 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.
- Go net/http preserves literal .. and / characters in URL paths when constructed via fmt.Sprintf.
- 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.
AnalysisAI
Path traversal and query-string injection in the OpenTelemetry Collector Contrib Sentry exporter allows any OTLP span sender to redirect the collector's operator bearer token to arbitrary Sentry API endpoints - including privileged admin, organization, and member management endpoints. The vulnerability stems from the service.name span attribute being interpolated directly into Sentry API URLs via fmt.Sprintf without validation, while the existing projectSlugRegexp safeguard is only applied to operator-configured mappings and never to runtime-derived slugs. …
Unlock full vulnerability intelligence
- Risk assessment & exploitation conditions
- Attack chain visualization
- Remediation with exact patch versions
- Threat intelligence from 22 sources
- Personal watchlist & email alerts
Free forever · No credit card required
Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata
Vulnerability AssessmentAI
| Exploitation | The attacker must be able to emit OTLP spans (via gRPC port 4317 or HTTP port 4318) to an OpenTelemetry Collector that has the Sentry exporter enabled and configured with a valid Sentry bearer token. … Additional conditions and limiting factors are described in the full assessment. |
| Risk Assessment | The NVD-assigned CVSS 3.1 score of 5.3 (Medium, S:U/C:L/I:N/A:N) materially understates real-world risk. … Full risk analysis with EPSS, KEV, and SSVC signal comparison available after sign-in. |
| Exploit Scenario | An attacker operating a compromised application in a shared Kubernetes cluster emits OTLP spans with `service.name` set to `foo?injected_query=`, causing the collector's Sentry exporter to construct the URL `https://sentry.io/api/0/projects/ORG-SLUG/foo?injected_query=/keys/`, which resolves to the Sentry endpoint `/api/0/projects/ORG-SLUG/foo` with the operator's bearer token attached. The attacker then iterates through known Sentry API paths - such as `/members/`, `/teams/`, and `/api-keys/` - by varying the injected payload, harvesting privileged organization data using the operator's authentication context without any exploitation of a Sentry-side vulnerability. |
| Remediation | Upgrade `opentelemetry-collector-contrib` to version 0.154.0 or later, which applies slug validation to runtime-derived values at `extractProjectSlug` - rejecting any `service.name` that does not match `^[a-zA-Z0-9_-]+$` - and adds a second validation gate inside `GetProjectKeys` before URL construction. … Detailed patch versions, workarounds, and compensating controls in full report. |
Threat intelligence, references, and detailed analysis are available after sign-in.
More in Kubernetes
View allA critical vulnerability in Kubernetes ingress-nginx controller allows unauthenticated attackers with pod network access
Credential-harvesting malware compromised 84 versions of 42 TanStack npm packages on 2026-05-11 via chained GitHub Actio
Kubernetes ingress-nginx contains a configuration injection vulnerability via the mirror-target and mirror-host Ingress
A security issue was discovered in ingress-nginx https://github.com/kubernetes/ingress-nginx where the `auth-url` Ingres
A security issue was discovered in ingress-nginx https://github.com/kubernetes/ingress-nginx where the `auth-tls-match-c
Kubernetes API server in all versions allow an attacker who is able to create a ClusterIP service and set the spec.exter
Argo CD is a declarative, GitOps continuous delivery tool for Kubernetes. Rated critical severity (CVSS 9.9), this vulne
The Kubernetes integration in GitLab Enterprise Edition 11.x before 11.2.8, 11.3.x before 11.3.9, and 11.4.x before 11.4
Kyverno Kubernetes policy engine prior to 1.x has a privilege escalation vulnerability (CVSS 9.9) allowing policy bypass
Kamaji is the Hosted Control Plane Manager for Kubernetes. Rated critical severity (CVSS 9.9), this vulnerability is rem
Jumpserver is a popular open source bastion host, and Koko is a Jumpserver component that is the Go version of coco, ref
String filter bypass in Inspektor Gadget Kubernetes eBPF tooling before fix. Insufficient string escaping enables filter
Same weakness CWE-22 – Path Traversal
View allSame technique Path Traversal
View allShare
External POC / Exploit Code
Leaving vuln.today
GHSA-4jvg-4jfx-fmhc