/

CVE-2026-96285

Severity:

HIGH RISK

(8.8)

Unsafe Deserialization (CWE-502) in Apache Airflow

CVE-2026-96285

Awaiting Analysis

Vulnerability type

Category:

Unsafe Deserialization

CWE:

CWE-502

Impact:

Execution of allow-listed constructors in Airflow service processes, potentially causing code execution or other side effects

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 deserializes task-controlled next_kwargs before checking that the decoded value is a dictionary. A DAG author who can set this value may cause constructors for allow-listed classes to run in the scheduler or, under certain API conditions, the API server.

Affected context

The issue concerns Airflow's handling of stored task next_kwargs values. The type check added in Airflow 3.3.1 happens after deserialization, so it cannot prevent constructors for permitted nested classes from running first. The scheduler may encounter the value during an awaiting_input timeout sweep; the API server may also encounter it when serving a task instance to a worker using an older Execution API version. No non-default configuration is required.

Exploit preconditions

  • Attack surface: Task data processed by the Airflow scheduler or, in the specified compatibility scenario, the API server
  • Required access: Ability to author a DAG and control its task's next_kwargs through the task execution API
  • Trigger point: The scheduler processes the task during an awaiting_input timeout sweep, or the API server serves the task instance to a worker using an older Execution API version
  • Why exploitation is possible: Deserialization constructs allow-listed nested objects before the subsequent dictionary-type check can reject the value

Why this happens

The underlying flaw is unsafe deserialization (CWE-502) combined with validation performed too late. The application reconstructs objects from stored data before establishing that the decoded value has the expected type. Because permitted classes can have constructors that run during reconstruction, a later type check does not prevent constructor execution.

Potential impact

  • Allow-listed constructors may run inside the scheduler or API server process
  • Constructor side effects could compromise the affected service process
  • Depending on the permitted classes and their behavior, this may enable code execution or affect service availability

General mitigation guidance

Mitigation patterns focus on preventing untrusted data from triggering object construction:

  • Prefer data-only serialization formats and restricted deserializers that do not instantiate application objects
  • Validate the serialized structure and enforce strict schemas before any object reconstruction
  • Minimize the classes permitted by deserialization allow-lists and avoid constructors with side effects
  • Treat task-supplied values as untrusted, even when stored internally
  • Apply least privilege and process isolation to scheduler and API service components
  • Keep compatibility paths subject to the same validation and deserialization safeguards

How teams detect issues like this

  • Use static analysis to identify deserialization APIs that reconstruct objects from task-controlled or otherwise untrusted data
  • Review code paths where validation occurs only after parsing or object construction
  • Check allow-lists for classes with constructor side effects or broad behavior
  • Enforce policies requiring data-only parsing and schema validation before use
  • Monitor task-processing services for unexpected constructor activity or anomalous process behavior
  • Automated code review tools may help flag unsafe deserialization and validation-order patterns

Sources

SourceLink
github.comgithub.com/apache/airflow/pull/73576
github.comgithub.com/apache/airflow/pull/73577
lists.apache.orglists.apache.org/thread.html/5grvgsjw0c47q0pko8vnfy35drj4jyck
cve.orgcve.org/CVERecord?id=CVE-2026-67260

Frequently asked

questions

A DAG author who can control a task's next_kwargs may be able to trigger the vulnerable processing paths.

No non-default configuration is required. The API-server path described applies when a worker uses an older Execution API version; the scheduler path can be triggered when its timeout sweep processes the task.

Avoid reconstructing application objects from task-controlled data. Use restricted, data-only deserialization and validate the schema before processing values.

Treat stored task data as untrusted, minimize deserialization allow-lists, ensure validation precedes object construction, and review compatibility paths for equivalent safeguards.

Find out what's already
exploitable in your codebase.