CVE-2023-22884: Apache Airflow Command Injection Vulnerability

airflow Updated 02 Oct 2025

Summary

06/03/2024
Yes i
Critical
Not published

CVE-2023-22884: Apache Airflow, Apache Airflow MySQL Provider: Arbitrary file read via MySQL provider in Apache Airflow. Affects airflow versions < 2.5.1. Fixed in 2.5.1. How to fix ↓

Also tracked for

The same CVE-2023-22884 is tracked separately for each ecosystem and vendor. Its fix information is the same; the package and affected versions differ.

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Sponsored MarkAI Find prospects already talking about the problem you solve AI watches the communities your customers use to find qualified prospects, then alerts you when a conversation is worth joining. See MarkAI

Background

Apache Airflow is an open-source platform used for programmatically authoring, scheduling, and monitoring workflows. It provides a rich set of tools and features for managing complex data pipelines. The Apache Airflow MySQL Provider is a plugin that allows Airflow to interact with MySQL databases. This vulnerability affects versions of Apache Airflow prior to 2.5.1 and Apache Airflow MySQL Provider prior to 4.0.0.

Vulnerability Detail

The vulnerability identified as CVE-2023-22884 is an instance of Command Injection. It occurs due to improper neutralization of special elements used in a command. An attacker can exploit this vulnerability by injecting malicious commands into certain input fields, leading to arbitrary command execution. This can result in various consequences, including unauthorized access, data manipulation, and system compromise. The severity of this vulnerability is rated as Critical with a CVSS v3 score of 9.8 (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H).

How To Fix

Minimum fixed version

2.5.1

This is the first release that contains the fix.

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

As a temporary workaround, it is advised to sanitize and validate user input before using it in command execution. This can be achieved by implementing input validation and using parameterized queries or prepared statements to prevent command injection attacks. Here is an example of input validation in Python using the subprocess module:

import subprocess

user_input = input('Enter a command: ')

# Validate and sanitize user input
if not user_input.isalnum():
    print('Invalid input')
    exit()

# Execute the command
subprocess.run(['ls', user_input])

Conclusion

In conclusion, the CVE-2023-22884 vulnerability in Apache Airflow and Apache Airflow MySQL Provider allows for command injection, potentially leading to unauthorized access and system compromise. It is crucial to upgrade to the latest versions of these packages and implement proper input validation to mitigate this vulnerability. For further support and assistance in vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for airflow →

Share this vulnerability

FAQ

Apache Airflow is an open-source platform used for programmatically authoring, scheduling, and monitoring workflows. It provides a rich set of tools and features for managing complex data pipelines.

Command Injection is a vulnerability that occurs when an application allows user-supplied input to be executed as a command. Attackers can exploit this vulnerability by injecting malicious commands, leading to arbitrary command execution.

This vulnerability can result in unauthorized access, data manipulation, and system compromise. Attackers can execute arbitrary commands, potentially gaining control over the affected system.

To mitigate this vulnerability, it is recommended to upgrade to Apache Airflow version 2.5.1 or later and Apache Airflow MySQL Provider version 4.0.0 or later. Additionally, implement input validation and use parameterized queries or prepared statements to prevent command injection attacks.

You can find more information about this vulnerability in the Apache Airflow vulnerability database: [link to vulnerability details]

Related vulnerabilities

Recent vulnerabilities recorded for airflow.

How To Fix

Minimum fixed version

2.5.1

This is the first release that contains the fix.

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback