Vulnerabilities in pkg:pypi/apache-airflow-providers-imap

PACKAGE
Advisory Identifier: GHSA-5f35-pq34-c87q
Advisory Summary

CVE-2023-39441 is a MODERATE (CVSS 5.9) apache airflow missing certificate validation vulnerability (CWE-295: Improper Certificate Validation) affecting Apache airflow providers smtp libraries in the PyPI ecosystem. The issue involves apache airflow missing certificate validation. Remediation is available by upgrading affected packages to version 1.3.0, 3.3.0, 2.7.0.

1 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:pypi/apache-airflow-providers-imap

1 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:pypi/apache-airflow-providers-imap. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-5f35-pq34-c87q CVE-2023-39441 MODERATE Apache Airflow missing Certificate Validation

CVE-2023-39441 at a Glance

CVE Identifier CVE-2023-39441
GHSA Identifier GHSA-5f35-pq34-c87q
Severity MODERATE
CVSS v3.1 Base Score 5.9
CWE Classification CWE-295: Improper Certificate Validation
Affected Product Apache airflow providers smtp
Package Ecosystem PyPI
Published Date
Last Updated

Security Impact

CVSS: 5.9

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

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

How to Fix CVE-2023-39441

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

apache-airflow-providers-smtp fixed: 1.3.0
pip install apache-airflow-providers-smtp>=1.3.0
apache-airflow-providers-imap fixed: 3.3.0
pip install apache-airflow-providers-imap>=3.3.0
apache-airflow fixed: 2.7.0
pip install apache-airflow>=2.7.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 apache-airflow-providers-smtp

How to Check if You Are Affected

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

pip show apache-airflow-providers-smtp

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

Note: The pip show apache-airflow-providers-smtp command checks currently installed packages in your active Python environment.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-295: Improper Certificate Validation, where the product does not validate, or incorrectly validates, a certificate. In Apache airflow providers smtp, 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

Apache Airflow SMTP Provider before 1.3.0, Apache Airflow IMAP Provider before 3.3.0, and Apache Airflow before 2.7.0 are affected by the Validation of OpenSSL Certificate vulnerability. The default SSL context with SSL library did not check a server's X.509 certificate.  Instead, the code accepted any certificate, which could result in the disclosure of mail server credentials or mail contents when the client connects to an attacker in a MITM position. Users are strongly advised to upgrade to Apache Airflow version 2.7.0 or newer, Apache Airflow IMAP Provider version 3.3.0 or newer, and Apache Airflow SMTP Provider version 1.3.0 or newer to mitigate the risk associated with this vulnerability

CVE-2023-39441 Affected Apache airflow providers smtp Versions

3 component(s)
Fixed Versions:
1.3.03.3.02.7.0
Product / Package Ecosystem Affected Versions Fixed Version
apache-airflow-providers-smtp
PyPI
< 1.3.0
1.3.0
apache-airflow-providers-imap
PyPI
< 3.3.0
3.3.0
apache-airflow
PyPI
< 2.7.0
2.7.0

References

Frequently Asked Questions

What is CVE-2023-39441?
CVE-2023-39441 is a security vulnerability in Apache airflow providers smtp involving Apache Airflow missing Certificate Validation under CWE-295: Improper Certificate Validation.
Which Apache airflow providers smtp versions are affected?
Affected versions include releases prior to 1.3.0, 3.3.0, 2.7.0 across affected packages: apache-airflow-providers-smtp, apache-airflow-providers-imap, apache-airflow.
What version fixes CVE-2023-39441?
Upgrading to 1.3.0, 3.3.0, 2.7.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is apache-airflow-providers-smtp affected?
Yes, apache-airflow-providers-smtp is affected in releases prior to 1.3.0. Upgrade your dependency to 1.3.0 or later.
Is apache-airflow-providers-imap affected?
Yes, apache-airflow-providers-imap is affected in releases prior to 3.3.0. Upgrade your dependency to 3.3.0 or later.
What is the CVSS score of CVE-2023-39441?
CVE-2023-39441 has a CVSS v3.1 base score of 5.9 (MODERATE) with vector string CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N.
What CWE is associated with CVE-2023-39441?
CVE-2023-39441 is classified under CWE-295: Improper Certificate Validation (The product does not validate, or incorrectly validates, a certificate.).
How can I check PyPI dependencies for CVE-2023-39441?
Run the dependency tree command: 'pip show apache-airflow-providers-smtp'. 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-5f35-pq34-c87q",
  "modified" : "2024-03-06T23:29:23Z",
  "published" : "2023-08-23T18:30:34Z",
  "aliases" : [ "CVE-2023-39441" ],
  "summary" : "Apache Airflow missing Certificate Validation",
  "details" : "Apache Airflow SMTP Provider before 1.3.0, Apache Airflow IMAP Provider before 3.3.0, and Apache Airflow before 2.7.0 are affected by the Validation of OpenSSL Certificate vulnerability.\n\nThe default SSL context with SSL library did not check a server's X.509 certificate.  Instead, the code accepted any certificate, which could result in the disclosure of mail server credentials or mail contents when the client connects to an attacker in a MITM position.\n\nUsers are strongly advised to upgrade to Apache Airflow version 2.7.0 or newer, Apache Airflow IMAP Provider version 3.3.0 or newer, and Apache Airflow SMTP Provider version 1.3.0 or newer to mitigate the risk associated with this vulnerability",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "apache-airflow-providers-smtp"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.3.0"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "apache-airflow-providers-imap"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "3.3.0"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "apache-airflow"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "2.7.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2023-39441"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/apache/airflow/pull/33070"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/apache/airflow/pull/33075"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/apache/airflow/pull/33108"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/apache/airflow/commit/38fc9cd823feafd8ec61d5d5c7eddb9e9162f755"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/apache/airflow/commit/3bd8f020e8b7bdeb7f618bdbdfb3557f117b29d3"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/apache/airflow/commit/dbacacbd4d476da757de148a4e747924c34fd7fe"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/apache/airflow"
  }, {
    "type" : "WEB",
    "url" : "https://lists.apache.org/thread/xzp4wgjg2b1o6ylk2595df8bstlbo1lb"
  }, {
    "type" : "WEB",
    "url" : "http://www.openwall.com/lists/oss-security/2023/08/23/2"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-295" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2023-08-24T12:52:22Z",
    "nvd_published_at" : "2023-08-23T16:15:09Z"
  }
}