NIST deprecates RSA-2048 from 2030. Find every one of them before attackers do.
🐹
🐹 Go
Not in CISA KEV
HIGH severity

CVE-2023-45142 — otelhttp

HIGHFix: open-telemetry/opentelemetry-go-contrib#4277

CVE-2023-45142 is a high-severity (CVSS 7.5) CWE-770 vulnerability in go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp. A fix is available for go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp — see the affected versions and patch details below.

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

Also known asGHSA-rcjv-mgp8-qvmrGO-2023-2113
Published
Updated
Affected
7 pkgs
Patched
7 / 7
Exploits
None indexed
Exploitation data as of Nov 10, 2026 · OSV.dev, NVD, FIRST.org (EPSS)

EPSS Exploitation Probability

via FIRST.org ↗
1.6%probability of exploitation in next 30 days
Lower Risk0.00%
Lower risk than most CVEs76th percentile — riskier than 76% of all scored CVEsHighest risk
0.66%1.14%1.63%2.11%1.2%1.6%May 26Sep 26Nov 26

Probability of exploitation in the next 30 days, from FIRST.org EPSS.

How urgent is this, really

Where this sits among everything scored

Real-World Exposure

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

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.user_agent
  • 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 similar to already reported vulnerabilities

Workaround for affected versions

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.

The other possibility is to disable HTTP metrics instrumentation by passing otelhttp.WithMeterProvider option with noop.NewMeterProvider.

Solution provided by upgrading

In PR https://github.com/open-telemetry/opentelemetry-go-contrib/pull/4277, released with package version 0.44.0, 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.

References

Affected Packages

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

Affected Products

1 product · 1 configurations
Application
opentelemetryopentelemetry
< 0.44.0
range

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, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.

  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

    Cap what an attacker can consume: apply request size, rate and timeout limits in front of the affected component, and run it with memory and CPU limits so exhaustion degrades one worker rather than the whole service.

Fixing This On Your OS

If you run this on a Linux distribution, patch through your package manager against the distro's own security advisory below — it tracks the exact backported fix for your release, which can ship on a different timeline (and sometimes a different severity) than the upstream project.

Red HatModerate

While no authentication is required, there are a significant number of non-default factors which prevent widespread exploitation of this flaw. For a service to be affected, all of the following must be true: * The go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp package must be in use * Configured a…

Workaround published by Red Hat
As a workaround to stop being affected otelhttp.WithFilter() can be used. 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. The other possibility is to disable HTTP metrics instrumentation by passing otelhttp.WithMeterProvider option with noop.NewMeterProvider.
Source: Red Hat security advisory for CVE-2023-45142 (CC BY 4.0)
ProductFixed inAdvisory
Migration Toolkit for Virtualization 2.5migration-toolkit-virtualization/mtv-validation-rhel9:2.5.3-12RHBA-2023:7648
OADP-1.3-RHEL-9oadp/oadp-mustgather-rhel9:1.3.0-138RHSA-2023:7555
OADP-1.3-RHEL-9oadp/oadp-rhel9-operator:1.3.1-40RHSA-2024:1859
Red Hat Advanced Cluster Management for Kubernetes 2.10 for RHEL 9rhacm2/acm-cluster-permission-rhel9:v2.10.5-5RHSA-2024:6236
Red Hat Advanced Cluster Management for Kubernetes 2.9 for RHEL 8rhacm2/acm-governance-policy-addon-controller-rhel8:v2.9.3-9RHSA-2024:1328
Red Hat Ceph Storage 5.3ceph-2:16.2.10-266.el8cpRHSA-2024:4118
Red Hat OpenShift Container Platform 4.12openshift4/ose-thanos-rhel8:v4.12.0-202402081808.p0.g2867a6b.assembly.stream.el8RHSA-2024:0833
Red Hat OpenShift Container Platform 4.13openshift4/ose-thanos-rhel8:v4.13.0-202401292134.p0.g70fb57f.assembly.streamRHSA-2024:0660

Frequently Asked Questions

### 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.user_agent` - `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](https://github.com/open-telemetry/opente
O3 Security · Impact-Aware SCA

Is CVE-2023-45142 in your dependencies?

Find it across Go, including transitive dependencies.

CVE-2023-45142: otelhttp — Fixed in 0.44.0