Skip to content

OTLP HTTP exporter reads unbounded response bodies into memory #3958

@lalitb

Description

@lalitb

Description

The OTLP HTTP exporter in opentelemetry-cpp appears to read the full HTTP response body into memory without a size limit.

Relevant code:

exporters/otlp/src/otlp_http_client.cc
ext/include/opentelemetry/ext/http/client/http_client.h

What looks problematic:

  • the HTTP client exposes the full response body as std::vector<uint8_t>
  • the OTLP HTTP handler then copies it again into a std::string

So a malicious or compromised OTLP/HTTP endpoint could return a very large response body and cause excessive memory allocation, potentially leading to OOM.

This looks similar to the issue being discussed in other OTel SDKs:

open-telemetry/opentelemetry-go GHSA-w8rr-5gcm-pp58

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingtriage/acceptedIndicates an issue or PR is ready to be actively worked on.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions