{"id":"CVE-2022-40189","kind":"vulnerability","aliases":["CVE-2022-40189","GHSA-rmf2-pwfq-h75j"],"related":[],"title":"OS Command Injection in Apache Airflow","description":"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.","summary":"The Apache Airflow Pig Provider passes attacker-controlled input into OS commands executed in the task execution context. An attacker who can control task parameters can run arbitrary commands without needing write access to DAG files.","severity":"critical","cvss":9.8,"epss":0.04078,"exploited":false,"exploited_at":null,"products":[{"name":"apache-airflow","fixed":["2.3.0"],"affected":"< 2.3.0","ecosystem":"pypi"},{"name":"apache airflow","fixed":["2.3.0"],"affected":"< 2.3.0","ecosystem":"vendor"},{"name":"apache apache-airflow-providers-apache-pig","fixed":["4.0.0"],"affected":"< 4.0.0","ecosystem":"vendor"}],"ecosystems":["pypi","vendor"],"tags":["apache-airflow","cwe-78","package","python","self-hosted"],"not_affected_if":["airflow-2.3.0-plus-without-pig","no-pig-provider"],"how_to_check":"- Run `pip show apache-airflow-providers-apache-pig` to see whether the Pig Provider is installed and its version\n- Run `airflow version` to check the Airflow core version\n- Check whether the Pig Provider is listed in your requirements or constraints files","fix":"- Upgrade the Pig Provider to `4.0.0` (`pip install apache-airflow-providers-apache-pig==4.0.0`), which is required even on Airflow 2.3.0+\n- Upgrade Apache Airflow to `2.3.0` or later if the Pig Provider is installed","status":"open","published_at":"2022-11-22T10:15:16+00:00","first_seen_at":"2026-10-26T21:11:44+00:00","triaged_at":"2026-10-26T21:12:44+00:00","updated_at":"2026-10-26T21:20:32+00:00","category":"package","confidence":0.8,"triage":{"at":"2026-10-26T21:12:44Z","model":"claude-haiku-5-5","output":{"fix":"- Upgrade the Pig Provider to `4.0.0` (`pip install apache-airflow-providers-apache-pig==4.0.0`), which is required even on Airflow 2.3.0+\n- Upgrade Apache Airflow to `2.3.0` or later if the Pig Provider is installed","reach":"unknown","title":"Apache Airflow: Pig Provider lets attackers run OS commands in tasks","impact":"high","summary":"The Apache Airflow Pig Provider passes attacker-controlled input into OS commands executed in the task execution context. An attacker who can control task parameters can run arbitrary commands without needing write access to DAG files.","category":"package","nicknames":[],"who_cares":["apache-airflow","python","self-hosted"],"confidence":0.8,"needs_auth":"yes","worst_case":"Attacker runs arbitrary OS commands in the task execution context","analyst_note":"","how_to_check":"- Run `pip show apache-airflow-providers-apache-pig` to see whether the Pig Provider is installed and its version\n- Run `airflow version` to check the Airflow core version\n- Check whether the Pig Provider is listed in your requirements or constraints files","needs_analyst":false,"not_affected_if":["no-pig-provider","airflow-2.3.0-plus-without-pig"],"who_is_affected":"Teams running Apache Airflow with the Pig Provider installed, on any Airflow version before 2.3.0 or with Pig Provider versions before 4.0.0. Installations without the Pig Provider on Airflow 2.3.0+ are not affected by this issue.","user_interaction":"no","needs_special_setup":"yes","severity_if_unknown":"critical"},"cost_usd":0.000645,"input_tokens":3486,"output_tokens":593,"severity_before":"critical"},"analyst_status":null,"analyst_note":null,"search":"'-2022':8A,16A '-40189':9A,17A '-78':34B '2.3.0':134C,150C,175C '4.0.0':124C,143C,162C 'access':73B,112C 'affect':118C 'airflow':6A,20A,22A,26A,32B,42B,93C,97C,130C,149C,174C 'allow':98C 'also':126C 'apach':5A,31B,41B,92C,96C,129C 'apache':19A,21A,23A,25A,28A 'apache-airflow':18A,30B 'apache-airflow-providers-apache-pig':24A 'arbitrari':68B 'attack':47B,60B,100C 'attacker-control':46B 'case':136C 'command':2A,52B,69B,86C,88C,103C 'context':58B,109C 'control':48B,63B,102C 'cve':7A,15A 'cwe':33B 'dag':75B,114C 'element':81C 'execut':53B,57B,104C,108C 'file':76B,115C 'get':166C 'ghsa':11A 'ghsa-rmf2-pwfq-h75j':10A 'h75j':14A 'host':39B 'impact':127C 'improp':77C 'inject':3A,89C 'input':49B 'instal':140C,147C,157C 'issu':117C 'manual':156C 'need':71B,154C 'neutral':78C 'note':151C 'order':164C 'os':1A,51B,85C,87C 'packag':35B 'paramet':65B 'pass':45B 'pig':29A,43B,94C,119C,137C,141C,159C 'prior':122C,132C 'provid':44B,95C,120C,138C,142C,160C 'providers':27A 'pwfq':13A 'python':36B 'rid':167C 'rmf2':12A 'run':67B 'self':38B 'self-host':37B 'special':80C 'task':56B,64B,107C 'top':172C 'use':82C 'version':121C,131C,161C,176C 'vulner':90C,170C 'without':70B,110C 'write':72B,111C","nicknames":[],"mitigations":[],"who_affected":"Teams running Apache Airflow with the Pig Provider installed, on any Airflow version before 2.3.0 or with Pig Provider versions before 4.0.0. Installations without the Pig Provider on Airflow 2.3.0+ are not affected by this issue.","tier":"B","verified":{},"analyst_revisit_at":null,"first_public_at":"2022-11-22T10:15:16+00:00","kev":null,"cvss_vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","cvss_by":"GitHub","poc_count":0,"sources":[{"source":"ghsa","external_id":"GHSA-rmf2-pwfq-h75j","url":"https://github.com/advisories/GHSA-rmf2-pwfq-h75j","severity":"critical","published_at":"2022-11-22T12:30:22+00:00","modified_at":"2026-10-26T21:11:40+00:00","first_seen_at":"2026-10-26T21:11:44+00:00","fetched_at":"2026-10-26T21:16:46+00:00","note":null},{"source":"nvd","external_id":"CVE-2022-40189","url":"https://nvd.nist.gov/vuln/detail/CVE-2022-40189","severity":null,"published_at":"2022-11-22T10:15:16+00:00","modified_at":"2026-06-17T05:01:04+00:00","first_seen_at":"2026-10-26T21:20:32+00:00","fetched_at":"2026-10-26T21:20:32+00:00","note":null}],"documents":[],"notice":"Free to read at a human pace. An API with keys and an MCP server are in preparation; early access: hello@infrastack.ai"}