CVE-2023-25151DoS vulnerability for high cardinality metrics in opentelemetry-go-contrib
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.
What to do
Fixed builds are available from 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
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.
| Release | Package | Status | Fixed version | Advisory |
|---|---|---|---|---|
| Ubuntu 26.10 | golang-opentelemetry-contrib | Fix pending | UBUNTU-CVE-2023-25151 | |
| Ubuntu 26.04 | golang-opentelemetry-contrib | Under investigation | UBUNTU-CVE-2023-25151 | |
| Ubuntu 25.10 | golang-opentelemetry-contrib | Will not fix Ubuntu decided not to fix this in this release | UBUNTU-CVE-2023-25151 | |
| Go library | github.com/prometheus/client_golang | Fixed | 1.11.1 | GO-2022-0322 |
| Go library | go.opentelemetry.io/contrib/instrumentation/github.com/astaxie/beego/otelbeego | Fixed | 0.39.0 | GHSA-5r5m-65gx-7vrh |
| Go library | go.opentelemetry.io/contrib/instrumentation/github.com/emicklei/go-restful/otelrestful | Fixed | 0.44.0 | GO-2023-2113 |
| Go library | go.opentelemetry.io/contrib/instrumentation/github.com/gin-gonic/gin/otelgin | Fixed | 0.44.0 | GO-2023-2113 |
| Go library | go.opentelemetry.io/contrib/instrumentation/github.com/gorilla/mux/otelmux | Fixed | 0.44.0 | GO-2023-2113 |
| Go library | go.opentelemetry.io/contrib/instrumentation/github.com/labstack/echo/otelecho | Fixed | 0.44.0 | GO-2023-2113 |
| Go library | go.opentelemetry.io/contrib/instrumentation/gopkg.in/macaron.v1/otelmacaron | Fixed | 0.44.0 | GO-2023-2113 |
| Go library | go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace | Fixed | 0.44.0 | GO-2023-2113 |
| Go library | go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp | Fixed | 0.39.0 | GO-2023-2113 |
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.
- open-telemetry opentelemetry-go-contrib: affected: >= 0.38.0, < 0.39.0
References
- https://github.com/open-telemetry/opentelemetry-go-contrib/security/advisories/GHSA-5r5m-65gx-7vrh
- https://github.com/open-telemetry/opentelemetry-go/blob/v1.12.0/semconv/internal/v2/http.go#L159
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.