S4E just found a high-severity finding from top 10 tcp port service scan
PlatformPlansPartners
Resources
ToolsBlogDocs
Sign Up →
critical·Product Based Web Vulnerabilities·Updated Jan 3, 2024

CVE-2021-38540 Scanner

Targets the /api/v1/variables endpoint in Apache Airflow versions 2.0.0 to 2.1.3, allowing unauthenticated attackers to add or modify variables used in DAGs.

Est. Time~10 seconds
Scan TypeSingle Scan
Targetsurl
CostFree
3.3k
Times Used
continuous scan runs
5.1k
Continuously Checked
assets under CS
0
Vulnerabilities Found
confirmed findings
References
CVECVE-2021-38540
9.8
CVSS

The variable import endpoint was not protected by authentication in Airflow >=2.0.0, <2.1.3. This allowed unauthenticated users to hit that endpoint to add/modify Airflow variables used in DAGs, potentially resulting in a denial of service, information disclosure or remote code execution. This issue affects Apache Airflow >=2.0.0, <2.1.3.

Attack Vector
-
Privileges Req.
-
User Interaction
-
Affected
Apache Airflowby Apache Software Foundation
AFFECTED< 2.1.3SAFE ✓≥ 2.1.3
Updated Aug 19, 2026View on NVD →
Detail

Apache Airflow is a popular open-source platform designed for scheduling, monitoring, and managing complex workflows or batch jobs. It is widely used in data engineering and data science communities to automate the process of running batch jobs, managing workflows and dependencies, and monitoring job performance. With its powerful ecosystem, Airflow provides a flexible and scalable solution for large enterprises and small businesses alike.

CVE-2021-38540 is a critical authentication bypass vulnerability affecting Apache Airflow versions between 2.0.0 and 2.1.3. The vulnerability arises because the variable import endpoint lacks proper authentication checks, allowing unauthenticated HTTP requests to modify Airflow variables. This oversight occurs due to insufficient access control implementation in the REST API layer, specifically in the variable import functionality.

The vulnerable endpoint is the /api/v1/variables endpoint, which handles importing variables in bulk. An attacker can send a POST request to this endpoint without any authentication token or session, and the server will process the request, adding or updating variables in the Airflow database. The vulnerability exists in the variable import function within the Airflow REST API, which fails to verify user identity before executing variable modifications.

If exploited, this vulnerability can lead to severe consequences including denial of service by flooding the system with malicious variables, information leakage by modifying variables that control data access, and potential remote code execution if variables are used in DAGs that execute shell commands. Attackers can manipulate workflow behavior, exfiltrate sensitive data, or deploy ransomware payloads, compromising the entire Airflow deployment and connected systems.

Solution Advice
  • Upgrade Apache Airflow to version 2.1.3 or later, which includes the official fix for CVE-2021-38540.
  • Implement authentication for all API endpoints, especially the variable import endpoint, using strong mechanisms like OAuth2 or LDAP.
  • Restrict network access to the Airflow web server using firewalls or VPNs to allow only trusted IP addresses.
  • Enable logging and monitoring on the variable import endpoint to detect unauthorized access attempts.
  • Apply the principle of least privilege by limiting variable modification permissions to specific admin users only.
  • Use web application firewalls (WAF) to block unauthenticated requests to sensitive API endpoints.
  • Regularly audit Airflow configurations and variables for unexpected changes that may indicate exploitation.
  • Implement multi-factor authentication for all Airflow user accounts to add an extra layer of security.

Get AI-powered remediation steps tailored to your asset.

Try AI Solutions →

Check your infrastructure.
Right now.

11,000+ scanners. Free to start. No credit card required.

Apache Airflow Variable Import Scanner | S4E Free Check