# CVE-2022-40954: Apache Airflow Spark Provider RCE that bypass restrictions to read arbitrary files

- Severity: Medium 5.5 (CVSS:3.1, scored by CISA-ADP) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 1.33%, higher than 71% of CVEs (2026-12-01)
- Published: 2022-11-22T00:00:00.000Z
- Modified: 2026-11-27T13:17:19.270Z
- Also known as: GHSA-45r6-j3cc-6mxx, BIT-AIRFLOW-2022-40954, PYSEC-2026-770
- Weaknesses: CWE-78
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: apache

## Description

Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection') vulnerability in Apache Airflow Spark Provider, Apache Airflow allows an attacker to read arbtrary files in the task execution context, without write access to DAG files. This issue affects Spark Provider versions prior to 4.0.0. It also impacts any Apache Airflow versions prior to 2.3.0 in case Spark Provider is installed (Spark Provider 4.0.0 can only be installed for Airflow 2.3.0+). Note that you need to manually install the Spark Provider version 4.0.0 in order to get rid of the vulnerability on top of Airflow 2.3.0+ version that has lower version of the Spark Provider installed).

(As written by CVE List.)

## Affected

- Apache Software Foundation Apache Airflow Spark Provider: before 4.0.0
- Apache Software Foundation Apache Airflow: before 2.3.0
- apache-airflow (PyPI): before 2.3.0
- apache airflow: before 2.3.0
- apache apache-airflow-providers-apache-spark: before 4.0.0
- airflow (Bitnami): before 2.3.0

## Every score

- CISA-ADP: CVSS:3.1 5.5 Medium `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N`
- GitHub: CVSS:3.1 5.5 Medium `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N`
- NVD: CVSS:3.1 5.5 Medium `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N`
- PyPA Advisory Database: CVSS:3.1 5.5 Medium `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N`
- Bitnami Vulnerability Database: rating Medium

## References

- <https://github.com/apache/airflow/pull/27646> (advisory, patch, third-party-advisory, web)
- <https://lists.apache.org/thread/0tmdlnmjs5t4gsx5fy73tb6zd3jztq45> (advisory, mailing-list, vendor-advisory, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2022-40954> (advisory, web)
- <https://github.com/apache/airflow> (package)
- <https://pypi.org/project/apache-airflow> (package)
- <https://github.com/advisories/GHSA-45r6-j3cc-6mxx> (advisory)

## Sources

- CVE List: [CVE-2022-40954](https://www.cve.org/CVERecord?id=CVE-2022-40954), CVE Terms of Use, modified 2026-11-27
- GitHub Advisory Database: [GHSA-45r6-j3cc-6mxx](https://github.com/advisories/GHSA-45r6-j3cc-6mxx), CC-BY-4.0, modified 2026-07-07
- NVD: [CVE-2022-40954](https://nvd.nist.gov/vuln/detail/CVE-2022-40954), Public domain, modified 2026-11-27
- PyPA Advisory Database: [PYSEC-2026-770](https://osv.dev/vulnerability/PYSEC-2026-770), CC-BY-4.0, modified 2026-07-07
- Bitnami Vulnerability Database: [BIT-AIRFLOW-2022-40954](https://osv.dev/vulnerability/BIT-AIRFLOW-2022-40954), Apache-2.0, modified 2026-09-08

---

Page: https://cve.day/CVE-2022-40954 · Whole record: https://cve.day/CVE-2022-40954.json · Rebuilt by cve.day 2026-11-27T13:32:26.996Z
