/

CVE-2026-67587

Severity:

HIGH RISK

(8.8)

Unsafe Deserialization (CWE-502) in Airflow Task SDK

CVE-2026-67587

Analyzed

Vulnerability type

Category:

Unsafe Deserialization

CWE:

CWE-502

Impact:

Arbitrary Module Import in the Scheduler

Severity:

HIGH RISK

(8.8)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

Apache Airflow's Task SDK reconstructs callback objects from serialized task data by re-running a constructor that imports the module named in a stored callback path. A DAG author who can control a task instance's next_kwargs may cause an arbitrary module to be imported in the scheduler process when the awaiting_input timeout sweep deserializes that data.

Affected context

The vulnerability affects Apache Airflow deployments using versions in which the scheduler's awaiting_input timeout sweep processes serialized task data and the Task SDK rebuilds Callback objects. It becomes relevant when a DAG author can control a task instance's next_kwargs through the task execution API; the scheduler then deserializes that value during its unconditional timeout sweep. The default deserialization class allow-list does not prevent this path because SyncCallback is recognized as an Airflow class.

Exploit preconditions

  • Attack surface: Airflow task execution and scheduler deserialization
  • Required access: Ability to author a DAG and control a task instance's next_kwargs through the task execution API
  • Trigger point: The scheduler's awaiting_input timeout sweep
  • Required configuration: No non-default configuration is required because the sweep runs unconditionally
  • Why exploitation is possible: Reconstructing the callback re-runs a constructor that imports the module identified by serialized callback data, while the relevant callback class passes the configured allow-list

Why this happens

The underlying bug is an unsafe deserialization design in which serialized callback data is treated as sufficient authority to reconstruct an object. Re-running a constructor during deserialization permits attacker-influenced module paths to reach dynamic import behavior before the data has been reduced to a tightly validated representation. This maps to CWE-502: Deserialization of Untrusted Data. Relying on a broad class allow-list is insufficient when an allowed class performs imports based on serialized fields.

Potential impact

  • An attacker may cause arbitrary modules to be imported in the scheduler process.
  • Imported module initialization code could run with the scheduler's privileges.
  • The scheduler's confidentiality, integrity, or availability could be affected.
  • A compromised scheduler process could enable further access to Airflow-managed resources.

General mitigation guidance

Mitigation generally focuses on removing executable behavior from deserialization and reducing trust in task-controlled fields.

Common defensive patterns include:

  • Deserialize callback data into inert, schema-validated records rather than reconstructing executable objects.
  • Resolve callback implementations from server-controlled identifiers instead of attacker-influenced module paths.
  • Keep constructors and deserialization hooks free of dynamic imports and other side effects.
  • Apply strict field, type, and value validation before any callback resolution occurs.
  • Run scheduler components with least privilege and isolate access to credentials, metadata, and worker resources.
  • Treat deserialization allow-lists as a defense-in-depth control rather than a substitute for non-executable parsing.

How teams detect issues like this

Detection can combine static analysis, code review, runtime telemetry, and policy enforcement:

  • Search for deserialization code that re-runs constructors or resolves imports from serialized fields.
  • Review callback reconstruction paths for module-path, class-name, or plugin resolution driven by task data.
  • Flag deserialization allow-lists that permit classes with import, execution, or other side-effecting behavior.
  • Monitor scheduler processes for unexpected module loads, filesystem access, or child-process activity during timeout processing.
  • Enforce CI policies requiring inert schemas and approved registries for callback or plugin resolution.
  • Automated code review tools may help identify dynamic imports and unsafe object reconstruction patterns.

Sources

SourceLink
github.comgithub.com/apache/airflow/pull/70704
lists.apache.orglists.apache.org/thread/o00ww4n69qojvsckb464dtwd2nhzy6t0
cve.orgcve.org/CVERecord?id=CVE-2026-58076
cve.orgcve.org/CVERecord?id=CVE-2026-67260

Frequently asked

questions

Exploitation is not necessarily unauthenticated. It generally requires DAG-authoring privileges and the ability to control a task instance's next_kwargs through the task execution API, after which the scheduler processes the data.

Not by itself. The relevant callback class is accepted as an Airflow class, while its reconstruction behavior can import a module named by serialized data.

Use inert, schema-validated representations for callbacks and resolve implementations only from server-controlled identifiers or a fixed trusted registry.

Avoid constructors with side effects during deserialization, prohibit attacker-controlled dynamic imports, validate task-controlled fields strictly, and run scheduler components with least privilege.

Find out what's already
exploitable in your codebase.