-
Notifications
You must be signed in to change notification settings - Fork 540
OTLP HTTP exporter reads unbounded response bodies into memory #3958
Copy link
Copy link
Open
Labels
bugSomething isn't workingSomething isn't workingtriage/acceptedIndicates an issue or PR is ready to be actively worked on.Indicates an issue or PR is ready to be actively worked on.
Description
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:
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingtriage/acceptedIndicates an issue or PR is ready to be actively worked on.Indicates an issue or PR is ready to be actively worked on.