Skip to content

← Public intelligence

Go package

go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp

Open actionable advisories and recorded vendor fixes. This public package view has no inventory attached and cannot establish whether your deployment is affected. A vendor fix never resolves your finding; verify your installed version and the source guidance.

Open advisories

2 actionable advisories, newest first. Withdrawn advisories and news are excluded. Coverage is partial.

  1. High, CVSS 7.5GoPublished

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

    CVE-2023-45142 · GHSA-rcjv-mgp8-qvmr

    Affected
    • Go go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp < 0.44.0
    Fixed in
    0.44.0· Vendor fix available
    Issue
    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.useragent - 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…

    Recommended action: Upgrade to 0.44.0 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:github.comSource checked Evidence →
  2. High, CVSS 7.5GoPublished

    otelhttp and otelbeego have DoS vulnerability for high cardinality metrics

    CVE-2023-25151 · GHSA-5r5m-65gx-7vrh

    Affected
    • Go go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp >= 0.38.0, < 0.39.0
    Fixed in
    0.39.0· Vendor fix available
    Issue
    Impact 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.requestcontentlength, http.server.responsecontentlength, 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. Pseudo-attack: Patches - go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp - v0.39.0 - go.opentelemetry.io/contrib/instrumentation/github.com/astaxie/beego/otelbeego - v0.39.0 [^1]:…

    Recommended action: Upgrade to 0.39.0 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:github.comSource checked Evidence →