Summary
Apache Airflow's scheduler deserializes human-in-the-loop task data without applying an appropriate class allow-list. A DAG author who can control the task execution data may cause arbitrary module imports and object instantiation in the scheduler process, or disrupt scheduler operation.
Affected context
The vulnerability affects Apache Airflow 3.3.0 deployments using human-in-the-loop tasks that transition into the awaiting_input state. During a periodic scheduler sweep, the task instance's next_kwargs value is deserialized without the expected allow-list, and the default allowed_deserialization_classes setting does not protect this code path. Earlier Airflow versions use a different triggerer-based workflow and are not affected by this specific path.
Exploit preconditions
- Attack surface: Airflow task execution and scheduler processing
- Required access: Ability to author or control a DAG and supply task execution data through the human-in-the-loop task API
- Trigger point: Scheduler processing of an
awaiting_inputtask during its periodic sweep - Why exploitation is possible: The scheduler deserializes attacker-influenced
next_kwargswithout enforcing an effective class allow-list, permitting module imports and object construction inside the scheduler process
Why this happens
The underlying flaw is unsafe deserialization of attacker-influenced task metadata. The scheduler treats serialized values as trusted object descriptions and processes them without restricting the classes or modules that may be resolved. This behavior maps to CWE-502: Deserialization of Untrusted Data, because deserialization can invoke object construction or related import behavior before the data is safely constrained.
Potential impact
- An attacker may execute code or trigger unintended behavior in the scheduler process.
- An attacker could terminate or destabilize the scheduler job.
- Workflow scheduling and task coordination could be disrupted.
- Scheduler-level access could enable further compromise depending on process privileges and deployment isolation.
General mitigation guidance
Mitigation generally focuses on preventing untrusted task metadata from reaching unrestricted deserialization logic.
Common defensive patterns include:
- Applying a strict, centrally enforced allow-list for deserializable classes and modules on every code path.
- Replacing general-purpose object deserialization with typed, schema-constrained data formats.
- Treating DAG-authored task parameters and execution API values as untrusted input.
- Separating scheduler privileges from worker and control-plane privileges.
- Using process isolation, restrictive service accounts, and minimal filesystem and network permissions.
- Ensuring security fixes cover all state-transition and background-sweep paths rather than only the primary execution path.
How teams detect issues like this
Organizations can look for:
- Static-analysis findings involving unrestricted deserialization, dynamic imports, or reflective object construction.
- Code review signals where scheduler or background-task code processes DAG-controlled values without schema and class restrictions.
- Tests that exercise every task-state transition and periodic sweep with unexpected serialized values.
- Runtime monitoring for unusual module imports, scheduler process termination, or unexpected child-process and network activity.
- Policy checks requiring approved serialization formats and centrally defined deserialization allow-lists.
Automated security review tools may help identify unsafe parser and object-resolution patterns, but should be supplemented with state-machine and integration testing.

