CVEfocus › CVE database › CVE-2023-45142

CVE-2023-45142OpenTelemetry-Go Contrib has DoS vulnerability in otelhttp due to unbound cardinality…

CVSS 7.5 HighEPSS 1.6% (higher than 76% of CVEs)Published 2023-10-12Updated 2025-02-13Assigner: GitHub_M

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.

CWE-770

What to do

Fixed builds are available from Alpine, Go: see the table below for the fixed version per release.

Ubuntu has not shipped a fix for every release yet.

Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.

curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \
  -H "Content-Type: text/plain" --data-binary @inventory.txt

Vendor status at a glance

14Fixed
1Fix pending
1Under investigation
1Will not fix

Status by vendor and release

From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.

ReleasePackageStatusFixed versionAdvisory
Ubuntu 26.10golang-opentelemetry-contribFix pendingUBUNTU-CVE-2023-45142
Ubuntu 26.04golang-opentelemetry-contribUnder investigationUBUNTU-CVE-2023-45142
Ubuntu 25.10golang-opentelemetry-contribWill not fix
Ubuntu decided not to fix this in this release
UBUNTU-CVE-2023-45142
Alpine Linux 3.24k3sFixed1.29.3.1-r0ALPINE-CVE-2023-45142
Alpine Linux 3.23k3sFixed1.29.3.1-r0ALPINE-CVE-2023-45142
Alpine Linux 3.22k3sFixed1.29.3.1-r0ALPINE-CVE-2023-45142
Alpine Linux 3.21k3sFixed1.29.3.1-r0ALPINE-CVE-2023-45142
Alpine Linux 3.20k3sFixed1.29.3.1-r0ALPINE-CVE-2023-45142
Go librarygithub.com/prometheus/client_golangFixed1.11.1GO-2022-0322
Go librarygo.opentelemetry.io/contrib/instrumentation/github.com/astaxie/beego/otelbeegoFixed0.39.0GHSA-5r5m-65gx-7vrh
Go librarygo.opentelemetry.io/contrib/instrumentation/github.com/emicklei/go-restful/otelrestfulFixed0.44.0GO-2023-2113
Go librarygo.opentelemetry.io/contrib/instrumentation/github.com/gin-gonic/gin/otelginFixed0.44.0GO-2023-2113
Go librarygo.opentelemetry.io/contrib/instrumentation/github.com/gorilla/mux/otelmuxFixed0.44.0GO-2023-2113
Go librarygo.opentelemetry.io/contrib/instrumentation/github.com/labstack/echo/otelechoFixed0.44.0GHSA-rcjv-mgp8-qvmr
Go librarygo.opentelemetry.io/contrib/instrumentation/gopkg.in/macaron.v1/otelmacaronFixed0.44.0GHSA-rcjv-mgp8-qvmr
Go librarygo.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptraceFixed0.44.0GO-2023-2113
Go librarygo.opentelemetry.io/contrib/instrumentation/net/http/otelhttpFixed0.39.0GO-2023-1546

What the vendor says

As published in the CVE record by GitHub_M, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.

References

About this page

Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.