CVE-2023-25151 — otelhttp
HIGHCVE-2023-25151 is a high-severity (CVSS 7.5) Uncontrolled Resource Consumption vulnerability in go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp. 1 public exploit or proof-of-concept reference is indexed, so weaponization risk is real. A fix is available for go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp — see the affected versions and patch details below.
DoS vulnerability for high cardinality metrics in opentelemetry-go-contrib
Exploitation Status
Proof-of-concept exploit code exists
- CISA’s SSVC triage found public proof-of-concept exploit code for this CVE, though no confirmed active exploitation.
- CISA assesses this as automatable — exploitation doesn’t require manual, per-target effort, which raises the odds of mass scanning and opportunistic attacks.
Exploitation and automatability from CISA’s SSVC triage for CVE-2023-25151.
EPSS Exploitation Probability
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
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp🐹go.opentelemetry.io/contrib/instrumentation/github.com/astaxie/beego/otelbeegoReal-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 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.
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 🐹Go | go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp | ≥ 0.38.0&&< 0.39.0 | 0.39.0go get go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp@v0.39.0 |
| 🐹Go | go.opentelemetry.io/contrib/instrumentation/github.com/astaxie/beego/otelbeego | ≥ 0.38.0&&< 0.39.0 | 0.39.0go get go.opentelemetry.io/contrib/instrumentation/github.com/astaxie/beego/otelbeego@v0.39.0 |
Affected Products
opentelemetry-go contriblinuxfoundationResearch use only. For defensive security, authorized penetration testing, and academic research only. Never execute exploit code against systems without explicit written authorization.
Detection & mitigation playbook
Open-source dependencyDetect
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.
Fix
Update go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp to 0.39.0 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2023-25151 is resolved across your whole dependency graph.
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.
Frequently Asked Questions
Is CVE-2023-25151 in your dependencies?
Find it across Go, including transitive dependencies.