# CVE-2024-32028: Sensitive query parameters logged by default in OpenTelemetry.Instrumentation http and AspNetCore

> OpenTelemetry .NET libraries leak sensitive query parameters to telemetry backends by default, exposing user data and credentials.

- **Severity:** Medium 4.1 (`CVSS:3.1/AV:A/AC:L/PR:L/UI:N/S:C/C:L/I:N/A:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Any signed-in user
- **Attackable:** Local or same network only
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 12 Apr 2024
- **Updated:** 2 Aug 2024
- **Also known as:** GHSA-vh2m-22xx-q94f

## What is CVE-2024-32028?

CVE-2024-32028 is a medium-severity vulnerability in open-telemetry opentelemetry-dotnet, published on 12 Apr 2024. It can only be exploited from the same machine or local network, with no action from the victim.

### Official description

OpenTelemetry dotnet is a dotnet telemetry framework. In affected versions of `OpenTelemetry.Instrumentation.Http` and `OpenTelemetry.Instrumentation.AspNetCore` the `url.full` writes attribute/tag on spans (`Activity`) when tracing is enabled for outgoing http requests and `OpenTelemetry.Instrumentation.AspNetCore` writes the `url.query` attribute/tag on spans (`Activity`) when tracing is enabled for incoming http requests. These attributes are defined by the Semantic Conventions for HTTP Spans. Up until version `1.8.1` the values written by `OpenTelemetry.Instrumentation.Http` & `OpenTelemetry.Instrumentation.AspNetCore` will pass-through the raw query string as was sent or received (respectively). This may lead to sensitive information (e.g. EUII - End User Identifiable Information, credentials, etc.) being leaked into telemetry backends (depending on the application(s) being instrumented) which could cause privacy and/or security incidents. Note: Older versions of `OpenTelemetry.Instrumentation.Http` & `OpenTelemetry.Instrumentation.AspNetCore` may use different tag names but have the same vulnerability. The `1.8.1` versions of `OpenTelemetry.Instrumentation.Http` & `OpenTelemetry.Instrumentation.AspNetCore` will now redact by default all values detected on transmitted or received query strings. Users are advised to upgrade. There are no known workarounds for this vulnerability.

Weakness: CWE-212 (Improper Removal of Sensitive Information Before Storage or Transfer), CWE-201 (Insertion of Sensitive Information Into Sent Data)

## Which versions are affected by CVE-2024-32028?

4 open source packages ship an affected version, including OpenTelemetry.Instrumentation.AspNetCore and OpenTelemetry.Instrumentation.Http.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `OpenTelemetry.Instrumentation.AspNetCore` | NuGet | All versions | 1.8.1 |
| `OpenTelemetry.Instrumentation.AspNetCore` | NuGet | All versions | 1.8.1 |
| `OpenTelemetry.Instrumentation.Http` | NuGet | All versions | 1.8.1 |
| `OpenTelemetry.Instrumentation.Http` | NuGet | All versions | 1.8.1 |

## How do I fix CVE-2024-32028?

Upgrade OpenTelemetry.Instrumentation.AspNetCore to 1.8.1 or later.

## Is CVE-2024-32028 being exploited?

There is no known exploitation of CVE-2024-32028 in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2024-32028 and fix it if it is affected.

What it is: CVE-2024-32028 is a medium-severity vulnerability in open-telemetry opentelemetry-dotnet, published on 12 Apr 2024. It can only be exploited from the same machine or local network, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2024-32028 in the wild and no public exploit code.

Affected packages and fixed versions:
- OpenTelemetry.Instrumentation.AspNetCore (NuGet): affected all versions; fixed in 1.8.1
- OpenTelemetry.Instrumentation.AspNetCore (NuGet): affected all versions; fixed in 1.8.1
- OpenTelemetry.Instrumentation.Http (NuGet): affected all versions; fixed in 1.8.1
- OpenTelemetry.Instrumentation.Http (NuGet): affected all versions; fixed in 1.8.1

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2024-32028/ (Markdown: https://insights.sbomify.com/CVE-2024-32028/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2024-32028
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2024-32028
- OSV: https://osv.dev/vulnerability/CVE-2024-32028

---
From sbomify Insights: https://insights.sbomify.com/CVE-2024-32028/
Summaries are generated and may contain mistakes; the official description above is the record.
