Apache Airflow: Stored XSS Vulnerability on provider link
Description
Apache Airflow, versions before 2.10.0, have a vulnerability that allows the developer of a malicious provider to execute a cross-site scripting attack when clicking on a provider documentation link. This would require the provider to be installed on the web server and the user to click the provider link. Users should upgrade to 2.10.0 or later, which fixes this vulnerability.
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
Apache Airflow before 2.10.0 contains a stored XSS vulnerability that allows a malicious provider developer to inject scripts via provider documentation links.
Vulnerability
CVE-2024-41937 is a stored cross-site scripting (XSS) vulnerability in Apache Airflow, affecting versions prior to 2.10.0. The flaw lies in how provider documentation links are handled, enabling a malicious provider developer to inject arbitrary JavaScript code into the Airflow web interface. When an authenticated user clicks on this link, the injected script executes within the user's browser session [2][3].
Exploitation
Prerequisites
Exploitation requires two conditions: first, the attacker must be a developer of a provider that is installed on the Airflow web server; second, a victim user must click the specially crafted provider documentation link. The attack does not require the attacker to have direct access to the server beyond provider installation privileges [3].
Impact
If successful, the attacker can perform actions within the context of the victim's session, such as stealing authentication tokens, accessing sensitive workflow data, or performing administrative actions on behalf of the user. The severity is rated as low due to the required preconditions [3].
Mitigation
The vulnerability has been fixed in Apache Airflow version 2.10.0. Users are advised to upgrade their Airflow installations to this version or later to prevent exploitation [2][3].
AI Insight generated on May 20, 2026. Synthesized from this CVE's description and the cited reference URLs; citations are validated against the source bundle.
Affected packages
Versions sourced from the GitHub Security Advisory.
| Package | Affected versions | Patched versions |
|---|---|---|
apache-airflowPyPI | < 2.10.0 | 2.10.0 |
Affected products
9- osv-coords8 versionspkg:apk/chainguard/airflowpkg:apk/chainguard/airflow-bitnami-compatpkg:apk/chainguard/airflow-compatpkg:apk/wolfi/airflowpkg:apk/wolfi/airflow-bitnami-compatpkg:apk/wolfi/airflow-compatpkg:bitnami/airflowpkg:pypi/apache-airflow
< 2.10.0-r0+ 7 more
- (no CPE)range: < 2.10.0-r0
- (no CPE)range: < 2.10.0-r0
- (no CPE)range: < 2.10.0-r0
- (no CPE)range: < 2.10.0-r0
- (no CPE)range: < 2.10.0-r0
- (no CPE)range: < 2.10.0-r0
- (no CPE)range: < 2.10.0
- (no CPE)range: < 2.10.0
- Apache Software Foundation/Apache Airflowv5Range: 0
Patches
1f1852c2ab28bValidating provider documentation urls before displaying in views (#40933)
2 files changed · +41 −2
airflow/utils/docs.py+10 −2 modified@@ -39,17 +39,25 @@ def get_docs_url(page: str | None = None) -> str: return result +def get_project_url_from_metadata(provider_name: str): + """Return the Project-URL from metadata.""" + return metadata.metadata(provider_name).get_all("Project-URL") + + def get_doc_url_for_provider(provider_name: str, provider_version: str) -> str: """Prepare link to Airflow Provider documentation.""" try: - metadata_items = metadata.metadata(provider_name).get_all("Project-URL") + from urllib.parse import urlparse + + metadata_items = get_project_url_from_metadata(provider_name) if isinstance(metadata_items, str): metadata_items = [metadata_items] if metadata_items: for item in metadata_items: if item.lower().startswith("documentation"): _, _, url = item.partition(",") - if url: + parsed_url = urlparse(url) + if url and (parsed_url.scheme in ("http", "https") and bool(parsed_url.netloc)): return url.strip() except metadata.PackageNotFoundError: pass
tests/www/views/test_views.py+31 −0 modified@@ -32,6 +32,7 @@ write_webserver_configuration_if_needed, ) from airflow.plugins_manager import AirflowPlugin, EntryPointSource +from airflow.utils.docs import get_doc_url_for_provider from airflow.utils.task_group import TaskGroup from airflow.www.views import ( ProviderView, @@ -180,6 +181,36 @@ def test__clean_description(admin_client, provider_description, expected): assert actual == expected +@pytest.mark.parametrize( + "provider_name, project_url, expected", + [ + ( + "apache-airflow-providers-airbyte", + "Documentation, https://airflow.apache.org/docs/apache-airflow-providers-airbyte/3.8.1/", + "https://airflow.apache.org/docs/apache-airflow-providers-airbyte/3.8.1/", + ), + ( + "apache-airflow-providers-amazon", + "Documentation, https://airflow.apache.org/docs/apache-airflow-providers-amazon/8.25.0/", + "https://airflow.apache.org/docs/apache-airflow-providers-amazon/8.25.0/", + ), + ( + "apache-airflow-providers-apache-druid", + "Documentation, javascript:prompt(document.domain)", + # the default one is returned + "https://airflow.apache.org/docs/apache-airflow-providers-apache-druid/1.0.0/", + ), + ], +) +@patch("airflow.utils.docs.get_project_url_from_metadata") +def test_get_doc_url_for_provider( + mock_get_project_url_from_metadata, admin_client, provider_name, project_url, expected +): + mock_get_project_url_from_metadata.return_value = [project_url] + actual = get_doc_url_for_provider(provider_name, "1.0.0") + assert actual == expected + + def test_endpoint_should_not_be_unauthenticated(app): resp = app.test_client().get("/provider", follow_redirects=True) check_content_not_in_response("Providers", resp)
Vulnerability mechanics
Generated on May 9, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.
References
7- github.com/apache/airflow/pull/40933ghsapatchWEB
- github.com/advisories/GHSA-w7cp-g8v7-r54mghsaADVISORY
- lists.apache.org/thread/lwlmgg6hqfmkpvw5py4w53hxyl37jl6dghsavendor-advisoryWEB
- nvd.nist.gov/vuln/detail/CVE-2024-41937ghsaADVISORY
- www.openwall.com/lists/oss-security/2024/08/21/3ghsaWEB
- github.com/apache/airflow/commit/f1852c2ab28b155e196569780013fbb61a4a1f98ghsaWEB
- github.com/pypa/advisory-database/tree/main/vulns/apache-airflow/PYSEC-2024-181.yamlghsaWEB
News mentions
0No linked articles in our index yet.