Allocation of Resources Without Limits or Throttling Affecting go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp package, versions <0.44.0


Severity

Recommended
0.0
high
0
10

CVSS assessment made by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
0.75% (82nd percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications

Snyk Learn

Learn about Allocation of Resources Without Limits or Throttling vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-GOLANG-GOOPENTELEMETRYIOCONTRIBINSTRUMENTATIONNETHTTPOTELHTTP-5963583
  • published13 Oct 2023
  • disclosed12 Oct 2023
  • creditJakub Warczarek

Introduced: 12 Oct 2023

CVE-2022-21698  (opens in a new tab)
CWE-770  (opens in a new tab)

How to fix?

Upgrade go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp to version 0.44.0 or higher.

Overview

Affected versions of this package are vulnerable to Allocation of Resources Without Limits or Throttling when the otelhttp.NewHandler wrapper is used and no filtering is applied to unknown HTTP methods or User agents at the CDN, LB, or previous middleware levels. An attacker can cause the server's potential memory exhaustion by sending numerous malicious requests with random and long HTTP User-Agent or HTTP method values.

Note:

This is only exploitable if the program does not filter any unknown HTTP methods or User agents on the level of CDN, LB, previous middleware, etc.

Mitigation:

This vulnerability can be mitigated by using otelhttp.WithFilter(), which requires manual 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.

CVSS Scores

version 3.1