OpenTelemetry-Go Contrib vulnerable to denial of service in otelhttp due to unbound cardinality metrics
CVE-2023-45142GHSA-rcjv-mgp8-qvmr
What to do
Vendor fix available. Upgrade each affected package to the fixed version on its release line (go.opentelemetry.io/contrib/instrumentation/github.com/gin-gonic/gin/otelgin 0.44.0; go.opentelemetry.io/contrib/instrumentation/github.com/gorilla/mux/otelmux 0.44.0; go.opentelemetry.io/contrib/instrumentation/github.com/labstack/echo/otelecho 0.44.0; go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp 0.44.0; go.opentelemetry.io/contrib/instrumentation/github.com/emicklei/go-restful/otelrestful 0.44.0; 2 more packages under Affected packages), redeploy, then verify what is actually installed.
This page has no inventory attached, so it cannot say whether you are affected. A vendor fix is not proof that your deployment is fixed.
Affected packages
Go go.opentelemetry.io/contrib/instrumentation/github.com/gin-gonic/gin/otelgin
- Affected
- < 0.44.0
- Fixed in
- 0.44.0
Go go.opentelemetry.io/contrib/instrumentation/github.com/gorilla/mux/otelmux
- Affected
- < 0.44.0
- Fixed in
- 0.44.0
Go go.opentelemetry.io/contrib/instrumentation/github.com/labstack/echo/otelecho
- Affected
- < 0.44.0
- Fixed in
- 0.44.0
Go go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp
- Affected
- < 0.44.0
- Fixed in
- 0.44.0
Go go.opentelemetry.io/contrib/instrumentation/github.com/emicklei/go-restful/otelrestful
- Affected
- < 0.44.0
- Fixed in
- 0.44.0
Go go.opentelemetry.io/contrib/instrumentation/gopkg.in/macaron.v1/otelmacaron
- Affected
- < 0.44.0
- Fixed in
- 0.44.0
Go go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace
- Affected
- < 0.44.0
- Fixed in
- 0.44.0
Sources
- GitHub Advisory Database and maintainer security advisories on GitHub
GitHub-reviewed advisory GHSA-rcjv-mgp8-qvmr lists affected ranges: Go go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp >=0 =0 =0 =0 <0.44.0; Go…
VerifiedObserved Structured GitHub Advisory Database record (type=reviewed) from the GitHub REST API.
Severity and exploitation
- Exploitation
- No confirmed exploitation recorded. Patch Next marks exploitation only from CISA KEV.
- CVSS
- 7.5 · CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
- EPSS
- CVE-2023-45142: 1.61% estimated exploitation activity in the next 30 days; percentile 76.02 (FIRST EPSS, 2026-11-03). This is a model estimate, not proof of exploitation or customer exposure.
Source description
As published by the source; long descriptions are shortened.
Summary This handler wrapper https://github.com/open-telemetry/opentelemetry-go-contrib/blob/5f7e6ad5a49b45df45f61a1deb29d7f1158032df/instrumentation/net/http/otelhttp/handler.go#L63-L65 out of the box adds labels - http.useragent - http.method that have unbound cardinality. It leads to the server's potential memory exhaustion when many malicious requests are sent to it. Details 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. PoC Send many requests with long randomly generated HTTP methods or/and User agents (e.g. a million) and observe how memory consumption increases during it. Impact In order to be affected, the program has to configure a metrics pipeline, use otelhttp.NewHandler wrapper, and does not filter any unknown HTTP methods or User agents on the level of CDN, LB, previous middleware, etc. Others It is…
Dates and revisions
- Published by the source
- Last modified by the source
- Source last checked
- Revision 1 · created ·
Published from ghsa record GHSA-rcjv-mgp8-qvmr
Agent brief
Preview the exact text before you copy it. Commands are read-only suggestions; review them before running anything.
# Patch Next advisory brief: CVE-2023-45142 Advisory: OpenTelemetry-Go Contrib vulnerable to denial of service in otelhttp due to unbound cardinality metrics IDs: CVE-2023-45142, GHSA-rcjv-mgp8-qvmr Record: https://patchnext.com/advisories/cve-2023-45142 (revision 1, source checked 26 Oct 2026, 15:03 UTC) Inventory: none attached. This brief comes from a public page and does not say whether any deployment is affected. Severity: High (CVSS 7.5) Exploitation: no confirmed exploitation recorded. Patch Next confirms exploitation only from CISA KEV. Vendor response: Vendor fix available; fixed versions by package: go.opentelemetry.io/contrib/instrumentation/github.com/gin-gonic/gin/otelgin 0.44.0; go.opentelemetry.io/contrib/instrumentation/github.com/gorilla/mux/otelmux 0.44.0; go.opentelemetry.io/contrib/instrumentation/github.com/labstack/echo/otelecho 0.44.0; go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp 0.44.0; go.opentelemetry.io/contrib/instrumentation/github.com/emicklei/go-restful/otelrestful 0.44.0; go.opentelemetry.io/contrib/instrumentation/gopkg.in/macaron.v1/otelmacaron 0.44.0; go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace 0.44.0. A vendor fix does not mean a deployment is fixed. ## Affected components - Go go.opentelemetry.io/contrib/instrumentation/github.com/gin-gonic/gin/otelgin: affected < 0.44.0; fixed in 0.44.0 - Go go.opentelemetry.io/contrib/instrumentation/github.com/gorilla/mux/otelmux: affected < 0.44.0; fixed in 0.44.0 - Go go.opentelemetry.io/contrib/instrumentation/github.com/labstack/echo/otelecho: affected < 0.44.0; fixed in 0.44.0 - Go go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp: affected < 0.44.0; fixed in 0.44.0 - Go go.opentelemetry.io/contrib/instrumentation/github.com/emicklei/go-restful/otelrestful: affected < 0.44.0; fixed in 0.44.0 - Go go.opentelemetry.io/contrib/instrumentation/gopkg.in/macaron.v1/otelmacaron: affected < 0.44.0; fixed in 0.44.0 - Go go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace: affected < 0.44.0; fixed in 0.44.0 ## Suggested inspection (read-only) - Go go.opentelemetry.io/contrib/instrumentation/github.com/gin-gonic/gin/otelgin: check the installed version with your package manager. - Go go.opentelemetry.io/contrib/instrumentation/github.com/gorilla/mux/otelmux: check the installed version with your package manager. - Go go.opentelemetry.io/contrib/instrumentation/github.com/labstack/echo/otelecho: check the installed version with your package manager. - Go go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp: check the installed version with your package manager. - Go go.opentelemetry.io/contrib/instrumentation/github.com/emicklei/go-restful/otelrestful: check the installed version with your package manager. - Go go.opentelemetry.io/contrib/instrumentation/gopkg.in/macaron.v1/otelmacaron: check the installed version with your package manager. - Go go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace: check the installed version with your package manager. ## Supported action Upgrade each affected component to a fixed version on its release line. For a transitive dependency, upgrade the parent package or add an override or constraint, then regenerate the lockfile. Redeploy every environment that ran an affected version. ## Required regression checks - Run the test suite and a production build. - Exercise the features that depend on go.opentelemetry.io/contrib/instrumentation/github.com/gin-gonic/gin/otelgin, go.opentelemetry.io/contrib/instrumentation/github.com/gorilla/mux/otelmux, go.opentelemetry.io/contrib/instrumentation/github.com/labstack/echo/otelecho, go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp, go.opentelemetry.io/contrib/instrumentation/github.com/emicklei/go-restful/otelrestful, go.opentelemetry.io/contrib/instrumentation/gopkg.in/macaron.v1/otelmacaron, go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace. - Repeat the inspection and confirm that only fixed versions remain installed. ## Rollback considerations - Keep the previous lockfile and deployment artifact. Rolling back reinstates the vulnerable version, so apply any documented mitigation while you fix forward. ## Unresolved questions - Which deployments run an affected version? - Exploitation status can change. Check again before lowering the priority. - Mark the work resolved only after the fixed version is verified in production. ## Sources - Verified: https://github.com/advisories/GHSA-rcjv-mgp8-qvmr (GitHub-reviewed advisory GHSA-rcjv-mgp8-qvmr lists affected ranges: Go go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp >=0 =0 =0 =0 <0.44.0; Go…) Commands are suggestions: review each one before running it.
Loading voting…