Your RSA-2048 keys break in 2030. Find every one of them before attackers do.
🐹 Go

CVE-2023-45142

HIGH

OpenTelemetry-Go Contrib has DoS vulnerability in otelhttp due to unbound cardinality metrics

Also known asGHSA-rcjv-mgp8-qvmrGO-2023-2113
Published
Oct 12, 2023
Updated
Apr 10, 2026
Affected
7 pkgs
Patched
7 / 7
Exploits
None indexed

EPSS Exploitation Probability

via FIRST.org ↗
1.4%probability of exploitation in next 30 days
Lower Risk68th percentile+0.20%
0.66%1.06%1.46%1.86%1.2%1.4%Dec 25Apr 26Jun 26

EPSS (Exploit Prediction Scoring System) is a daily probability model maintained by FIRST.org. It estimates the likelihood a CVE will be exploited in production environments within the next 30 days, derived from real-world threat intelligence signals.

Blast Radius

7 pkgs affected
🐹go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp🐹go.opentelemetry.io/contrib/instrumentation/github.com/emicklei/go-restful/otelrestful🐹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/gopkg.in/macaron.v1/otelmacaron🐹go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace

Real-time download stats are indexed for npm and PyPI packages. This vulnerability affects Go packages — download data is not available via public APIs for these ecosystems.

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.

Affected Packages

7 total 7 fixed
EcosystemPackageVulnerable rangeFix
🐹Gogo.opentelemetry.io/contrib/instrumentation/net/http/otelhttpall versions0.44.0
🐹Gogo.opentelemetry.io/contrib/instrumentation/github.com/emicklei/go-restful/otelrestfulall versions0.44.0
🐹Gogo.opentelemetry.io/contrib/instrumentation/github.com/gin-gonic/gin/otelginall versions0.44.0
🐹Gogo.opentelemetry.io/contrib/instrumentation/github.com/gorilla/mux/otelmuxall versions0.44.0
🐹Gogo.opentelemetry.io/contrib/instrumentation/github.com/labstack/echo/otelechoall versions0.44.0
🐹Gogo.opentelemetry.io/contrib/instrumentation/gopkg.in/macaron.v1/otelmacaronall versions0.44.0

Detection & mitigation playbook

Open-source dependency
  1. Detect

    Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp. O3's reachability analysis confirms whether the vulnerable code path is actually invoked in your application, so you act on real exposure instead of every transitive match.

  2. Fix

    Update go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp to 0.44.0 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2023-45142 is resolved across your whole dependency graph.

  3. Workarounds

    If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.

  4. How O3 protects you

    O3 pinpoints whether CVE-2023-45142 is reachable in your code and exactly where to fix it, then blocks exploitation in production at runtime until the patched version is deployed.

Tailored to CVE-2023-45142. Runtime protection reduces exposure until a permanent patch is applied and verified — it complements patching, it doesn't replace it.

Frequently Asked Questions

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 an
O3 Security · Impact-Aware SCA

Is CVE-2023-45142 in your dependencies?

O3 detects CVE-2023-45142 across Go dependencies and uses function-level reachability to confirm whether the vulnerable code path is actually reachable — not just present. No false positives.