---
id: CVE-2022-40189
aliases:
  - GHSA-rmf2-pwfq-h75j
  - BIT-airflow-2022-40189
  - PYSEC-2026-270
title: OS Command Injection in Apache Airflow
summary: OS Command Injection in Apache Airflow
severity: critical
cvss: 9.8
cvssVector: 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H'
vendor: apache-airflow
product: apache-airflow
ecosystem: pip
affected:
  - apache-airflow < 2.3.0
patched:
  - apache-airflow 2.3.0
published: '2022-11-22'
updated: '2026-10-26'
sourceUpdated: '2026-10-26T21:30:04.163640168Z'
source: OSV
sourceUrl: 'https://osv.dev/vulnerability/GHSA-rmf2-pwfq-h75j'
references:
  - url: 'https://nvd.nist.gov/vuln/detail/CVE-2022-40189'
  - url: 'https://github.com/apache/airflow/pull/27644'
  - url: 'https://github.com/apache/airflow'
  - url: >-
      https://github.com/pypa/advisory-database/tree/main/vulns/apache-airflow/PYSEC-2026-270.yaml
  - url: 'https://lists.apache.org/thread/yxnfzfw2w9pj5s785k3rlyly4y44sd15'
  - url: 'https://pypi.org/project/apache-airflow'
  - url: 'https://github.com/advisories/GHSA-rmf2-pwfq-h75j'
tags:
  - osv
  - pip
  - ghsa
epss: 0.04078
epssPercentile: 0.90646
cwe:
  - CWE-78
ingestedAt: '2026-10-27T16:11:58.774Z'
---

## Overview

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

## Affected packages

- `apache-airflow < 2.3.0`

## Remediation

Upgrade to a patched release:

- `apache-airflow 2.3.0`
