GHSA-5RV5-6H4R-H22V
Vulnerability from github – Published: 2023-10-02 23:29 – Updated: 2023-10-03 18:15Summary
Autoinstrumentation out of the box adds the label http_method that has unbound cardinality. It leads to the server's potential memory exhaustion when many malicious requests are sent.
Details
HTTP method for requests can be easily set by an attacker to be random and long.
PoC
Send many requests with long randomly generated HTTP methods and observe how memory consumption increases during it. The app can be like this example from the official docs.
Impact
In order to be affected program has to be instrumented for HTTP handlers and does not filter any unknown HTTP methods on the level of CDN, LB, previous middleware, etc.
Proposed solution
For convenience and safe usage of this library, it should by default mark with the label UNKNOWN non-standard HTTP methods to show that such requests were made (and this way does not increase cardinality). In case someone wants to stay with the current behavior, library API should allow it. The mechanism with environment variables can be reused - introduce the variable OTEL_INSTRUMENTATION_HTTP_CAPTURE_ALL_METHODS that will allow enabling current behavior when someone really wants it.
{
"affected": [
{
"package": {
"ecosystem": "PyPI",
"name": "opentelemetry-instrumentation"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "0.41b0"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2023-43810"
],
"database_specific": {
"cwe_ids": [
"CWE-400"
],
"github_reviewed": true,
"github_reviewed_at": "2023-10-02T23:29:42Z",
"nvd_published_at": "2023-10-06T14:15:12Z",
"severity": "HIGH"
},
"details": "### Summary\nAutoinstrumentation out of the box adds the label `http_method` that has unbound cardinality. It leads to the server\u0027s potential memory exhaustion when many malicious requests are sent.\n\n### Details\nHTTP method for requests can be easily set by an attacker to be random and long.\n\n### PoC\nSend many requests with long randomly generated HTTP methods and observe how memory consumption increases during it. The app can be like [this example from the official docs](https://opentelemetry-python-contrib.readthedocs.io/en/latest/instrumentation/flask/flask.html#id1).\n\n### Impact\nIn order to be affected program has to be instrumented for HTTP handlers and does not filter any unknown HTTP methods on the level of CDN, LB, previous middleware, etc.\n\n### Proposed solution\nFor convenience and safe usage of this library, it should by default mark with the label `UNKNOWN` non-standard HTTP methods to show that such requests were made (and this way does not increase cardinality). In case someone wants to stay with the current behavior, library API should allow it. The mechanism with environment variables can be reused - introduce the variable `OTEL_INSTRUMENTATION_HTTP_CAPTURE_ALL_METHODS` that will allow enabling current behavior when someone really wants it. \n\n\n",
"id": "GHSA-5rv5-6h4r-h22v",
"modified": "2023-10-03T18:15:32Z",
"published": "2023-10-02T23:29:42Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/open-telemetry/opentelemetry-python-contrib/security/advisories/GHSA-5rv5-6h4r-h22v"
},
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2023-43810"
},
{
"type": "WEB",
"url": "https://github.com/open-telemetry/opentelemetry-python-contrib/commit/6007e0c013071e7f8b9612d3bc68aeb9d600d74e"
},
{
"type": "PACKAGE",
"url": "https://github.com/open-telemetry/opentelemetry-python-contrib"
},
{
"type": "WEB",
"url": "https://github.com/open-telemetry/opentelemetry-python-contrib/releases/tag/v0.41b0"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H",
"type": "CVSS_V3"
}
],
"summary": "opentelemetry-instrumentation Denial of Service vulnerability due to unbound cardinality metrics"
}
Sightings
| Author | Source | Type | Date |
|---|
Nomenclature
- Seen: The vulnerability was mentioned, discussed, or observed by the user.
- Confirmed: The vulnerability has been validated from an analyst's perspective.
- Published Proof of Concept: A public proof of concept is available for this vulnerability.
- Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
- Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
- Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
- Not confirmed: The user expressed doubt about the validity of the vulnerability.
- Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.