/

CVE-2026-101031

Severity:

CRITICAL RISK

(9.1)

OS Command Injection (CWE-78) in Airflow Example DAG

CVE-2026-101031

Awaiting Analysis

Vulnerability type

Category:

OS Command Injection

CWE:

CWE-78

Impact:

Remote Command Execution

Severity:

CRITICAL RISK

(9.1)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

Apache Airflow's example_dag_decorator example DAG can place a value derived from an HTTP response into a shell command after checking it with Python's ipaddress module. When example DAGs are enabled, a user who can trigger the DAG with a custom URL may be able to cause command execution on the worker if the response contains a crafted IPv6 zone identifier.

Affected context

The issue occurs in Airflow deployments that load the example_dag_decorator example DAG and allow a user to trigger it with a custom url parameter. The validation accepts IPv6 zone identifiers containing characters that can affect shell command interpretation, and the resulting value is used in a shell command on the worker.

Exploit preconditions

  • Attack surface: The Airflow example DAG and its HTTP request handling
  • Required access: Ability to trigger the DAG and supply a custom url parameter
  • Trigger point: Processing the HTTP response and constructing the shell command
  • Why exploitation is possible: The IP address check accepts zone identifiers containing arbitrary characters, and the validated value is subsequently placed into a shell command

Why this happens

The code treats successful IP parsing as proof that a value is safe for shell use. Python's ipaddress module accepts IPv6 zone identifiers that may contain characters with meaning to a shell; placing such a value into a command creates an OS command injection risk. This maps to CWE-78: Improper Neutralization of Special Elements used in an OS Command.

Potential impact

  • An attacker may execute commands on the Airflow worker
  • Worker processes or data accessible to the worker could be compromised
  • Depending on worker permissions and environment, an attacker could affect other workloads or systems

General mitigation guidance

Mitigation generally focuses on removing shell interpretation from data-handling paths and reducing exposure to example code.

Common defensive patterns include:

  • Disable example DAG loading in production environments
  • Avoid constructing shell commands from request or response data; use APIs that pass arguments directly to a process without invoking a shell
  • Apply strict, purpose-specific validation and canonicalization rather than relying on IP parsing as shell-safety validation
  • Run workers with least privilege and limit their access to sensitive resources
  • Treat HTTP responses and user-supplied parameters as untrusted input

How teams detect issues like this

High-level review and monitoring can focus on:

  • Static analysis patterns that identify shell execution APIs receiving interpolated or concatenated values
  • Code review of validation-to-command flows, especially values derived from HTTP responses or DAG parameters
  • Policies that prohibit shell-based execution where direct process APIs are suitable
  • Airflow configuration checks that identify enabled example DAGs in production
  • Runtime monitoring for unexpected process launches by worker tasks

Sources

SourceLink
github.comgithub.com/apache/airflow/pull/73787
lists.apache.orglists.apache.org/thread.html/p53zxybld58wv722c7zxk0w8d2rnkfwk
cve.orgcve.org/CVERecord?id=CVE-2025-54941

Frequently asked

questions

Exploitation depends on deployment configuration and access: example DAGs must be loaded, and an attacker must be able to trigger the DAG with a custom URL.

They need access to trigger the affected DAG and provide its url parameter. The description does not establish that unauthenticated users can do this.

Avoid passing untrusted values through a shell. Prefer APIs that execute programs with separately supplied arguments, alongside strict validation for the value's intended use.

Disable example DAGs in production, review all data flows into command execution, and apply least privilege to worker processes.

Find out what's already
exploitable in your codebase.