CVE-2019-7617: Elastic apm Elastic APM Agent For Python Vulnerability

MODERATE
Advisory Identifier: GHSA-22jh-6gx8-f944
CVSS 7.2
CWE-20
Published
Advisory Summary

CVE-2019-7617 is a MODERATE (CVSS 7.2) elastic apm agent for python vulnerability (CWE-20: Improper Input Validation) affecting Elastic apm libraries in the PyPI ecosystem. The issue involves elastic apm agent for python client cgi proxy redirection flaw. Remediation is available by upgrading affected packages to version 5.1.0.

CVE-2019-7617 at a Glance

CVE Identifier CVE-2019-7617
GHSA Identifier GHSA-22jh-6gx8-f944
Severity MODERATE
CVSS v3.1 Base Score 7.2
CWE Classification CWE-20: Improper Input Validation
Affected Product Elastic apm
Package Ecosystem PyPI
Published Date
Last Updated

Security Impact

CVSS: 7.2

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

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Changed (S:C)
Confidentiality Low (C:L)
Integrity Low (I:L)
Availability None (A:N)

How to Fix CVE-2019-7617

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: 5.1.0
pip install elastic-apm>=5.1.0
Verify Direct and Transitive Dependencies

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

pip show elastic-apm

How to Check if You Are Affected

To determine whether your Python environment is affected by CVE-2019-7617, inspect your installed packages using pip:

pip show 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 5.1.0), your application is affected.

Note: The pip show elastic-apm command checks currently installed packages in your active Python environment.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-20: Improper Input Validation, where the product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly. 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

When the Elastic APM agent for Python versions before 5.1.0 is run as a CGI script, there is a variable name clash flaw if a remote attacker can control the proxy header. This could result in an attacker redirecting collected APM data to a proxy of their choosing.

CVE-2019-7617 Affected Elastic apm Versions

1 component(s)
Fixed Versions:
5.1.0
Product / Package Ecosystem Affected Versions Fixed Version
elastic-apm
PyPI
< 5.1.0
5.1.0

References

Frequently Asked Questions

What is CVE-2019-7617?
CVE-2019-7617 is a security vulnerability in Elastic apm involving Elastic APM agent for Python client CGI proxy redirection flaw under CWE-20: Improper Input Validation.
Which Elastic apm versions are affected?
Affected versions include releases prior to 5.1.0 across affected packages: elastic-apm.
What version fixes CVE-2019-7617?
Upgrading to 5.1.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 5.1.0. Upgrade your dependency to 5.1.0 or later.
What is the CVSS score of CVE-2019-7617?
CVE-2019-7617 has a CVSS v3.1 base score of 7.2 (MODERATE) with vector string CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:L/A:N.
What CWE is associated with CVE-2019-7617?
CVE-2019-7617 is classified under CWE-20: Improper Input Validation (The product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly.).
How can I check PyPI dependencies for CVE-2019-7617?
Run the dependency tree command: 'pip show 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-22jh-6gx8-f944",
  "modified" : "2024-09-20T17:08:20Z",
  "published" : "2022-05-24T16:54:36Z",
  "aliases" : [ "CVE-2019-7617" ],
  "summary" : "Elastic APM agent for Python client CGI proxy redirection flaw",
  "details" : "When the Elastic APM agent for Python versions before 5.1.0 is run as a CGI script, there is a variable name clash flaw if a remote attacker can control the proxy header. This could result in an attacker redirecting collected APM data to a proxy of their choosing.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:L/A:N"
  }, {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "elastic-apm"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "5.1.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2019-7617"
  }, {
    "type" : "WEB",
    "url" : "https://discuss.elastic.co/t/elastic-apm-agent-for-python-5-1-0-security-update/196145"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/elastic/apm-agent-python"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/pypa/advisory-database/tree/main/vulns/elastic-apm/PYSEC-2019-178.yaml"
  }, {
    "type" : "WEB",
    "url" : "https://www.elastic.co/community/security"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-20" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2023-07-17T22:02:54Z",
    "nvd_published_at" : "2019-08-22T17:15:00Z"
  }
}