Skip to content
Heist/ feed
Back to feed
High

golang-opentelemetry-contrib — security advisory

Type: advisorySources: OSVAdvisory ID: UBUNTU-CVE-2023-45142

OpenTelemetry-Go Contrib is a collection of third-party packages for OpenTelemetry-Go. A handler wrapper out of the box adds labels `http.user_agent` and `http.method` that have unbound cardinality. It leads to the server's potential memory exhaustion when many malicious requests are sent to it. 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`. In order to be affected, a program has to use the `otelhttp.NewHandler` wrapper and not filter any unknown HTTP methods or User agents on the level of CDN, LB, previous middleware, etc. Version 0.44.0 fixed this issue when the values collected for attribute `http.request.method` were changed to be restricted to a set of well-known values and other high cardinality attributes were removed. As a workaround to stop being affected, `otelhttp.WithFilter()` can be used, but it requires manual careful configuration to not log certain requests entirely. For convenience and safe usage of this library, it should by default mark with the label `unknown` non-standard HTTP methods and User agents to show that such requests were made but do not increase cardinality. In case someone wants to stay with the current behavior, library API should allow to enable it.

Products
golang-opentelemetry-contrib
Affected versions
0.56.0-5, 1.43.0-1
Fixed versions
Not specified
CVEs
CVE-2023-45142
Confirmed fixed CVEs
Not specified
Updated in this feed
31 Oct 2026, 01:05 UTC · Revision 1

Source evidence

UBUNTU-CVE-2023-45142

core-osv · Original source

Published 12 Oct 2023, 17:15 UTC

OpenTelemetry-Go Contrib is a collection of third-party packages for OpenTelemetry-Go. A handler wrapper out of the box adds labels `http.user_agent` and `http.method` that have unbound cardinality. It leads to the server's potential memory exhaustion when many malicious requests are sent to it. 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`. In order to be affected, a program has to use the `otelhttp.NewHandler` wrapper and not filter any unknown HTTP methods or User agents on the level of CDN, LB, previous middleware, etc. Version 0.44.0 fixed this issue when the values collected for attribute `http.request.method` were changed to be restricted to a set of well-known values and other high cardinality attributes were removed. As a workaround to stop being affected, `otelhttp.WithFilter()` can be used, but it requires manual careful configuration to not log certain requests entirely. For convenience and safe usage of this library, it should by default mark with the label `unknown` non-standard HTTP methods and User agents to show that such requests were made but do not increase cardinality. In case someone wants to stay with the current behavior, library API should allow to enable it.

osv:UBUNTU-CVE-2023-45142

golang-opentelemetry-contrib

Fixed versions: Not specified

golang-opentelemetry-contrib

Fixed versions: Not specified

golang-opentelemetry-contrib

Fixed versions: Not specified

Complete source record
{
  "id": "53c9196850a1506d7faf86278107b5349727965beacf0f3057dd9ed2959b1033",
  "url": "https://osv.dev/vulnerability/UBUNTU-CVE-2023-45142",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "UBUNTU-CVE-2023-45142",
    "summary": "OpenTelemetry-Go Contrib is a collection of third-party packages for OpenTelemetry-Go. A handler wrapper out of the box adds labels `http.user_agent` and `http.method` that have unbound cardinality. It leads to the server's potential memory exhaustion when many malicious requests are sent to it. 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`. In order to be affected, a program has to use the `otelhttp.NewHandler` wrapper and not filter any unknown HTTP methods or User agents on the level of CDN, LB, previous middleware, etc. Version 0.44.0 fixed this issue when the values collected for attribute `http.request.method` were changed to be restricted to a set of well-known values and other high cardinality attributes were removed. As a workaround to stop being affected, `otelhttp.WithFilter()` can be used, but it requires manual careful configuration to not log certain requests entirely. For convenience and safe usage of this library, it should by default mark with the label `unknown` non-standard HTTP methods and User agents to show that such requests were made but do not increase cardinality. In case someone wants to stay with the current behavior, library API should allow to enable it.",
    "evidence": "osv:UBUNTU-CVE-2023-45142",
    "products": [
      {
        "name": {
          "value": "golang-opentelemetry-contrib",
          "evidence": "/affected/0/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [],
        "affected_versions": [
          {
            "value": "0.56.0-5",
            "evidence": "/affected/0/versions"
          }
        ]
      },
      {
        "name": {
          "value": "golang-opentelemetry-contrib",
          "evidence": "/affected/1/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [],
        "affected_versions": [
          {
            "value": "0.56.0-5",
            "evidence": "/affected/1/versions"
          },
          {
            "value": "1.43.0-1",
            "evidence": "/affected/1/versions"
          }
        ]
      },
      {
        "name": {
          "value": "golang-opentelemetry-contrib",
          "evidence": "/affected/2/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [],
        "affected_versions": [
          {
            "value": "0.56.0-5",
            "evidence": "/affected/2/versions"
          }
        ]
      }
    ],
    "severity": "high",
    "structured": {
      "id": "UBUNTU-CVE-2023-45142",
      "aliases": [
        "UBUNTU-CVE-2023-45142"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"
        },
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"
        },
        {
          "type": "Ubuntu",
          "score": "medium"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                }
              ]
            }
          ],
          "package": {
            "name": "golang-opentelemetry-contrib",
            "purl": "pkg:deb/ubuntu/golang-opentelemetry-contrib?arch=source&distro=questing",
            "ecosystem": "Ubuntu:25.10"
          },
          "versions": [
            "0.56.0-5"
          ],
          "database_specific": {
            "source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2023/UBUNTU-CVE-2023-45142.json"
          },
          "ecosystem_specific": {
            "binaries": [
              {
                "binary_name": "golang-opentelemetry-contrib-dev",
                "binary_version": "0.56.0-5"
              }
            ]
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                }
              ]
            }
          ],
          "package": {
            "name": "golang-opentelemetry-contrib",
            "purl": "pkg:deb/ubuntu/golang-opentelemetry-contrib?arch=source&distro=stonking",
            "ecosystem": "Ubuntu:26.10"
          },
          "versions": [
            "0.56.0-5",
            "1.43.0-1"
          ],
          "database_specific": {
            "source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2023/UBUNTU-CVE-2023-45142.json"
          },
          "ecosystem_specific": {
            "binaries": [
              {
                "binary_name": "golang-opentelemetry-contrib-dev",
                "binary_version": "1.43.0-1"
              }
            ]
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                }
              ]
            }
          ],
          "package": {
            "name": "golang-opentelemetry-contrib",
            "purl": "pkg:deb/ubuntu/golang-opentelemetry-contrib?arch=source&distro=resolute",
            "ecosystem": "Ubuntu:26.04:LTS"
          },
          "versions": [
            "0.56.0-5"
          ],
          "database_specific": {
            "source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2023/UBUNTU-CVE-2023-45142.json"
          },
          "ecosystem_specific": {
            "binaries": [
              {
                "binary_name": "golang-opentelemetry-contrib-dev",
                "binary_version": "0.56.0-5"
              }
            ]
          }
        }
      ],
      "modified": "2026-10-17T12:56:25.903634759Z",
      "provider": "osv",
      "upstream": [
        "CVE-2023-45142"
      ],
      "references": [
        "https://ubuntu.com/security/CVE-2023-45142",
        "https://www.cve.org/CVERecord?id=CVE-2023-45142"
      ]
    },
    "related_cves": [
      {
        "value": "CVE-2023-45142",
        "evidence": "/upstream"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 355649,
  "published_at": "2023-10-12T17:15:00+00:00"
}