CVE-2023-47108 DoS vulnerability in otelgrpc (uncontrolled resource consumption) due to unbound cardinality metrics

High 7.5 Published Updated

An attacker can cause memory exhaustion and denial of service in applications using the OpenTelemetry Go gRPC interceptor by flooding requests with unique peer addresses.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2023-47108?

CVE-2023-47108 is a high-severity denial of service vulnerability in open-telemetry opentelemetry-go-contrib, published on 10 Nov 2023. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

OpenTelemetry-Go Contrib is a collection of third-party packages for OpenTelemetry-Go. Starting in version 0.37.0 and prior to version 0.46.0, the grpc Unary Server Interceptor out of the box adds labels `net.peer.sock.addr` and `net.peer.sock.port` that have unbound cardinality. It leads to the server's potential memory exhaustion when many malicious requests are sent. An attacker can easily flood the peer address and port for requests. Version 0.46.0 contains a fix for this issue. 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` option with `noop.NewMeterProvider`.

Weakness: CWE-770

Which versions are affected by CVE-2023-47108?

3 open source packages ship an affected version, including go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc. It affects 1 product.

PackageAffectedFixed in
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc GoFrom 0.37.00.46.0
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc GoFrom 0.37.00.46.0
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc GoFrom 0.37.00.46.0
Linux distribution packages (12)
cri-o Red Hat:openshift:4.12::el8All versions0:1.25.5-6.rhaos4.12.gitfcf6ef3.el8
cri-o-debuginfo Red Hat:openshift:4.12::el8All versions0:1.25.5-6.rhaos4.12.gitfcf6ef3.el8
cri-o-debugsource Red Hat:openshift:4.12::el8All versions0:1.25.5-6.rhaos4.12.gitfcf6ef3.el8
cri-o Red Hat:openshift:4.13::el8All versions0:1.26.4-9.1.rhaos4.13.gite26e057.el8
cri-o-debuginfo Red Hat:openshift:4.13::el8All versions0:1.26.4-9.1.rhaos4.13.gite26e057.el8
cri-o-debugsource Red Hat:openshift:4.13::el8All versions0:1.26.4-9.1.rhaos4.13.gite26e057.el8
cri-o Red Hat:openshift:4.13::el9All versions0:1.26.4-9.1.rhaos4.13.gite26e057.el9
cri-o-debuginfo Red Hat:openshift:4.13::el9All versions0:1.26.4-9.1.rhaos4.13.gite26e057.el9
cri-o-debugsource Red Hat:openshift:4.13::el9All versions0:1.26.4-9.1.rhaos4.13.gite26e057.el9
docker-compose SUSE:Linux Micro 6.0All versions2.33.1-1.1
etcd openSUSE:TumbleweedAll versions3.5.11-1.1
okteto openSUSE:TumbleweedAll versions2.28.0-1.1

Products include Opentelemetry Opentelemetry.

How do I fix CVE-2023-47108?

Upgrade go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc to 0.46.0 or later.

Upgrade, then put limits on request size, rate and nesting depth so one client cannot exhaust the service. More about Denial of service.

Is CVE-2023-47108 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2023-47108 exists.

Public exploit code: 1 proofs of concept on GitHub.

Sources

Also known as AZL-31896, AZL-34620, AZL-34891, AZL-34995, AZL-35434, AZL-35440 and 14 more.

Is CVE-2023-47108 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free