CVE-2026-41173: OpenTelemetry.Sampler.AWS Remote Code Execution Vulnerability
MODERATECVE-2026-41173 is a MODERATE (CVSS 5.9) remote code execution vulnerability (CWE-770: Allocation of Resources Without Limits or Throttling) affecting OpenTelemetry.Sampler.AWS libraries in the NuGet ecosystem. The issue involves opentelemetry.sampler.aws & opentelemetry.resources.aws have unbounded http response body reads. Remediation is available by upgrading affected packages to version 0.1.0-alpha.8, 1.15.1.
CVE-2026-41173 at a Glance
Security Impact
CVSS: 5.9
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H).
How to Fix CVE-2026-41173
To remediate this vulnerability, upgrade all affected OpenTelemetry.Sampler.AWS dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade OpenTelemetry.Sampler.AWS to 0.1.0-alpha.8
Upgrade OpenTelemetry.Resources.AWS to 1.15.1
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for OpenTelemetry.Sampler.AWS
How to Check if You Are Affected
To determine whether your application is affected by CVE-2026-41173, inspect your project dependencies for OpenTelemetry.Sampler.AWS:
inspect dependencies for OpenTelemetry.Sampler.AWS
Analyze the terminal output to locate any version of OpenTelemetry.Sampler.AWS in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.1.0-alpha.8), 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-770: Allocation of Resources Without Limits or Throttling, where the product allocates a reusable resource or group of resources on behalf of an actor without imposing any intended restrictions on the size or number of resources that can be allocated. In OpenTelemetry.Sampler.AWS, 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
CVE-2026-41173 Affected OpenTelemetry.Sampler.AWS Versions
2 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
OpenTelemetry.Sampler.AWS
|
NuGet |
< 0.1.0-alpha.8
|
0.1.0-alpha.8
|
|
OpenTelemetry.Resources.AWS
|
NuGet |
< 1.15.1
|
1.15.1
|
References
Frequently Asked Questions
What is CVE-2026-41173?
Which OpenTelemetry.Sampler.AWS versions are affected?
What version fixes CVE-2026-41173?
Is OpenTelemetry.Sampler.AWS affected?
Is OpenTelemetry.Resources.AWS affected?
What is the CVSS score of CVE-2026-41173?
What CWE is associated with CVE-2026-41173?
How can I check NuGet dependencies for CVE-2026-41173?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-28xm-prxc-5866",
"modified" : "2026-04-23T21:44:31Z",
"published" : "2026-04-23T21:44:31Z",
"aliases" : [ "CVE-2026-41173" ],
"summary" : "OpenTelemetry.Sampler.AWS & OpenTelemetry.Resources.AWS have unbounded HTTP response body reads",
"details" : "### Summary\n\n`OpenTelemetry.Sampler.AWS` reads unbounded HTTP response bodies from a configured AWS X-Ray remote sampling endpoint into memory.\n\n`OpenTelemetry.Resources.AWS` reads unbounded HTTP response bodies from a configured AWS EC2/ECS/EKS remote instance metadata service endpoint into memory.\n\nBoth of these would allow an attacker-controlled endpoint or be acting as a Man-in-the-Middle (MitM) to cause excessive memory allocation and possible process termination (via Out of Memory (OOM)).\n\n### Details\n\n#### OpenTelemetry.Sampler.AWS\n\n`AWSXRaySamplerClient.DoRequestAsync` called `HttpClient.SendAsync` followed by `ReadAsStringAsync()`, which materializes the entire HTTP response body into a single in-memory string with no size limit. The sampling endpoint is configurable via `AWSXRayRemoteSamplerBuilder.SetEndpoint` (default: `http://localhost:2000`).\n\nAn attacker who controls the configured endpoint, or who can intercept traffic to it (MitM), can return an arbitrarily large response body. This causes unbounded heap allocation in the consuming process, leading to high transient memory pressure, garbage-collection stalls, or an `OutOfMemoryException` that terminates the process.\n\n#### OpenTelemetry.Resources.AWS\n\nThe [`AWSEC2Detector`](https://github.com/open-telemetry/opentelemetry-dotnet-contrib/blob/171c6b81f88831641b56b470e6f92862e605013d/src/OpenTelemetry.Resources.AWS/AWSEC2Detector.cs), [`AWSECSDetector`](https://github.com/open-telemetry/opentelemetry-dotnet-contrib/blob/171c6b81f88831641b56b470e6f92862e605013d/src/OpenTelemetry.Resources.AWS/AWSECSDetector.cs) and [`AWSEKSDetector`](https://github.com/open-telemetry/opentelemetry-dotnet-contrib/blob/171c6b81f88831641b56b470e6f92862e605013d/src/OpenTelemetry.Resources.AWS/AWSEKSDetector.cs) classes all make HTTP requests to the relevant AWS metadata service (`http://169.254.169.254`, `ECS_CONTAINER_METADATA_URI`/`ECS_CONTAINER_METADATA_URI_V4` or `https://kubernetes.default.svc` respectively) to obtain metadata about the running process and its infrastructure.\n\nAn attacker who controls the configured endpoint(s), or who can intercept traffic to them (MiTM), can return an arbitrarily large response body. This causes unbounded heap allocation in the consuming process, leading to high transient memory pressure, garbage-collection stalls, or an `OutOfMemoryException` that terminates the process.\n\n### Impact\n\nDenial of Service (DoS). An attacker can destabilize or crash the application by forcing unbounded memory allocation through the X-Ray sampling and/or EC2/ECS/EKS HTTP response paths.\n\n### Mitigating Factors\n\n- The default X-Ray sampling endpoint is `http://localhost:2000`, which limits remote exposure in default configurations.\n- Risk increases materially when operators configure the sampler to point at a remote or untrusted endpoint.\n\n### Patches\n\nFixed in `OpenTelemetry.Sampler.AWS` version `0.1.0-alpha.8` and `OpenTelemetry.Resources.AWS` version `1.15.1`.\n\nThe fixes (#4100, #4122) introduce changes that introduce limits to `HttpClient` requests so that the response body is streamed rather than buffered entirely in memory.\n\n### Workarounds\n\n- Ensure the X-Ray sampling endpoint (`http://localhost:2000` by default) is not accessible to untrusted parties.\n- Use network-level controls (firewall rules, mTLS, service mesh) to prevent Man-in-the-Middle (MitM) attacks on the sampling endpoint and/or EC2/ECS/EKS connection.\n- If using a remote endpoint, place it behind a reverse proxy that enforces a response body size limit.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "NuGet",
"name" : "OpenTelemetry.Sampler.AWS"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "0.1.0-alpha.8"
} ]
} ]
}, {
"package" : {
"ecosystem" : "NuGet",
"name" : "OpenTelemetry.Resources.AWS"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "1.15.1"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/open-telemetry/opentelemetry-dotnet-contrib/security/advisories/GHSA-28xm-prxc-5866"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-41173"
}, {
"type" : "WEB",
"url" : "https://github.com/open-telemetry/opentelemetry-dotnet-contrib/pull/4100"
}, {
"type" : "WEB",
"url" : "https://github.com/open-telemetry/opentelemetry-dotnet-contrib/pull/4122"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/open-telemetry/opentelemetry-dotnet-contrib"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-770" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2026-04-23T21:44:31Z",
"nvd_published_at" : "2026-04-23T19:17:29Z"
}
}