Catégories
CVE-2023-45142

OpenTelemetry-Go Contrib vulnerable to denial of service in otelhttp due to unbound cardinality metrics

Résumé

OpenTelemetry-Go Contrib vulnerable to denial of service in otelhttp due to unbound cardinality metrics

Description d'origine

La description telle que publiée par la source (souvent en anglais).

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…

Source: OSV.dev (Open Source Vulnerabilities) NVD GitHub Advisory OSV

Paquets affectés

Go go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp
[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"0.44.0"}]}]
Go go.opentelemetry.io/contrib/instrumentation/github.com/emicklei/go-restful/otelrestful
[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"0.44.0"}]}]
Go go.opentelemetry.io/contrib/instrumentation/github.com/gin-gonic/gin/otelgin
[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"0.44.0"}]}]
Go go.opentelemetry.io/contrib/instrumentation/github.com/gorilla/mux/otelmux
[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"0.44.0"}]}]
Go go.opentelemetry.io/contrib/instrumentation/github.com/labstack/echo/otelecho
[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"0.44.0"}]}]
Go go.opentelemetry.io/contrib/instrumentation/gopkg.in/macaron.v1/otelmacaron
[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"0.44.0"}]}]
Go go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace
[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"0.44.0"}]}]

État des correctifs par distribution

Paquets corrigés publiés par chaque distribution pour cette CVE

Références

Nous utilisons des cookies pour l'analyse d'audience et la mesure publicitaire. Ce réglage s'applique à tous les sites de Game co., Ltd. En savoir plus