External risk intelligence

Apache Airflow Pig Provider Command Injection Vulnerability.

CVE advisorySeverity: CRITICAL (CVSS 9.8)

CVE-2022-40189

Apache Airflow is a platform for programmatically authoring, scheduling, and monitoring workflows. While it is often deployed in internal network segments to manage data pipelines, some organizations expose the Airflow web interface or API to the internet for remote access or multi-tenant orchestration, making internet reachability possible depending on the deployment configuration.

OS Command Injection

Apache Airflow

before 2.3.0before 4.0.0

Halo Surface Signal: 3 out of 5 — possibly public-facing.

External exposure likelihood

Horizon Alert

Summary of the vulnerability and why it matters

This advisory addresses a critical vulnerability in Apache Airflow's Pig Provider, allowing unauthorized command execution. This could enable attackers to control operations within the task execution environment. The main concern is confirming relevance and exposure within your deployed Airflow instances.

  • Uncontrolled commands in task execution.
  • Potential for unauthorized system control.
  • Confirm if your Airflow is impacted.

Attack Path

How an attacker could exploit the issue

An unauthenticated attacker could exploit this vulnerability by sending specially crafted input to the Pig Provider component of Apache Airflow. This could allow the attacker to execute arbitrary operating system commands on the server hosting Airflow, potentially leading to a full system compromise.

  • No authentication is required.
  • Specially crafted input is sent to the Pig Provider.
  • Arbitrary command execution on the server.

Live Threat

Current exploitation, exposure, and threat context

This vulnerability could allow an attacker to execute arbitrary operating system commands within the task execution environment of Apache Airflow. This may occur when specific configurations or versions of the Pig Provider are in use, potentially impacting the integrity and availability of the Airflow service and any connected systems it manages.

  • System commands in task execution context.
  • Unauthenticated remote control over commands.
  • Compromise of service and affected systems.

Operational Fix

Recommended remediation, mitigation, and detection steps

This vulnerability likely impacts teams responsible for Apache Airflow deployments, including platform and application owners. The first practical step is to identify all Airflow instances, determine their reachability and criticality, confirm ownership, and then plan remediation based on risk.

  • Ownership: Airflow platform and application owners.
  • Verify first: Identify and assess Airflow instances.
  • Action: Plan and execute targeted remediation.

Supplementary metadata

Validate whether this threat affects your internet-facing exposure.

Halo Threat Intelligence helps prioritize remediation with Halo Surface Signal and H/A/L/O context. Start exposure validation with a free external attack surface trial.

Frequently asked questions

What is Apache Airflow and the Pig Provider?

Apache Airflow is an open-source platform used to programmatically create, schedule, and monitor data workflows. The Pig Provider is a specific component (or integration) within Airflow that enables tasks to interface with Apache Pig, a high-level platform for analyzing large data sets. Many data engineering teams rely on this ecosystem to automate complex, multi-stage data pipelines.

What does OS Command Injection mean for CVE-2022-40189?

This vulnerability, classified as CWE-78, occurs when an application improperly filters input before passing it to a system shell. In this case, an attacker can supply malicious characters within input fields to trick the Pig Provider into running unintended operating system commands. Essentially, it allows unauthorized users to execute their own instructions directly on the server hosting your Airflow environment.

How can an attacker trigger this vulnerability?

An attacker exploits this by sending specially crafted input to the Pig Provider component. Crucially, they do not need write access to your workflow (DAG) files to succeed. Simply having the ability to reach and interact with the vulnerable component is sufficient; valid authentication is not a prerequisite for the command injection to occur.

Is my Airflow instance at risk?

According to Halo Surface Signal, risk depends heavily on your deployment. While Airflow is typically kept on internal networks, some organizations expose the web interface or API to the internet for remote access. If your Airflow instance is reachable from the public internet, it faces a higher likelihood of unauthorized interaction compared to those restricted to internal segments.

What should I do if I use Apache Airflow?

First, conduct an inventory of all Airflow instances in your environment to identify which are running the affected Pig Provider. Once identified, confirm your network configuration regarding internet reachability. Prioritize updating the Pig Provider to version 4.0.0 or later, ensuring you are also on a compatible version of Airflow (2.3.0 or higher) to fully address the issue.

References