CVE-2025-30473

8.8 HIGH

📋 TL;DR

This SQL injection vulnerability in Apache Airflow Common SQL Provider allows authenticated UI users to inject arbitrary SQL commands via the partition_clause parameter in SQLTableCheckOperator. This enables privilege escalation to execute unauthorized database operations. It affects all Apache Airflow installations using Common SQL Provider before version 1.24.1.

💻 Affected Systems

Products:
  • Apache Airflow Common SQL Provider
Versions: All versions before 1.24.1
Operating Systems: All operating systems running Apache Airflow
Default Config Vulnerable: ⚠️ Yes
Notes: Vulnerability exists when using partition clause in SQLTableCheckOperator as parameter, which was a recommended pattern.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete database compromise including data exfiltration, modification, deletion, or remote code execution on the database server.

🟠

Likely Case

Unauthorized data access, privilege escalation within the database, and potential data manipulation.

🟢

If Mitigated

Limited to authenticated user access scope with proper input validation and parameterized queries.

🌐 Internet-Facing: HIGH if Airflow UI is exposed to the internet, as authenticated users can exploit this vulnerability.
🏢 Internal Only: HIGH as authenticated internal users can still exploit this vulnerability to escalate privileges.

🎯 Exploit Status

Public PoC: ✅ No
Weaponized: UNKNOWN
Unauthenticated Exploit: ✅ No
Complexity: LOW

Exploitation requires authenticated UI user access and knowledge of SQL injection techniques.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 1.24.1

Vendor Advisory: https://lists.apache.org/thread/53klkv790cylqcop0350w7nfq1y6h0t2

Restart Required: Yes

Instructions:

1. Stop Airflow services. 2. Upgrade Apache Airflow Common SQL Provider to version 1.24.1 using pip: 'pip install --upgrade apache-airflow-providers-common-sql==1.24.1'. 3. Restart Airflow services.

🔧 Temporary Workarounds

Disable SQLTableCheckOperator with partition_clause parameter

all

Remove or disable usage of SQLTableCheckOperator with partition_clause parameter in DAG configurations.

Review and modify DAG files to remove partition_clause parameter usage in SQLTableCheckOperator

Implement input validation

all

Add custom input validation for partition_clause parameter before passing to SQLTableCheckOperator.

Implement parameter validation in DAG code to sanitize partition_clause input

🧯 If You Can't Patch

  • Restrict Airflow UI access to only trusted users with minimal necessary privileges.
  • Implement network segmentation to isolate Airflow instances from critical database systems.

🔍 How to Verify

Check if Vulnerable:

Check if Apache Airflow Common SQL Provider version is below 1.24.1 and if SQLTableCheckOperator with partition_clause parameter is used.

Check Version:

pip show apache-airflow-providers-common-sql | grep Version

Verify Fix Applied:

Verify installed version is 1.24.1 or higher and test SQLTableCheckOperator functionality with partition_clause.

📡 Detection & Monitoring

Log Indicators:

  • Unusual SQL queries in Airflow logs
  • Multiple failed authentication attempts followed by SQLTableCheckOperator usage
  • Unexpected database errors from Airflow processes

Network Indicators:

  • Unusual database connections from Airflow hosts
  • Suspicious SQL patterns in database query logs

SIEM Query:

source="airflow.logs" AND ("SQLTableCheckOperator" OR "partition_clause") AND (sql_injection_indicators OR error OR unauthorized)

🔗 References

📤 Share & Export