CVE-2026-40182: OpenTelemetry dotnet OTLP Exporter Reads Unbounded HTTP Vulnerability

MODERATE
Advisory Identifier: GHSA-q834-8qmm-v933
CVSS 5.3
CWE-789
Published
Advisory Summary

CVE-2026-40182 is a MODERATE (CVSS 5.3) otlp exporter reads unbounded http vulnerability (CWE-789: Memory Allocation with Excessive Size Value) affecting OpenTelemetry dotnet libraries in the NuGet ecosystem. The issue involves otlp exporter reads unbounded http response bodies. Remediation is available by upgrading affected packages to version 1.15.2.

CVE-2026-40182 at a Glance

CVE Identifier CVE-2026-40182
GHSA Identifier GHSA-q834-8qmm-v933
Severity MODERATE
CVSS v3.1 Base Score 5.3
CWE Classification CWE-789: Memory Allocation with Excessive Size Value
Affected Product OpenTelemetry dotnet
Package Ecosystem NuGet
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:A/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H).

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

How to Fix CVE-2026-40182

To remediate this vulnerability, upgrade all affected OpenTelemetry dotnet dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

OpenTelemetry.Exporter.OpenTelemetryProtocol fixed: 1.15.2
Upgrade OpenTelemetry.Exporter.OpenTelemetryProtocol to 1.15.2
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 OpenTelemetry.Exporter.OpenTelemetryProtocol

How to Check if You Are Affected

To determine whether your application is affected by CVE-2026-40182, inspect your project dependencies for OpenTelemetry dotnet:

inspect dependencies for OpenTelemetry.Exporter.OpenTelemetryProtocol

Analyze the terminal output to locate any version of OpenTelemetry dotnet in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.15.2), 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-789: Memory Allocation with Excessive Size Value, where the product allocates memory based on an untrusted, large size value, but it does not ensure that the size is within expected limits, allowing arbitrary amounts of memory to be allocated. In OpenTelemetry dotnet, 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 When exporting telemetry to a back-end/collector over gRPC or HTTP using OpenTelemetry Protocol format (OTLP), if the request results in a unsuccessful request (i.e. HTTP 4xx or 5xx), the response is read into memory with no upper-bound on the number of bytes consumed. This could cause memory exhaustion in the consuming application if the configured back-end/collector endpoint is attacker-controlled (or a network attacker can MitM the connection) and an extremely large body is returned by the response. ### Details https://github.com/open-telemetry/opentelemetry-dotnet/pull/6564 introduced a change to read the response body when a non-200 HTTP status code is received when exporting telemetry to aid debugging by operators so that the error response is included in the logs emitted by the exporter for both [gRPC](https://github.com/open-telemetry/opentelemetry-dotnet/blob/640cf63628567b76b348b26988920dbc0b5c1662/src/OpenTelemetry.Exporter.OpenTelemetryProtocol/Implementation/ExportClient/OtlpGrpcExportClient.cs#L123-L134) and [HTTP/protobuf](https://github.com/open-telemetry/opentelemetry-dotnet/blob/640cf63628567b76b348b26988920dbc0b5c1662/src/OpenTelemetry.Exporter.OpenTelemetryProtocol/Implementation/ExportClient/OtlpHttpExportClient.cs#L36-L41). An unintended consequence of this change is that the response body is [fully read into memory when received with no upper-bound](https://github.com/open-telemetry/opentelemetry-dotnet/blob/640cf63628567b76b348b26988920dbc0b5c1662/src/OpenTelemetry.Exporter.OpenTelemetryProtocol/Implementation/ExportClient/OtlpExportClient.cs#L68-L89). This vulnerability was surfaced during the investigation of GHSA-w8rr-5gcm-pp58. ### Impact If an application using the OTLP exporter is configured to use a back-end/collector endpoint that is attacker-controlled (or a network attacker can MitM the connection) and an extremely large body is returned by the response the application could have its memory exhausted and create a denial-of-service condition. ### Mitigation The application's configured back-end/collector endpoint needs to behave maliciously. If the collector/back-end is a well-behaved implementation response bodies should not be excessively large if a request error occurs. ### Workarounds None known. ### Remediation [#7017](https://github.com/open-telemetry/opentelemetry-dotnet/pull/7017) updates the OTLP exporter for both gRPC and HTTP to: - Limit the number of bytes read from the response body in an error condition to 4MiB (see https://github.com/open-telemetry/opentelemetry-proto/pull/781); - Only attempt to read the response body if OpenTelemetry error logging is enabled.

CVE-2026-40182 Affected OpenTelemetry dotnet Versions

1 component(s)
Fixed Versions:
1.15.2
Product / Package Ecosystem Affected Versions Fixed Version
OpenTelemetry.Exporter.OpenTelemetryProtocol
NuGet
≥ 1.13.1
< 1.15.2
1.15.2

References

Frequently Asked Questions

What is CVE-2026-40182?
CVE-2026-40182 is a security vulnerability in OpenTelemetry dotnet involving OTLP exporter reads unbounded HTTP response bodies under CWE-789: Memory Allocation with Excessive Size Value.
Which OpenTelemetry dotnet versions are affected?
Affected versions include releases prior to 1.15.2 across affected packages: OpenTelemetry.Exporter.OpenTelemetryProtocol.
What version fixes CVE-2026-40182?
Upgrading to 1.15.2 (or the latest patched release for your respective branch) resolves the vulnerability.
Is OpenTelemetry.Exporter.OpenTelemetryProtocol affected?
Yes, OpenTelemetry.Exporter.OpenTelemetryProtocol is affected in releases prior to 1.15.2. Upgrade your dependency to 1.15.2 or later.
What is the CVSS score of CVE-2026-40182?
CVE-2026-40182 has a CVSS v3.1 base score of 5.3 (MODERATE) with vector string CVSS:3.1/AV:A/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H.
What CWE is associated with CVE-2026-40182?
CVE-2026-40182 is classified under CWE-789: Memory Allocation with Excessive Size Value (The product allocates memory based on an untrusted, large size value, but it does not ensure that the size is within expected limits, allowing arbitrary amounts of memory to be allocated.).
How can I check NuGet dependencies for CVE-2026-40182?
Run the dependency tree command: 'inspect dependencies for OpenTelemetry.Exporter.OpenTelemetryProtocol'. 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-q834-8qmm-v933",
  "modified" : "2026-04-23T21:26:10Z",
  "published" : "2026-04-23T21:26:10Z",
  "aliases" : [ "CVE-2026-40182" ],
  "summary" : "OpenTelemetry dotnet: OTLP exporter reads unbounded HTTP response bodies",
  "details" : "### Summary\n\nWhen exporting telemetry to a back-end/collector over gRPC or HTTP using OpenTelemetry Protocol format (OTLP), if the request results in a unsuccessful request (i.e. HTTP 4xx or 5xx), the response is read into memory with no upper-bound on the number of bytes consumed.\n\nThis could cause memory exhaustion in the consuming application if the configured back-end/collector endpoint is attacker-controlled (or a network attacker can MitM the connection) and an extremely large body is returned by the response.\n\n### Details\n\nhttps://github.com/open-telemetry/opentelemetry-dotnet/pull/6564 introduced a change to read the response body when a non-200 HTTP status code is received when exporting telemetry to aid debugging by operators so that the error response is included in the logs emitted by the exporter for both [gRPC](https://github.com/open-telemetry/opentelemetry-dotnet/blob/640cf63628567b76b348b26988920dbc0b5c1662/src/OpenTelemetry.Exporter.OpenTelemetryProtocol/Implementation/ExportClient/OtlpGrpcExportClient.cs#L123-L134) and [HTTP/protobuf](https://github.com/open-telemetry/opentelemetry-dotnet/blob/640cf63628567b76b348b26988920dbc0b5c1662/src/OpenTelemetry.Exporter.OpenTelemetryProtocol/Implementation/ExportClient/OtlpHttpExportClient.cs#L36-L41).\n\nAn unintended consequence of this change is that the response body is [fully read into memory when received with no upper-bound](https://github.com/open-telemetry/opentelemetry-dotnet/blob/640cf63628567b76b348b26988920dbc0b5c1662/src/OpenTelemetry.Exporter.OpenTelemetryProtocol/Implementation/ExportClient/OtlpExportClient.cs#L68-L89).\n\nThis vulnerability was surfaced during the investigation of GHSA-w8rr-5gcm-pp58.\n\n### Impact\n\nIf an application using the OTLP exporter is configured to use a back-end/collector endpoint that is attacker-controlled (or a network attacker can MitM the connection) and an extremely large body is returned by the response the application could have its memory exhausted and create a denial-of-service condition.\n\n### Mitigation\n\nThe application's configured back-end/collector endpoint needs to behave maliciously. If the collector/back-end is a well-behaved implementation response bodies should not be excessively large if a request error occurs.\n\n### Workarounds\n\nNone known.\n\n### Remediation\n\n[#7017](https://github.com/open-telemetry/opentelemetry-dotnet/pull/7017) updates the OTLP exporter for both gRPC and HTTP to:\n\n- Limit the number of bytes read from the response body in an error condition to 4MiB (see https://github.com/open-telemetry/opentelemetry-proto/pull/781);\n- Only attempt to read the response body if OpenTelemetry error logging is enabled.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:A/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "NuGet",
      "name" : "OpenTelemetry.Exporter.OpenTelemetryProtocol"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "1.13.1"
      }, {
        "fixed" : "1.15.2"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/open-telemetry/opentelemetry-dotnet/security/advisories/GHSA-q834-8qmm-v933"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-40182"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/open-telemetry/opentelemetry-dotnet/pull/6564"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/open-telemetry/opentelemetry-dotnet/pull/7017"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/open-telemetry/opentelemetry-proto/pull/781"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/open-telemetry/opentelemetry-dotnet"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-789" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-04-23T21:26:10Z",
    "nvd_published_at" : "2026-04-23T18:16:28Z"
  }
}