VAITP Dataset

← Back to the dataset

CVE-2026-101031

Shell injection via crafted IPv6 zone identifier in example DAG HTTP fetch.

  • CWE-78
  • Input Validation and Sanitization
  • Remote

The `example_dag_decorator` example Dag shipped with Apache Airflow validated an IP address fetched over HTTP with Python's `ipaddress` module and then placed it into a shell command. `ipaddress` accepts IPv6 zone identifiers containing arbitrary characters, so when example Dags are loaded (`load_examples` enabled), a user who can trigger that Dag with a custom `url` parameter could point it at a server whose response injects shell commands run on the worker. This is an incomplete fix for CVE-2025-54941; users who upgraded for CVE-2025-54941 should upgrade again. Users are advised to upgrade to apache-airflow 3.4.0 or later, or to disable example Dags (`load_examples = False`), which is recommended for production.

Published
2026-11-09
OWASP
A03 Injection
Orthogonal defect classification
Checking
Code defect classification
Incorrect Check
Category
Input Validation and Sanitization
Subcategory
Command Injection
Accessibility scope
Remote
Impact
Arbitrary Code Execution
Affected component
ipaddress
Fixed by upgrading
Yes

Solution

Upgrade Apache Airflow to version 3.4.0 or later (or disable example Dags by setting load_examples = False).

Vulnerable code sample

import requests
import ipaddress
import subprocess

def run_ping_task(url: str) -> None:
    # VULNERABLE: IP address from untrusted source used directly in shell command
    resp = requests.get(url, timeout=5)
    ip_str = resp.text.strip()
    # Validate IP format (accepts IPv6 zone identifiers)
    ip = ipaddress.ip_address(ip_str)

    # Build and execute ping command
    cmd = f"ping -c 3 {ip}"
    subprocess.run(cmd, shell=True, check=False)

Patched code sample

import requests
import ipaddress
import subprocess

def run_ping_task(url: str) -> None:
    # FIX: Reject IPv6 addresses with zone identifiers before using in shell
    resp = requests.get(url, timeout=5)
    ip_str = resp.text.strip()
    # Validate IP format
    ip = ipaddress.ip_address(ip_str)

    # Ensure no zone identifier is present (e.g., fe80::1%eth0)
    if isinstance(ip, ipaddress.IPv6Address) and '%' in ip_str:
        raise ValueError("IPv6 zone identifiers are not allowed")

    # Build and execute ping command
    cmd = f"ping -c 3 {ip}"
    subprocess.run(cmd, shell=True, check=False)

Published fix

Public sources link this CVE to the changes below. The code samples above were generated to illustrate the defect; these links lead to the code the project actually changed.

  • Pass runtime values to example Dag shell commands through env (apache/airflow)
    airflow-core/src/airflow/example_dags/example_dag_decorator.py · example_dag_decorator, providers/standard/src/airflow/providers/standard/example_dags/example_bash_decorator.py · example_bash_decorator, providers/standard/src/airflow/providers/standard/example_dags/example_bash_operator.py

Cite this entry

@misc{vaitp:cve2026101031,
  title        = {{Shell injection via crafted IPv6 zone identifier in example DAG HTTP fetch.}},
  author       = {Bogaerts, Fr\'ed\'eric and Ivaki, Naghmeh and Fonseca, Jos\'e},
  year         = {2026},
  note         = {VAITP Python Vulnerability Dataset, entry CVE-2026-101031},
  howpublished = {\url{https://netpack.pt/vaitp/vulnerability/CVE-2026-101031/}}
}

Download this entry as JSON Download the whole dataset

Introducing the "VAITP dataset": a specialized repository of Python vulnerabilities and patches, meticulously compiled for the use of the security research community. As Python's prominence grows, understanding and addressing potential security vulnerabilities become crucial. Crafted by and for the cybersecurity community, this dataset offers a valuable resource for researchers, analysts, and developers to analyze and mitigate the security risks associated with Python. Through the comprehensive exploration of vulnerabilities and corresponding patches, the VAITP dataset fosters a safer and more resilient Python ecosystem, encouraging collaborative advancements in programming security.

The supreme art of war is to subdue the enemy without fighting.

Sun Tzu – “The Art of War”

:: Shaping the future through research and ingenuity ::

Before you use the VAITP AI models

Please read and accept the following disclaimer:

By choosing "I understand and accept", you acknowledge that you understand and agree to these terms.