CVE-2021-22133: Go.elastic.co/apm Information Disclosure Vulnerability

LOW
Advisory Identifier: GHSA-qqc5-rgcc-cjqh
CVSS 2.4
CWE-532
Published
Advisory Summary

CVE-2021-22133 is a LOW (CVSS 2.4) information disclosure vulnerability (CWE-532: Insertion of Sensitive Information into Log File) affecting Go.elastic.co/apm libraries in the Go ecosystem. The issue involves information disclosure in go.elastic.co/apm. Remediation is available by upgrading affected packages to version 1.11.0.

CVE-2021-22133 at a Glance

CVE Identifier CVE-2021-22133
GHSA Identifier GHSA-qqc5-rgcc-cjqh
Severity LOW
CVSS v3.1 Base Score 2.4
CWE Classification CWE-532: Insertion of Sensitive Information into Log File
Affected Product Go.elastic.co/apm
Package Ecosystem Go
Published Date
Last Updated

Security Impact

CVSS: 2.4

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:N/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 None (UI:N)
Scope Unchanged (S:U)
Confidentiality Low (C:L)
Integrity None (I:N)
Availability None (A:N)

How to Fix CVE-2021-22133

To remediate this vulnerability, upgrade all affected Go.elastic.co/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.

go.elastic.co/apm fixed: 1.11.0
Upgrade go.elastic.co/apm to 1.11.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 go.elastic.co/apm

How to Check if You Are Affected

To determine whether your application is affected by CVE-2021-22133, inspect your project dependencies for Go.elastic.co/apm:

inspect dependencies for go.elastic.co/apm

Analyze the terminal output to locate any version of Go.elastic.co/apm in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.11.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 Go.elastic.co/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 agent for Go versions before 1.11.0 can leak sensitive HTTP header information when logging the details during an application panic. Normally, the APM agent will sanitize sensitive HTTP header details before sending the information to the APM server. During an application panic it is possible the headers will not be sanitized before being sent.

CVE-2021-22133 Affected Go.elastic.co/apm Versions

1 component(s)
Fixed Versions:
1.11.0
Product / Package Ecosystem Affected Versions Fixed Version
go.elastic.co/apm
Go
< 1.11.0
1.11.0

References

Frequently Asked Questions

What is CVE-2021-22133?
CVE-2021-22133 is a security vulnerability in Go.elastic.co/apm involving Information Disclosure in go.elastic.co/apm under CWE-532: Insertion of Sensitive Information into Log File.
Which Go.elastic.co/apm versions are affected?
Affected versions include releases prior to 1.11.0 across affected packages: go.elastic.co/apm.
What version fixes CVE-2021-22133?
Upgrading to 1.11.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is go.elastic.co/apm affected?
Yes, go.elastic.co/apm is affected in releases prior to 1.11.0. Upgrade your dependency to 1.11.0 or later.
What is the CVSS score of CVE-2021-22133?
CVE-2021-22133 has a CVSS v3.1 base score of 2.4 (LOW) with vector string CVSS:3.1/AV:A/AC:L/PR:H/UI:N/S:U/C:L/I:N/A:N.
What CWE is associated with CVE-2021-22133?
CVE-2021-22133 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 Go dependencies for CVE-2021-22133?
Run the dependency tree command: 'inspect dependencies for go.elastic.co/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-qqc5-rgcc-cjqh",
  "modified" : "2023-08-30T11:37:11Z",
  "published" : "2021-05-18T18:34:18Z",
  "aliases" : [ "CVE-2021-22133" ],
  "summary" : "Information Disclosure in go.elastic.co/apm",
  "details" : "The Elastic APM agent for Go versions before 1.11.0 can leak sensitive HTTP header information when logging the details during an application panic. Normally, the APM agent will sanitize sensitive HTTP header details before sending the information to the APM server. During an application panic 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:N/S:U/C:L/I:N/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "go.elastic.co/apm"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.11.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2021-22133"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/elastic/apm-agent-go/pull/888"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/elastic/apm-agent-go/commit/c5c7e21aa26a6def7790f74fbceed792ad47ef35"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/elastic/apm-agent-go/commit/dd3e8c593580e7b80a98b57e1cc6e017e56747b4"
  }, {
    "type" : "WEB",
    "url" : "https://discuss.elastic.co/t/elastic-apm-agent-for-go-1-11-0-security-update/263252"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/elastic/apm-agent-go"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/elastic/apm-agent-go/compare/v1.10.0...v1.11.0"
  }, {
    "type" : "WEB",
    "url" : "https://pkg.go.dev/vuln/GO-2022-0706"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-532" ],
    "severity" : "LOW",
    "github_reviewed" : true,
    "github_reviewed_at" : "2021-05-07T22:01:55Z",
    "nvd_published_at" : null
  }
}