CVE-2023-33234: Apache airflow providers cncf kubernetes Remote Code Execution Vulnerability

HIGH
Advisory Identifier: GHSA-2rx4-9f5h-9gjf
CVSS 7.2
CWE-74
Published
Advisory Summary

CVE-2023-33234 is a HIGH (CVSS 7.2) remote code execution vulnerability (CWE-74: Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection')) affecting Apache airflow providers cncf kubernetes libraries in the PyPI ecosystem. The issue involves kubernetespodoperator rce via connection configuration. Remediation is available by upgrading affected packages to version 7.0.0.

CVE-2023-33234 at a Glance

CVE Identifier CVE-2023-33234
GHSA Identifier GHSA-2rx4-9f5h-9gjf
Severity HIGH
CVSS v3.1 Base Score 7.2
CWE Classification CWE-74: Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection')
Affected Product Apache airflow providers cncf kubernetes
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.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H).

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

How to Fix CVE-2023-33234

To remediate this vulnerability, upgrade all affected Apache airflow providers cncf kubernetes 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-cncf-kubernetes fixed: 7.0.0
pip install apache-airflow-providers-cncf-kubernetes>=7.0.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-cncf-kubernetes

How to Check if You Are Affected

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

pip show apache-airflow-providers-cncf-kubernetes

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

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

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-74: Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection'), where the product constructs all or part of a command, data structure, or record using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify how it is parsed or interpreted when it is sent to a downstream component. In Apache airflow providers cncf kubernetes, 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

Arbitrary code execution in Apache Airflow CNCF Kubernetes provider version 5.0.0 allows user to change xcom sidecar image and resources via Airflow connection. In order to exploit this weakness, a user would already need elevated permissions (Op or Admin) to change the connection object in this manner. Operators should upgrade to provider version 7.0.0 which has removed the vulnerability.

CVE-2023-33234 Affected Apache airflow providers cncf kubernetes Versions

1 component(s)
Fixed Versions:
7.0.0
Product / Package Ecosystem Affected Versions Fixed Version
apache-airflow-providers-cncf-kubernetes
PyPI
≥ 5.0.0
< 7.0.0
7.0.0

References

Frequently Asked Questions

What is CVE-2023-33234?
CVE-2023-33234 is a security vulnerability in Apache airflow providers cncf kubernetes involving KubernetesPodOperator RCE via connection configuration under CWE-74: Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection').
Which Apache airflow providers cncf kubernetes versions are affected?
Affected versions include releases prior to 7.0.0 across affected packages: apache-airflow-providers-cncf-kubernetes.
What version fixes CVE-2023-33234?
Upgrading to 7.0.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is apache-airflow-providers-cncf-kubernetes affected?
Yes, apache-airflow-providers-cncf-kubernetes is affected in releases prior to 7.0.0. Upgrade your dependency to 7.0.0 or later.
What is the CVSS score of CVE-2023-33234?
CVE-2023-33234 has a CVSS v3.1 base score of 7.2 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H.
What CWE is associated with CVE-2023-33234?
CVE-2023-33234 is classified under CWE-74: Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection') (The product constructs all or part of a command, data structure, or record using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify how it is parsed or interpreted when it is sent to a downstream component.).
How can I check PyPI dependencies for CVE-2023-33234?
Run the dependency tree command: 'pip show apache-airflow-providers-cncf-kubernetes'. 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-2rx4-9f5h-9gjf",
  "modified" : "2023-07-06T23:54:53Z",
  "published" : "2023-07-06T21:15:06Z",
  "aliases" : [ "CVE-2023-33234" ],
  "summary" : "Apache Airflow CNCF Kubernetes Provider: KubernetesPodOperator RCE via connection configuration",
  "details" : "Arbitrary code execution in Apache Airflow CNCF Kubernetes provider version 5.0.0 allows user to change xcom sidecar image and resources via Airflow connection.\n\nIn order to exploit this weakness, a user would already need elevated permissions (Op or Admin) to change the connection object in this manner. Operators should upgrade to provider version 7.0.0 which has removed the vulnerability.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "apache-airflow-providers-cncf-kubernetes"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "5.0.0"
      }, {
        "fixed" : "7.0.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2023-33234"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/apache/airflow"
  }, {
    "type" : "WEB",
    "url" : "https://lists.apache.org/thread/n1vpgl6h2qsdm52o9m2tx1oo86tl4gnq"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-74" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2023-07-06T23:54:53Z",
    "nvd_published_at" : "2023-05-30T11:15:09Z"
  }
}