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

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** HIGH 7.5
- **CVSS:** 7.5 (v3.1, CNA) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H`
- **CVSS metrics:** Attack vector: Network; Attack complexity: Low; Privileges required: None; User interaction: None; Scope: Unchanged; Confidentiality impact: None; Integrity impact: None; Availability impact: High
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Remote, no login needed
- **EPSS:** 1.73% (percentile 78, 2026-11-26)
- **CWE:** CWE-770
- **Aliases:** GHSA-rcjv-mgp8-qvmr, GO-2023-2113
- **Published:** 2023-10-12T16:33:21.435Z
- **Modified:** 2026-09-10T03:49:24.662Z

## Who should check

- Projects that depend on Go package go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp (\< 0.44.0)
- Projects that depend on Go package go.opentelemetry.io/contrib/instrumentation/github.com/emicklei/go-restful/otelrestful (\< 0.44.0)
- Projects that depend on Go package go.opentelemetry.io/contrib/instrumentation/github.com/gin-gonic/gin/otelgin (\< 0.44.0)
- Projects that depend on Go package go.opentelemetry.io/contrib/instrumentation/github.com/gorilla/mux/otelmux (\< 0.44.0)
- Projects that depend on Go package go.opentelemetry.io/contrib/instrumentation/github.com/labstack/echo/otelecho (\< 0.44.0)
- Projects that depend on Go package go.opentelemetry.io/contrib/instrumentation/gopkg.in/macaron.v1/otelmacaron (\< 0.44.0)
- Projects that depend on Go package go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace (\< 0.44.0)
- Anyone running open-telemetry opentelemetry-go-contrib \< 0.44.0

## 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 and fixed versions

- Go `go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp`: affected \< 0.44.0; fixed 0.44.0 (osv)
- Go `go.opentelemetry.io/contrib/instrumentation/github.com/emicklei/go-restful/otelrestful`: affected \< 0.44.0; fixed 0.44.0 (osv)
- Go `go.opentelemetry.io/contrib/instrumentation/github.com/gin-gonic/gin/otelgin`: affected \< 0.44.0; fixed 0.44.0 (osv)
- Go `go.opentelemetry.io/contrib/instrumentation/github.com/gorilla/mux/otelmux`: affected \< 0.44.0; fixed 0.44.0 (osv)
- Go `go.opentelemetry.io/contrib/instrumentation/github.com/labstack/echo/otelecho`: affected \< 0.44.0; fixed 0.44.0 (osv)
- Go `go.opentelemetry.io/contrib/instrumentation/gopkg.in/macaron.v1/otelmacaron`: affected \< 0.44.0; fixed 0.44.0 (osv)
- Go `go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace`: affected \< 0.44.0; fixed 0.44.0 (osv)
- open-telemetry opentelemetry-go-contrib: \< 0.44.0 (cvelist)

## Mitigation

- Upgrade go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp to 0.44.0 or later.
- Upgrade go.opentelemetry.io/contrib/instrumentation/github.com/emicklei/go-restful/otelrestful to 0.44.0 or later.
- Upgrade go.opentelemetry.io/contrib/instrumentation/github.com/gin-gonic/gin/otelgin to 0.44.0 or later.
- Upgrade go.opentelemetry.io/contrib/instrumentation/github.com/gorilla/mux/otelmux to 0.44.0 or later.
- Upgrade go.opentelemetry.io/contrib/instrumentation/github.com/labstack/echo/otelecho to 0.44.0 or later.
- Upgrade go.opentelemetry.io/contrib/instrumentation/gopkg.in/macaron.v1/otelmacaron to 0.44.0 or later.
- Upgrade go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace to 0.44.0 or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2023-45142. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2023-45142.md
Affected: 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/github.com/gin-gonic/gin/otelgin < 0.44.0; go.opentelemetry.io/contrib/instrumentation…
Fixed in: 0.44.0

Steps:
1. Search this machine and project for go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp (Go), go.opentelemetry.io/contrib/instrumentation/github.com/emicklei/go-restful/otelrestful (Go), go.opentelemetry.io/contrib/instrumentation/github.com/gin-gonic/gin/otelgin (Go), go.opentelemetry.io/contrib/instrumentation/github.com/…: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2023-45142 being exploited?

There is no confirmed exploitation: CVE-2023-45142 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 1.73% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2023-45142?

High: CVSS 7.5 (v3.1, scored by CNA). Remote, no login needed.

### Which versions are affected by CVE-2023-45142?

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/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/gopkg.in/macaron.v1/otelmacaron \< 0.44.0; go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace \< 0.44.0.

### Is there a fix for CVE-2023-45142?

Yes. Fixed in 0.44.0. Upgrade go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp to 0.44.0 or later. Upgrade go.opentelemetry.io/contrib/instrumentation/github.com/emicklei/go-restful/otelrestful to 0.44.0 or later. Upgrade go.opentelemetry.io/contrib/instrumentation/github.com/gin-gonic/gin/otelgin to 0.44.0 or later. Upgrade go.opentelemetry.io/contrib/instrumentation/github.com/gorilla/mux/otelmux to 0.44.0 or later. Upgrade go.opentelemetry.io/contrib/instrumentation/github.com/labstack/echo/otelecho to 0.44.0 or later. Upgrade go.opentelemetry.io/contrib/instrumentation/gopkg.in/macaron.v1/otelmacaron to 0.44.0 or later. Upgrade go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace to 0.44.0 or later.

### How do I check if I'm affected by CVE-2023-45142?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- vendor: <https://github.com/open-telemetry/opentelemetry-go-contrib/security/advisories/GHSA-rcjv-mgp8-qvmr>
- vendor: <https://github.com/open-telemetry/opentelemetry-go-contrib/security/advisories/GHSA-5r5m-65gx-7vrh>
- vendor: <https://github.com/advisories/GHSA-cg3q-j54f-5p7p>
- vendor: <https://nvd.nist.gov/vuln/detail/CVE-2023-45142>
- patch: <https://github.com/open-telemetry/opentelemetry-go-contrib/pull/4277>
- other: <https://github.com/open-telemetry/opentelemetry-go-contrib/blob/5f7e6ad5a49b45df45f61a1deb29d7f1158032df/instrumentation/net/http/otelhttp/handler.go#L63-L65>
- other: <https://github.com/open-telemetry/opentelemetry-go-contrib/releases/tag/v1.19.0>
- other: <https://github.com/open-telemetry/opentelemetry-go/blob/38e1b499c3da3107694ad2660b3888eee9c8b896/semconv/internal/v2/http.go#L223>
- other: <https://github.com/open-telemetry/opentelemetry-go/blob/v1.12.0/semconv/internal/v2/http.go#L159>
- other: <https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/2UTRJ54INZG3OC2FTAN6AFB2RYNY2GAD/>
- other: <https://github.com/open-telemetry/opentelemetry-go-contrib>
- other: <https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/2UTRJ54INZG3OC2FTAN6AFB2RYNY2GAD>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2023-45142>
- OSV: CC-BY 4.0 <https://osv.dev/vulnerability/GHSA-rcjv-mgp8-qvmr> (license: <https://creativecommons.org/licenses/by/4.0/>)
- OSV: CC-BY 4.0 <https://osv.dev/vulnerability/GO-2023-2113> (license: <https://creativecommons.org/licenses/by/4.0/>)

HTML: <https://flawdb.com/CVE-2023-45142> · JSON: <https://flawdb.com/api/v1/entries/CVE-2023-45142>
