{"id":"CVE-2023-25151","published":"2023-02-08T19:21:37Z","modified":"2025-03-10T21:14:51Z","title":"DoS vulnerability for high cardinality metrics in opentelemetry-go-contrib","vendor":"open-telemetry","product":"opentelemetry-go-contrib","tier":"tail","description":{"text":"opentelemetry-go-contrib is a collection of extensions for OpenTelemetry-Go. The v0.38.0 release of `go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp` uses the `httpconv.ServerRequest` function to annotate metric measurements for the `http.server.request_content_length`, `http.server.response_content_length`, and `http.server.duration` instruments. The `ServerRequest` function sets the `http.target` attribute value to be the whole request URI (including the query string)[^1]. The metric instruments do not \"forget\" previous measurement attributes when `cumulative` temporality is used, this means the cardinality of the measurements allocated is directly correlated with the unique URIs handled. If the query string is constantly random, this will result in a constant increase in memory allocation that can be used in a denial-of-service attack. This issue has been addressed in version 0.39.0. Users are advised to upgrade. There are no known workarounds for this issue.","provenance":"source","from":"CVE.org"},"cvss":{"score":7.5,"severity":"HIGH","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00973,"percentile":0.6192,"provenance":"source"},"cwes":[{"id":"CWE-400","name":"Uncontrolled Resource Consumption"}],"references":[{"url":"https://github.com/open-telemetry/opentelemetry-go-contrib/security/advisories/GHSA-5r5m-65gx-7vrh","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/open-telemetry/opentelemetry-go/blob/v1.12.0/semconv/internal/v2/http.go#L159","tags":["x_refsource_MISC"]}],"priority":{"score":17.6,"factors":[{"name":"EPSS percentile","points":12.38},{"name":"CVSS severity","points":5.25}]},"vendorSlug":"open-telemetry","affectedVersions":[{"vendor":"open-telemetry","product":"opentelemetry-go-contrib","versions":[">= 0.38.0, < 0.39.0"]}],"affected":[{"ecosystem":"Go","package":"go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp","vulnerableRanges":[">=0.38.0, <0.39.0"],"patched":["0.39.0"],"from":["GHSA-5r5m-65gx-7vrh","GO-2023-1546"],"provenance":"source"},{"ecosystem":"Go","package":"go.opentelemetry.io/contrib/instrumentation/github.com/astaxie/beego/otelbeego","vulnerableRanges":[">=0.38.0, <0.39.0"],"patched":["0.39.0"],"from":["GHSA-5r5m-65gx-7vrh"],"provenance":"source"}],"euvd":{"id":"EUVD-2023-0632","exploited":false,"provenance":"source"},"lineage":{"familyId":"fam-open-telemetry-opentelemetry-go-contrib-cve-2022-21698","parents":[{"from":"CVE-2022-21698","to":"CVE-2023-25151","relation":"related","confidence":"high","kind":"lineage","evidence":[{"kind":"osv-related","provenance":"source","id":"GHSA-5r5m-65gx-7vrh","via":"related"},{"kind":"osv-related","provenance":"source","id":"GHSA-cg3q-j54f-5p7p","via":"related"},{"kind":"osv-related","provenance":"source","id":"GO-2022-0322","via":"related"},{"kind":"osv-related","provenance":"source","id":"GO-2023-1546","via":"related"}]}],"children":[{"from":"CVE-2023-25151","to":"CVE-2023-45142","relation":"related","confidence":"high","kind":"lineage","evidence":[{"kind":"osv-related","provenance":"source","id":"GHSA-5r5m-65gx-7vrh","via":"related"},{"kind":"osv-related","provenance":"source","id":"GHSA-rcjv-mgp8-qvmr","via":"related"},{"kind":"osv-related","provenance":"source","id":"GO-2023-1546","via":"related"},{"kind":"osv-related","provenance":"source","id":"GO-2023-2113","via":"related"},{"kind":"osv-related","provenance":"source","id":"GHSA-rcjv-mgp8-qvmr","via":"reference","url":"https://github.com/open-telemetry/opentelemetry-go-contrib/security/advisories/GHSA-5r5m-65gx-7vrh"}]}]}}