/

CVE-2026-111421

Severity:

HIGH RISK

(8.8)

Unsafe Deserialization (CWE-502) in Airflow Task API

CVE-2026-111421

Awaiting Analysis

Vulnerability type

Category:

Unsafe Deserialization

CWE:

CWE-502

Impact:

Unsafe server-side object instantiation

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 Execution API can store task-written XCom values without applying the reserved-key check used elsewhere. If a user later views the value through the API with deserialization enabled, a Dag author may cause the API server to instantiate classes in the airflow.* namespace with author-chosen arguments.

Affected context

The issue is in the Task Execution API's handling of XCom values written by tasks. It becomes risky when a Dag author can write a crafted value and a user later views that value through the API with deserialization enabled. This is an incomplete fix for CVE-2026-59242; applying the earlier fix in Apache Airflow 3.3.1 does not address this route.

Exploit preconditions

  • Attack surface: The Task Execution API's storage and retrieval of XCom values
  • Required access: Ability to author or modify a Dag task that writes an XCom value
  • Trigger point: A user views the stored value through the API with deserialization enabled
  • Why exploitation is possible: This API route does not apply the reserved-key check used elsewhere, allowing the value to request instantiation of classes in the airflow.* namespace with arguments chosen by the Dag author

Why this happens

The API route handles task-written serialized data without consistently enforcing the reserved-key safeguards applied in other paths. Deserializing attacker-influenced data can instantiate objects based on its contents, which is an unsafe deserialization pattern covered by CWE-502.

Potential impact

  • The API server may instantiate unexpected Airflow classes with attacker-chosen arguments.
  • Depending on the classes involved and their behavior, server-side operations or resource access could be affected.
  • The API server's confidentiality, integrity, or availability could be put at risk.

General mitigation guidance

Defensive patterns include avoiding deserialization of task-controlled values, using restricted formats that represent data rather than objects, and consistently enforcing reserved-key checks across all XCom write and read paths. Treat task-authored values as untrusted, validate them against strict schemas, and limit the API server's privileges so that deserialization failures or unexpected object behavior have less impact.

How teams detect issues like this

  • Review XCom write and read paths for consistent reserved-key checks and safe deserialization behavior.
  • Use static analysis to identify deserialization APIs that can instantiate classes from untrusted data.
  • Check code reviews and security policies for paths where task-controlled values reach API responses or object constructors.
  • Monitor API access and errors associated with XCom retrieval and deserialization.

Sources

SourceLink
github.comgithub.com/apache/airflow/pull/72718
github.comgithub.com/apache/airflow/pull/74829
lists.apache.orglists.apache.org/thread.html/pwdwx354tv0x3m8wzfhh59r6wyztj2lk
cve.orgcve.org/CVERecord?id=CVE-2026-59242

Frequently asked

questions

A Dag author may write a crafted XCom value. The relevant trigger occurs later when a user views that value through the API with deserialization enabled.

The described route requires the ability to author or modify a task that writes an XCom; the later API view triggers deserialization.

Avoid deserializing task-controlled data into objects. Use restricted data formats and apply consistent validation and reserved-key checks.

Treat task-authored values as untrusted, review every serialization path, and enforce safe parsing and least privilege throughout the API.

Find out what's already
exploitable in your codebase.