CVE-2024-27906: Apache Airflow DAG Code And Import Error Vulnerability

MODERATE
Advisory Identifier: GHSA-6v6w-h8m6-7mv2
CWE-668 CWE-862
Published
Advisory Summary

CVE-2024-27906 is a MODERATE dag code and import error vulnerability (CWE-668: Exposure of Resource to Wrong Sphere) affecting Apache Airflow libraries in the PyPI ecosystem. The issue involves dag code and import error permissions ignored. Remediation is available by upgrading affected packages to version 2.8.2.

CVE-2024-27906 at a Glance

CVE Identifier CVE-2024-27906
GHSA Identifier GHSA-6v6w-h8m6-7mv2
Severity MODERATE
CVSS v3.1 Base Score N/A
CWE Classification CWE-668: Exposure of Resource to Wrong Sphere
Affected Product Apache Airflow
Package Ecosystem PyPI
Published Date
Last Updated

How to Fix CVE-2024-27906

To remediate this vulnerability, upgrade all affected Apache Airflow 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 fixed: 2.8.2
pip install apache-airflow>=2.8.2
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

How to Check if You Are Affected

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

pip show apache-airflow

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

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

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-668: Exposure of Resource to Wrong Sphere, where the product exposes a resource to the wrong control sphere, providing unintended actors with inappropriate access to the resource. In Apache Airflow, 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, versions before 2.8.2, has a vulnerability that allows authenticated users to view DAG code and import errors of DAGs they do not have permission to view through the API and the UI. Users of Apache Airflow are recommended to upgrade to version 2.8.2 or newer to mitigate the risk associated with this vulnerability

CVE-2024-27906 Affected Apache Airflow Versions

1 component(s)
Fixed Versions:
2.8.2
Product / Package Ecosystem Affected Versions Fixed Version
apache-airflow
PyPI
< 2.8.2
2.8.2

References

NVD — CVE-2024-27906 NVD
https://nvd.nist.gov/vuln/detail/CVE-2024-27906
Apache Airflow Source Repository REPOSITORY
https://github.com/apache/airflow/pull/37290
Apache Airflow Source Repository REPOSITORY
https://github.com/apache/airflow/pull/37468
Security Fix Commit FIX COMMIT
https://github.com/apache/airflow/commit/08d25607abe8593ecb90a84e338896bb79692d7b
Security Fix Commit FIX COMMIT
https://github.com/apache/airflow/commit/0a95299691e2d6a9b874adfae94d246a7f681ec9
Security Fix Commit FIX COMMIT
https://github.com/apache/airflow/commit/2adbe882e68df0e2b1084bc869616bb01e416aa7
Security Fix Commit FIX COMMIT
https://github.com/apache/airflow/commit/2cb6027280bcf5e2b561f3ee7f55980f6ec4cc3a
Security Fix Commit FIX COMMIT
https://github.com/apache/airflow/commit/90255d9d44a649025f588497f6c82177dad48326
Security Fix Commit FIX COMMIT
https://github.com/apache/airflow/commit/9c4defa08268322b9db80123a22d7b56b2063446
Security Fix Commit FIX COMMIT
https://github.com/apache/airflow/commit/a7fa258ba1c69a18e0f620499625f6026768dc24
Security Fix Commit FIX COMMIT
https://github.com/apache/airflow/commit/bc2646be043f71b4d1ab7eefd2af65a60bf919f2
Security Fix Commit FIX COMMIT
https://github.com/apache/airflow/commit/d944eb0de216d9e1d125fae5ce4af7440154deb4
Apache Airflow Source Repository REPOSITORY
https://github.com/apache/airflow
Apache Airflow Source Repository REPOSITORY
https://github.com/pypa/advisory-database/tree/main/vulns/apache-airflow/PYSEC-2024-245.yaml
lists.apache.org/thread/on4f7t5sqr3v... WEB
https://lists.apache.org/thread/on4f7t5sqr3vfgp1pvkck79wv7mq9st5
Apache Airflow Security Information SECURITY
http://www.openwall.com/lists/oss-security/2024/02/29/1

Frequently Asked Questions

What is CVE-2024-27906?
CVE-2024-27906 is a security vulnerability in Apache Airflow involving DAG Code and Import Error Permissions Ignored under CWE-668: Exposure of Resource to Wrong Sphere.
Which Apache Airflow versions are affected?
Affected versions include releases prior to 2.8.2 across affected packages: apache-airflow.
What version fixes CVE-2024-27906?
Upgrading to 2.8.2 (or the latest patched release for your respective branch) resolves the vulnerability.
Is apache-airflow affected?
Yes, apache-airflow is affected in releases prior to 2.8.2. Upgrade your dependency to 2.8.2 or later.
What CWE is associated with CVE-2024-27906?
CVE-2024-27906 is classified under CWE-668: Exposure of Resource to Wrong Sphere (The product exposes a resource to the wrong control sphere, providing unintended actors with inappropriate access to the resource.).
How can I check PyPI dependencies for CVE-2024-27906?
Run the dependency tree command: 'pip show apache-airflow'. 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-6v6w-h8m6-7mv2",
  "modified" : "2025-05-06T18:00:48Z",
  "published" : "2024-02-29T12:31:06Z",
  "aliases" : [ "CVE-2024-27906" ],
  "summary" : "Apache Airflow: DAG Code and Import Error Permissions Ignored",
  "details" : "Apache Airflow, versions before 2.8.2, has a vulnerability that allows authenticated users to view DAG code and import errors of DAGs they do not have permission to view through the API and the UI.\n\nUsers of Apache Airflow are recommended to upgrade to version 2.8.2 or newer to mitigate the risk associated with this vulnerability",
  "severity" : [ {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:N/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "apache-airflow"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "2.8.2"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 2.8.1"
    }
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-27906"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/apache/airflow/pull/37290"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/apache/airflow/pull/37468"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/apache/airflow/commit/08d25607abe8593ecb90a84e338896bb79692d7b"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/apache/airflow/commit/0a95299691e2d6a9b874adfae94d246a7f681ec9"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/apache/airflow/commit/2adbe882e68df0e2b1084bc869616bb01e416aa7"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/apache/airflow/commit/2cb6027280bcf5e2b561f3ee7f55980f6ec4cc3a"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/apache/airflow/commit/90255d9d44a649025f588497f6c82177dad48326"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/apache/airflow/commit/9c4defa08268322b9db80123a22d7b56b2063446"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/apache/airflow/commit/a7fa258ba1c69a18e0f620499625f6026768dc24"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/apache/airflow/commit/bc2646be043f71b4d1ab7eefd2af65a60bf919f2"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/apache/airflow/commit/d944eb0de216d9e1d125fae5ce4af7440154deb4"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/apache/airflow"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/pypa/advisory-database/tree/main/vulns/apache-airflow/PYSEC-2024-245.yaml"
  }, {
    "type" : "WEB",
    "url" : "https://lists.apache.org/thread/on4f7t5sqr3vfgp1pvkck79wv7mq9st5"
  }, {
    "type" : "WEB",
    "url" : "http://www.openwall.com/lists/oss-security/2024/02/29/1"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-668", "CWE-862" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-02-29T23:27:11Z",
    "nvd_published_at" : "2024-02-29T11:15:08Z"
  }
}