{"id":"GHSA-5rv5-6h4r-h22v","summary":"opentelemetry-instrumentation Denial of Service vulnerability due to unbound cardinality metrics","details":"### Summary\nAutoinstrumentation 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.\n\n### Details\nHTTP method for requests can be easily set by an attacker to be random and long.\n\n### PoC\nSend 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](https://opentelemetry-python-contrib.readthedocs.io/en/latest/instrumentation/flask/flask.html#id1).\n\n### Impact\nIn 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.\n\n### Proposed solution\nFor 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. \n\n\n","aliases":["CVE-2023-43810"],"modified":"2024-02-16T08:18:26.543161Z","published":"2023-10-02T23:29:42Z","related":["CVE-2023-43810"],"database_specific":{"github_reviewed":true,"severity":"HIGH","cwe_ids":["CWE-400"],"nvd_published_at":"2023-10-06T14:15:12Z","github_reviewed_at":"2023-10-02T23:29:42Z"},"references":[{"type":"WEB","url":"https://github.com/open-telemetry/opentelemetry-python-contrib/security/advisories/GHSA-5rv5-6h4r-h22v"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2023-43810"},{"type":"WEB","url":"https://github.com/open-telemetry/opentelemetry-python-contrib/commit/6007e0c013071e7f8b9612d3bc68aeb9d600d74e"},{"type":"PACKAGE","url":"https://github.com/open-telemetry/opentelemetry-python-contrib"},{"type":"WEB","url":"https://github.com/open-telemetry/opentelemetry-python-contrib/releases/tag/v0.41b0"}],"affected":[{"package":{"name":"opentelemetry-instrumentation","ecosystem":"PyPI","purl":"pkg:pypi/opentelemetry-instrumentation"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.41b0"}]}],"versions":["0.10b0","0.11b0","0.12b0","0.13b0","0.14b0","0.15b0","0.16b0","0.16b1","0.17b0","0.18b0","0.19b0","0.20b0","0.21b0","0.22b0","0.23b0","0.23b1","0.23b2","0.24b0","0.25b0","0.25b1","0.25b2","0.26b1","0.27b0","0.28b0","0.28b1","0.29b0","0.30b0","0.30b1","0.31b0","0.32b0","0.33b0","0.34b0","0.35b0","0.36b0","0.37b0","0.38b0","0.39b0","0.40b0","0.9b0"],"database_specific":{"source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2023/10/GHSA-5rv5-6h4r-h22v/GHSA-5rv5-6h4r-h22v.json"}}],"schema_version":"1.7.3","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"}]}