Ecosyste.ms: Advisories

An open API service providing security vulnerability metadata for many open source software ecosystems.

Security Advisories: GSA_kwCzR0hTQS01cnY1LTZoNHItaDIyds4AA2ME

opentelemetry-instrumentation Denial of Service vulnerability due to unbound cardinality metrics

Summary

Autoinstrumentation out of the box adds the label http_method that has unbound cardinality. It leads to the server's potential memory exhaustion when many malicious requests are sent.

Details

HTTP method for requests can be easily set by an attacker to be random and long.

PoC

Send many requests with long randomly generated HTTP methods and observe how memory consumption increases during it. The app can be like this example from the official docs.

Impact

In order to be affected program has to be instrumented for HTTP handlers and does not filter any unknown HTTP methods on the level of CDN, LB, previous middleware, etc.

Proposed solution

For convenience and safe usage of this library, it should by default mark with the label UNKNOWN non-standard HTTP methods to show that such requests were made (and this way does not increase cardinality). In case someone wants to stay with the current behavior, library API should allow it. The mechanism with environment variables can be reused - introduce the variable OTEL_INSTRUMENTATION_HTTP_CAPTURE_ALL_METHODS that will allow enabling current behavior when someone really wants it.

Permalink: https://github.com/advisories/GHSA-5rv5-6h4r-h22v
JSON: https://advisories.ecosyste.ms/api/v1/advisories/GSA_kwCzR0hTQS01cnY1LTZoNHItaDIyds4AA2ME
Source: GitHub Advisory Database
Origin: Unspecified
Severity: High
Classification: General
Published: about 1 year ago
Updated: about 1 year ago


CVSS Score: 7.5
CVSS vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

EPSS Percentage: 0.00104
EPSS Percentile: 0.43674

Identifiers: GHSA-5rv5-6h4r-h22v, CVE-2023-43810
References: Repository: https://github.com/open-telemetry/opentelemetry-python-contrib
Blast Radius: 24.7

Affected Packages

pypi:opentelemetry-instrumentation
Dependent packages: 172
Dependent repositories: 1,943
Downloads: 20,031,220 last month
Affected Version Ranges: < 0.41b0
Fixed in: 0.41b0
All affected versions:
All unaffected versions: