Vulnerabilities in pkg:nuget/Elastic.Apm

PACKAGE
Advisory Identifier: GHSA-hx93-gc73-5rpr
Advisory Summary

CVE-2021-22143 is a LOW (CVSS 2.1) exposure of sensitive information vulnerability (CWE-532: Insertion of Sensitive Information into Log File) affecting Elastic.Apm libraries in the NuGet ecosystem. The issue involves exposure of sensitive information in elastic apm .net agent. Remediation is available by upgrading affected packages to version 1.10.0.

1 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:nuget/Elastic.Apm

1 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:nuget/Elastic.Apm. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-hx93-gc73-5rpr CVE-2021-22143 LOW Exposure of Sensitive Information in Elastic APM .NET Agent

CVE-2021-22143 at a Glance

CVE Identifier CVE-2021-22143
GHSA Identifier GHSA-hx93-gc73-5rpr
Severity LOW
CVSS v3.1 Base Score 2.1
CWE Classification CWE-532: Insertion of Sensitive Information into Log File
Affected Product Elastic.Apm
Package Ecosystem NuGet
Published Date
Last Updated

Security Impact

CVSS: 2.1

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:A/AC:L/PR:H/UI:R/S:U/C:L/I:N/A:N).

Attack Vector Adjacent (AV:A)
Attack Complexity Low (AC:L)
Privileges Required High (PR:H)
User Interaction Required (UI:R)
Scope Unchanged (S:U)
Confidentiality Low (C:L)
Integrity None (I:N)
Availability None (A:N)

How to Fix CVE-2021-22143

To remediate this vulnerability, upgrade all affected Elastic.Apm dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

Elastic.Apm fixed: 1.10.0
Upgrade Elastic.Apm to 1.10.0
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for Elastic.Apm

How to Check if You Are Affected

To determine whether your application is affected by CVE-2021-22143, inspect your project dependencies for Elastic.Apm:

inspect dependencies for Elastic.Apm

Analyze the terminal output to locate any version of Elastic.Apm in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.10.0), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-532: Insertion of Sensitive Information into Log File, where the product writes sensitive information to a log file. In Elastic.Apm, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

The Elastic APM .NET Agent can leak sensitive HTTP header information when logging the details during an application error. Normally, the APM agent will sanitize sensitive HTTP header details before sending the information to the APM server. During an application error it is possible the headers will not be sanitized before being sent.

CVE-2021-22143 Affected Elastic.Apm Versions

1 component(s)
Fixed Versions:
1.10.0
Product / Package Ecosystem Affected Versions Fixed Version
Elastic.Apm
NuGet
< 1.10.0
1.10.0

References

Frequently Asked Questions

What is CVE-2021-22143?
CVE-2021-22143 is a security vulnerability in Elastic.Apm involving Exposure of Sensitive Information in Elastic APM .NET Agent under CWE-532: Insertion of Sensitive Information into Log File.
Which Elastic.Apm versions are affected?
Affected versions include releases prior to 1.10.0 across affected packages: Elastic.Apm.
What version fixes CVE-2021-22143?
Upgrading to 1.10.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is Elastic.Apm affected?
Yes, Elastic.Apm is affected in releases prior to 1.10.0. Upgrade your dependency to 1.10.0 or later.
What is the CVSS score of CVE-2021-22143?
CVE-2021-22143 has a CVSS v3.1 base score of 2.1 (LOW) with vector string CVSS:3.1/AV:A/AC:L/PR:H/UI:R/S:U/C:L/I:N/A:N.
What CWE is associated with CVE-2021-22143?
CVE-2021-22143 is classified under CWE-532: Insertion of Sensitive Information into Log File (The product writes sensitive information to a log file.).
How can I check NuGet dependencies for CVE-2021-22143?
Run the dependency tree command: 'inspect dependencies for Elastic.Apm'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-hx93-gc73-5rpr",
  "modified" : "2023-11-22T20:56:15Z",
  "published" : "2023-11-22T03:30:19Z",
  "aliases" : [ "CVE-2021-22143" ],
  "summary" : "Exposure of Sensitive Information in Elastic APM .NET Agent",
  "details" : "The Elastic APM .NET Agent can leak sensitive HTTP header information when logging the details during an application error. Normally, the APM agent will sanitize sensitive HTTP header details before sending the information to the APM server. During an application error it is possible the headers will not be sanitized before being sent.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:A/AC:L/PR:H/UI:R/S:U/C:L/I:N/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "NuGet",
      "name" : "Elastic.Apm"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.10.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2021-22143"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/elastic/apm-agent-dotnet/pull/1286"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/elastic/apm-agent-dotnet/commit/c2b519aaa0fe5e5044b736cfec695342f124bf30"
  }, {
    "type" : "WEB",
    "url" : "https://discuss.elastic.co/t/elastic-apm-net-agent-1-10-0-security-update/274668"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/elastic/apm-agent-dotnet"
  }, {
    "type" : "WEB",
    "url" : "https://www.elastic.co/community/security"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-200", "CWE-532" ],
    "severity" : "LOW",
    "github_reviewed" : true,
    "github_reviewed_at" : "2023-11-22T20:56:15Z",
    "nvd_published_at" : "2023-11-22T02:15:41Z"
  }
}