Vulnerabilities in pkg:golang/go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc

PACKAGE
Advisory Identifier: GHSA-8pgv-569h-w5rw
Advisory Summary

CVE-2023-47108 is a HIGH (CVSS 7.5) denial of service vulnerability (CWE-770: Allocation of Resources Without Limits or Throttling) affecting Go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc libraries in the Go ecosystem. The issue involves otelgrpc dos vulnerability due to unbound cardinality metrics. Remediation is available by upgrading affected packages to version 0.46.0.

1 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:golang/go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc

1 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:golang/go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-8pgv-569h-w5rw CVE-2023-47108 HIGH otelgrpc DoS vulnerability due to unbound cardinality metrics

CVE-2023-47108 at a Glance

CVE Identifier CVE-2023-47108
GHSA Identifier GHSA-8pgv-569h-w5rw
Severity HIGH
CVSS v3.1 Base Score 7.5
CWE Classification CWE-770: Allocation of Resources Without Limits or Throttling
Affected Product Go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc
Package Ecosystem Go
Published Date
Last Updated

Security Impact

CVSS: 7.5

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality None (C:N)
Integrity None (I:N)
Availability High (A:H)

How to Fix CVE-2023-47108

To remediate this vulnerability, upgrade all affected Go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc fixed: 0.46.0
Upgrade go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc to 0.46.0
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc

How to Check if You Are Affected

To determine whether your application is affected by CVE-2023-47108, inspect your project dependencies for Go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc:

inspect dependencies for go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc

Analyze the terminal output to locate any version of Go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.46.0), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-770: Allocation of Resources Without Limits or Throttling, where the product allocates a reusable resource or group of resources on behalf of an actor without imposing any intended restrictions on the size or number of resources that can be allocated. In Go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### Summary The grpc Unary Server Interceptor [opentelemetry-go-contrib/instrumentation/google.golang.org/grpc/otelgrpc/interceptor.go](https://github.com/open-telemetry/opentelemetry-go-contrib/blob/9d4eb7e7706038b07d33f83f76afbe13f53d171d/instrumentation/google.golang.org/grpc/otelgrpc/interceptor.go#L327) ``` // UnaryServerInterceptor returns a grpc.UnaryServerInterceptor suitable // for use in a grpc.NewServer call. func UnaryServerInterceptor(opts ...Option) grpc.UnaryServerInterceptor { ``` out of the box adds labels - `net.peer.sock.addr` - `net.peer.sock.port` that have unbound cardinality. It leads to the server's potential memory exhaustion when many malicious requests are sent. ### Details An attacker can easily flood the peer address and port for requests. ### PoC Apply the attached patch to the example and run the client multiple times. Observe how each request will create a unique histogram and how the memory consumption increases during it. ### Impact In order to be affected, the program has to configure a metrics pipeline, use [UnaryServerInterceptor](https://github.com/open-telemetry/opentelemetry-go-contrib/blob/9d4eb7e7706038b07d33f83f76afbe13f53d171d/instrumentation/google.golang.org/grpc/otelgrpc/interceptor.go#L327), and does not filter any client IP address and ports via middleware or proxies, etc. ### Others It is similar to already reported vulnerabilities. * [GHSA-rcjv-mgp8-qvmr](https://github.com/open-telemetry/opentelemetry-go-contrib/security/advisories/GHSA-rcjv-mgp8-qvmr) ([open-telemetry/opentelemetry-go-contrib](https://github.com/open-telemetry/opentelemetry-go-contrib)) - [GHSA-5r5m-65gx-7vrh](https://github.com/open-telemetry/opentelemetry-go-contrib/security/advisories/GHSA-5r5m-65gx-7vrh "GHSA-5r5m-65gx-7vrh") ([open-telemetry/opentelemetry-go-contrib](https://github.com/open-telemetry/opentelemetry-go-contrib)) - [GHSA-cg3q-j54f-5p7p](https://github.com/advisories/GHSA-cg3q-j54f-5p7p "GHSA-cg3q-j54f-5p7p") ([prometheus/client_golang](https://github.com/prometheus/client_golang)) ### Workaround for affected versions As a workaround to stop being affected, a view removing the attributes can be used. The other possibility is to disable grpc metrics instrumentation by passing [`otelgrpc.WithMeterProvider`](https://github.com/open-telemetry/opentelemetry-go-contrib/blob/instrumentation/google.golang.org/grpc/otelgrpc/v0.45.0/instrumentation/google.golang.org/grpc/otelgrpc/config.go#L138) option with [`noop.NewMeterProvider`](https://pkg.go.dev/go.opentelemetry.io/otel/metric/noop#NewMeterProvider). ### Solution provided by upgrading In PR [#4322](https://github.com/open-telemetry/opentelemetry-go-contrib/pull/4322), to be released with v0.46.0, the attributes were removed. ### References - [#4322](https://github.com/open-telemetry/opentelemetry-go-contrib/pull/4322)

CVE-2023-47108 Affected Go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc Versions

1 component(s)
Fixed Versions:
0.46.0
Product / Package Ecosystem Affected Versions Fixed Version
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc
Go
≥ 0.37.0
< 0.46.0
0.46.0

References

Frequently Asked Questions

What is CVE-2023-47108?
CVE-2023-47108 is a security vulnerability in Go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc involving otelgrpc DoS vulnerability due to unbound cardinality metrics under CWE-770: Allocation of Resources Without Limits or Throttling.
Which Go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc versions are affected?
Affected versions include releases prior to 0.46.0 across affected packages: go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc.
What version fixes CVE-2023-47108?
Upgrading to 0.46.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc affected?
Yes, go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc is affected in releases prior to 0.46.0. Upgrade your dependency to 0.46.0 or later.
What is the CVSS score of CVE-2023-47108?
CVE-2023-47108 has a CVSS v3.1 base score of 7.5 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H.
What CWE is associated with CVE-2023-47108?
CVE-2023-47108 is classified under CWE-770: Allocation of Resources Without Limits or Throttling (The product allocates a reusable resource or group of resources on behalf of an actor without imposing any intended restrictions on the size or number of resources that can be allocated.).
How can I check Go dependencies for CVE-2023-47108?
Run the dependency tree command: 'inspect dependencies for go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-8pgv-569h-w5rw",
  "modified" : "2025-10-28T18:22:23Z",
  "published" : "2023-11-12T15:55:39Z",
  "aliases" : [ "CVE-2023-47108" ],
  "summary" : "otelgrpc DoS vulnerability due to unbound cardinality metrics ",
  "details" : "### Summary\n\nThe grpc Unary Server Interceptor [opentelemetry-go-contrib/instrumentation/google.golang.org/grpc/otelgrpc/interceptor.go](https://github.com/open-telemetry/opentelemetry-go-contrib/blob/9d4eb7e7706038b07d33f83f76afbe13f53d171d/instrumentation/google.golang.org/grpc/otelgrpc/interceptor.go#L327)\n\n```\n// UnaryServerInterceptor returns a grpc.UnaryServerInterceptor suitable\n// for use in a grpc.NewServer call.\nfunc UnaryServerInterceptor(opts ...Option) grpc.UnaryServerInterceptor {\n```\n  \nout of the box adds labels\n\n- `net.peer.sock.addr`\n- `net.peer.sock.port`\n\nthat have unbound cardinality. It leads to the server's potential memory exhaustion when many malicious requests are sent.\n\n### Details\n\nAn attacker can easily flood the peer address and port for requests.  \n\n### PoC\n\nApply the attached patch to the example and run the client multiple times.  Observe how each request will create a unique histogram and how the memory consumption increases during it.\n### Impact\n\nIn order to be affected, the program has to configure a metrics pipeline, use  [UnaryServerInterceptor](https://github.com/open-telemetry/opentelemetry-go-contrib/blob/9d4eb7e7706038b07d33f83f76afbe13f53d171d/instrumentation/google.golang.org/grpc/otelgrpc/interceptor.go#L327), and does not filter any client IP address and ports via middleware or proxies, etc.\n\n### Others\n\nIt is similar to already reported vulnerabilities.\n\n* [GHSA-rcjv-mgp8-qvmr](https://github.com/open-telemetry/opentelemetry-go-contrib/security/advisories/GHSA-rcjv-mgp8-qvmr) ([open-telemetry/opentelemetry-go-contrib](https://github.com/open-telemetry/opentelemetry-go-contrib))\n- [GHSA-5r5m-65gx-7vrh](https://github.com/open-telemetry/opentelemetry-go-contrib/security/advisories/GHSA-5r5m-65gx-7vrh \"GHSA-5r5m-65gx-7vrh\") ([open-telemetry/opentelemetry-go-contrib](https://github.com/open-telemetry/opentelemetry-go-contrib))\n- [GHSA-cg3q-j54f-5p7p](https://github.com/advisories/GHSA-cg3q-j54f-5p7p \"GHSA-cg3q-j54f-5p7p\") ([prometheus/client_golang](https://github.com/prometheus/client_golang))\n\n### Workaround for affected versions\n\nAs a workaround to stop being affected, a view removing the attributes can be used.\n\nThe other possibility is to disable grpc metrics instrumentation by passing [`otelgrpc.WithMeterProvider`](https://github.com/open-telemetry/opentelemetry-go-contrib/blob/instrumentation/google.golang.org/grpc/otelgrpc/v0.45.0/instrumentation/google.golang.org/grpc/otelgrpc/config.go#L138) option with [`noop.NewMeterProvider`](https://pkg.go.dev/go.opentelemetry.io/otel/metric/noop#NewMeterProvider).\n\n### Solution provided by upgrading\n\nIn PR [#4322](https://github.com/open-telemetry/opentelemetry-go-contrib/pull/4322), to be released with v0.46.0, the attributes were removed.\n\n### References\n\n- [#4322](https://github.com/open-telemetry/opentelemetry-go-contrib/pull/4322)",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0.37.0"
      }, {
        "fixed" : "0.46.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/open-telemetry/opentelemetry-go-contrib/security/advisories/GHSA-8pgv-569h-w5rw"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2023-47108"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/open-telemetry/opentelemetry-go-contrib/pull/4322"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/open-telemetry/opentelemetry-go-contrib/commit/04c5dcbb5b35f14b4e6793b245919c72addbc7d0"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/open-telemetry/opentelemetry-go-contrib/commit/b44dfc9092b157625a5815cb437583cee663333b"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/open-telemetry/opentelemetry-go-contrib"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/open-telemetry/opentelemetry-go-contrib/blob/9d4eb7e7706038b07d33f83f76afbe13f53d171d/instrumentation/google.golang.org/grpc/otelgrpc/interceptor.go#L327"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/open-telemetry/opentelemetry-go-contrib/blob/instrumentation/google.golang.org/grpc/otelgrpc/v0.45.0/instrumentation/google.golang.org/grpc/otelgrpc/config.go#L138"
  }, {
    "type" : "WEB",
    "url" : "https://pkg.go.dev/go.opentelemetry.io/otel/metric/noop#NewMeterProvider"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-770" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2023-11-12T15:55:39Z",
    "nvd_published_at" : "2023-11-10T19:15:16Z"
  }
}