Lucene search

K
githubGitHub Advisory DatabaseGHSA-5RV5-6H4R-H22V
HistoryOct 02, 2023 - 11:29 p.m.

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

2023-10-0223:29:42
CWE-400
GitHub Advisory Database
github.com
15
opentelemetry
instrumentation
unbound cardinality
denial of service
vulnerability
http methods
memory exhaustion
attack
http handlers
security solution
environment variable

7.5 High

CVSS3

Attack Vector

NETWORK

Attack Complexity

LOW

Privileges Required

NONE

User Interaction

NONE

Scope

UNCHANGED

Confidentiality Impact

NONE

Integrity Impact

NONE

Availability Impact

HIGH

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

0.001 Low

EPSS

Percentile

21.4%

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.

Affected configurations

Vulners
Node
opentelemetryopentelemetryRange<0.41b0
CPENameOperatorVersion
opentelemetry-instrumentationlt0.41b0

7.5 High

CVSS3

Attack Vector

NETWORK

Attack Complexity

LOW

Privileges Required

NONE

User Interaction

NONE

Scope

UNCHANGED

Confidentiality Impact

NONE

Integrity Impact

NONE

Availability Impact

HIGH

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

0.001 Low

EPSS

Percentile

21.4%

Related for GHSA-5RV5-6H4R-H22V