Apache Airflow Patches Critical Jinja Template Injection Flaw in TaskFlow Decorators

2 min read
Source: CVEs | Zero Wire | Cloudflare Radar
Apache Airflow Patches Critical Jinja Template Injection Flaw in TaskFlow Decorators
Photo: CVEs | Zero Wire | Cloudflare Radar
TL;DR

Apache Software Foundation disclosed CVE-2026-120353, a critical vulnerability in multiple Apache Airflow providers that allows arbitrary code execution on workers via double-rendering of Jinja templates in TaskFlow decorators. The flaw affects the Standard, CNCF Kubernetes, Common SQL, and Common AI providers, enabling attackers with limited permissions to execute commands and access sensitive data like connection passwords. Patches are available in updated provider versions, and users are urged to upgrade immediately to mitigate the risk of server-side template injection.

Key points

  • CVE-2026-120353 affects Apache Airflow Standard, CNCF Kubernetes, Common SQL, and Common AI providers, allowing code execution on workers via Jinja template injection in TaskFlow decorators.
  • The vulnerability arises because Jinja templates are rendered a second time after the task runner has already processed them, causing values in env, op_args, op_kwargs, or prompts to be evaluated as executable templates.
  • Attackers with only Dag trigger permissions or control over text passed into decorators (e.g., tickets or documents) can execute arbitrary commands and read connection passwords and Variables in affected deployments.
  • The flaw is classified as CWE-1336 (Improper Neutralization of Special Elements Used in a Template Engine) and is rated as a primary weakness in MITRE's hierarchy, applicable to Python and other interpreted languages.
  • Patches are available in apache-airflow-providers-standard 1.22.0, apache-airflow-providers-cncf-kubernetes 11.0.0, apache-airflow-providers-common-sql 3.0.0, and apache-airflow-providers-common-ai 1.2.0 or later.

Background

Recent vulnerabilities in other software, such as Webmin's root code execution flaw (CVE-2026-134638) and simple-git's command injection issue (CVE-2026-134815), highlight ongoing risks in open-source tools. Additionally, AutoGPT's Jinja filter memory exhaustion flaw (CVE-2026-132256) underscores the importance of proper template handling in AI and automation frameworks. Apache Airflow's CVE-2026-120353 joins this trend, emphasizing the need for rigorous input validation and template neutralization in widely used data orchestration platforms.

Why it matters

This vulnerability poses a severe risk to organizations using Apache Airflow for data pipelines, as it allows attackers to execute arbitrary code on workers and access sensitive credentials. The flaw's exploitability through limited permissions or controlled text inputs makes it particularly dangerous in multi-user environments. Prompt patching is critical to prevent potential breaches and maintain the integrity of automated workflows.

What to watch

Users should immediately upgrade their Apache Airflow providers to the patched versions (standard 1.22.0, kubernetes 11.0.0, common-sql 3.0.0, common-ai 1.2.0) to mitigate CVE-2026-120353. Organizations should also audit their Dag configurations to ensure no untrusted input is passed into affected decorators and monitor for any suspicious activity on their workers.

Share this article

Want the full story? Read the original reporting

Read on CVEs | Zero Wire | Cloudflare Radar