CVE-2023-45142
opentelemetry: DoS vulnerability in otelhttp
Overview
Description
OpenTelemetry-Go Contrib is a collection of third-party packages for OpenTelemetry-Go. A handler wrapper out of the box adds labels http.user_agent and http.method that have unbound cardinality. It leads to the server's potential memory exhaustion when many malicious requests are sent to it. HTTP header User-Agent or HTTP method for requests can be easily set by an attacker to be random and long. The library internally uses httpconv.ServerRequest that records every value for HTTP method and User-Agent. In order to be affected, a program has to use the otelhttp.NewHandler wrapper and not filter any unknown HTTP methods or User agents on the level of CDN, LB, previous middleware, etc. Version 0.44.0 fixed this issue when the values collected for attribute http.request.method were changed to be restricted to a set of well-known values and other high cardinality attributes were removed. As a workaround to stop being affected, otelhttp.WithFilter() can be used, but it requires manual careful configuration to not log certain requests entirely. For convenience and safe usage of this library, it should by default mark with the label unknown non-standard HTTP methods and User agents to show that such requests were made but do not increase cardinality. In case someone wants to stay with the current behavior, library API should allow to enable it.
Source: OX vulnerability database
Severity
7.5 · HIGH
CVSS 3.1 base score, scored by NVD.
- Attack vector
- Network
- Attack complexity
- Low
- Privileges required
- None
- User interaction
- None
- Scope
- Unchanged
- Confidentiality
- None
- Integrity
- None
- Availability
- High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Weakness: CWE-770
Affected packages · 7
| Ecosystem | Package | Vulnerable | Fixed in |
|---|---|---|---|
| Go | go.opentelemetry.io/contrib/instrumentation/github.com/emicklei/go-restful/otelrestful | <0.44.0 | 0.44.0 |
| Go | go.opentelemetry.io/contrib/instrumentation/github.com/gin-gonic/gin/otelgin | <0.44.0 | 0.44.0 |
| Go | go.opentelemetry.io/contrib/instrumentation/github.com/gorilla/mux/otelmux | <0.44.0 | 0.44.0 |
| Go | go.opentelemetry.io/contrib/instrumentation/github.com/labstack/echo/otelecho | <0.44.0 | 0.44.0 |
| Go | go.opentelemetry.io/contrib/instrumentation/gopkg.in/macaron.v1/otelmacaron | <0.44.0 | 0.44.0 |
| Go | go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace | <0.44.0 | 0.44.0 |
| Go | go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp | <0.44.0 | 0.44.0 |
Open a package to see all its vulnerabilities.
Operating systems · 76 fixes
Azure Linux 1 release · 7 packages
| Release | Package | Fixed in |
|---|---|---|
| 3.0 | kube-vip-cloud-provider | 0:0.0.10-1.azl3 |
| 3.0 | prometheus-adapter | 0:0.12.0-1.azl3 |
| 3.0 | docker-buildx | 0:0.14.0-1.azl3 |
| 3.0 | opa | 0:0.63.0-1.azl3 |
| 3.0 | cert-manager | 0:1.12.12-1.azl3 |
| 3.0 | kubernetes | 0:1.29.1-2.azl3 |
1 more row
Red Hat 3 releases · 3 packages
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| 7 | openshift | wont fix | — |
| 8 | openshift +1 | wont fix | — |
| 8 | ceph-ansible | 0:6.0.28.8-1.el8cp | RHSA-2024:4118 |
| 8 | ceph-base +42 | 2:16.2.10-266.el8cp | RHSA-2024:4118 |
| 8 | ceph-base +25 | 2:16.2.10-266.el9cp | RHSA-2024:4118 |
| 9 | openshift +5 | wont fix | — |
1 more row
SUSE Linux Enterprise 4 releases · 3 packages
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| 12.5 | docker +1 | 26.1.5_ce-98.120.1 | SUSE-SU-2024:4319-1 |
| 15.4 | containerd +2 | 1.7.21-150000.117.1 | SUSE-SU-2024:3221-1 |
| 15.4 | docker +2 | 26.1.5_ce-150000.212.1 | SUSE-SU-2024:4360-1 |
| 15.5 | containerd +2 | 1.7.21-150000.117.1 | SUSE-SU-2024:3221-1 |
| 15.5 | golang-github-prometheus-prometheus | 2.45.6-150100.4.20.1 | SUSE-SU-2024:3288-1 |
| 15.5 | docker +2 | 26.1.5_ce-150000.212.1 | SUSE-SU-2024:4360-1 |
3 more rows
SUSE Linux Enterprise Micro 7 releases · 2 packages
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| 5.1 | containerd | 1.7.21-150000.117.1 | SUSE-SU-2024:3221-1 |
| 5.1 | docker | 26.1.5_ce-150000.212.1 | SUSE-SU-2024:4360-1 |
| 5.2 | containerd | 1.7.21-150000.117.1 | SUSE-SU-2024:3221-1 |
| 5.2 | docker | 26.1.5_ce-150000.212.1 | SUSE-SU-2024:4360-1 |
| 5.3 | containerd | 1.7.21-150000.117.1 | SUSE-SU-2024:3221-1 |
| 5.3 | docker | 26.1.5_ce-150000.212.1 | SUSE-SU-2024:4360-1 |
7 more rows
alpine 4 releases · 1 package
| Release | Package | Fixed in |
|---|---|---|
| 3.22 | k3s | 1.29.3.1-r0 |
| 3.23 | k3s | 1.29.3.1-r0 |
| 3.24 | k3s | 1.29.3.1-r0 |
| edge | k3s | 1.29.3.1-r0 |
amazon linux 1 release · 1 package
| Release | Package | Fixed in |
|---|---|---|
| 2023 | amazon-cloudwatch-agent | 1.300032.3-1.amzn2023 |
chainguard 1 release · 16 packages
| Release | Package | Fixed in |
|---|---|---|
| azure-container-networking +4 | not affected | |
| prometheus-adapter | 0.11.1-r4 | |
| up | 0.24.0-r1 | |
| buildkitd | 0.25.2-r1 | |
| rancher-webhook-fips-0-4 | 0.4.18-r14 | |
| rancher-webhook-0-4 | 0.4.9-r1 |
10 more rows
minimos 1 release · 1 package
| Release | Package | Fixed in |
|---|---|---|
| kubernetes-1-33 +1 | 1.33.13-r2 |
openSUSE 1 release · 5 packages
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Tumbleweed | containerd +2 | 1.7.21-1.1 | openSUSE-SU-2024:14320-1 |
| Tumbleweed | teleport +3 | 14.1.1-1.1 | openSUSE-SU-2024:13360-1 |
| Tumbleweed | golang-github-prometheus-prometheus | 2.53.0-3.1 | openSUSE-SU-2024:14232-1 |
| Tumbleweed | caddy | 2.7.6-1.1 | openSUSE-SU-2024:13495-1 |
| Tumbleweed | docker +4 | 26.1.5_ce-2.1 | openSUSE-SU-2024:14321-1 |
openSUSE Leap Micro 1 release · 2 packages
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| 5.5 | containerd | 1.7.21-150000.117.1 | SUSE-SU-2024:3221-1 |
| 5.5 | docker | 26.1.5_ce-150000.212.1 | SUSE-SU-2024:4360-1 |
wolfi 1 release · 11 packages
| Release | Package | Fixed in |
|---|---|---|
| metrics-server | not affected | |
| prometheus-adapter | 0.11.1-r4 | |
| up | 0.24.0-r1 | |
| buildkitd | 0.25.2-r1 | |
| k3s | 1.28.2-r2 | |
| kubernetes-1-28 | 1.28.9-r0 |
5 more rows
References
- access.redhat.com https://access.redhat.com/security/cve/CVE-2023-45142
- github.com https://github.com/advisories/GHSA-cg3q-j54f-5p7p
- github.com https://github.com/open-telemetry/opentelemetry-go-contrib
- github.com https://github.com/open-telemetry/opentelemetry-go-contrib/blob/5f7e6ad5a49b45df45f61a1deb29d7f1158032df/instrumentation/net/http/otelhttp/handler.go#L63-L65
- github.com https://github.com/open-telemetry/opentelemetry-go-contrib/pull/4277
- github.com https://github.com/open-telemetry/opentelemetry-go-contrib/releases/tag/v1.19.0
- github.com https://github.com/open-telemetry/opentelemetry-go-contrib/security/advisories/GHSA-5r5m-65gx-7vrh
- github.com https://github.com/open-telemetry/opentelemetry-go-contrib/security/advisories/GHSA-rcjv-mgp8-qvmr
- github.com https://github.com/open-telemetry/opentelemetry-go/blob/38e1b499c3da3107694ad2660b3888eee9c8b896/semconv/internal/v2/http.go#L223
- github.com https://github.com/open-telemetry/opentelemetry-go/blob/v1.12.0/semconv/internal/v2/http.go#L159
Show all 14 references
- lists.fedoraproject.org https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/2UTRJ54INZG3OC2FTAN6AFB2RYNY2GAD
- lists.fedoraproject.org https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/2UTRJ54INZG3OC2FTAN6AFB2RYNY2GAD/
- nvd.nist.gov https://nvd.nist.gov/vuln/detail/CVE-2023-45142
- www.cve.org https://www.cve.org/CVERecord?id=CVE-2023-45142
OX Radar and Response Center
Find threats in your stack.
OX Radar can check high-priority threats, like critical package CVEs, against your context.
Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.