/

CVE-2026-58076

Severity:

HIGH RISK

(8.8)

Unsafe Deserialization (CWE-502) in Apache Airflow

CVE-2026-58076

Modified

Vulnerability type

Category:

Unsafe Deserialization

CWE:

CWE-502

Impact:

Arbitrary Code Execution

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 serialization layer can import and instantiate an unrestricted class named in serialized DAG data when reconstructing exception objects. A DAG author who can influence an operator's executor configuration may cause arbitrary callables to run in the Scheduler or API server, potentially compromising sensitive Airflow credentials and secrets.

Affected context

The vulnerability occurs in Airflow deployments that deserialize serialized DAG data through the exception reconstruction path. An operator's executor_config can reach this path, which is processed during the Scheduler's normal DAG loop and during authenticated API reads of DAG details. The affected components may possess metadata database credentials and the JWT signing secret, increasing the consequences of code execution.

Exploit preconditions

  • Attack surface: Serialized DAG processing in the Scheduler or authenticated API server
  • Required access: Ability to author or modify a DAG and place attacker-controlled values in an operator's executor_config
  • Trigger point: Reconstruction of serialized exception data during normal Scheduler processing or an authenticated DAG details read
  • Why exploitation is possible: The deserializer imports a class name from serialized data and instantiates it with attacker-influenced arguments without restricting the importable type to exception classes

Why this happens

The underlying bug is unsafe deserialization, mapped to CWE-502. The exception reconstruction logic treated a serialized class reference as trusted metadata, passed it to a dynamic import mechanism, and invoked the resulting object with serialized arguments. Because the imported type was not constrained to an approved exception hierarchy, data intended for reconstruction could instead be interpreted as executable behavior.

Potential impact

  • An attacker may execute arbitrary code in the Scheduler or API server process.
  • The compromise could expose or alter metadata database contents.
  • An attacker could potentially obtain or misuse the JWT signing secret.
  • DAG definitions, task behavior, or stored metadata could be modified or poisoned.
  • The vulnerable process may be used for lateral movement into connected infrastructure.

General mitigation guidance

Mitigation generally focuses on removing dynamic imports from deserialization paths and enforcing strict type restrictions.

Common defensive patterns include:

  • Restricting reconstructed objects to a narrowly defined exception base class or explicit allowlist.
  • Using schema-driven serialization formats that represent data rather than importable code.
  • Separating validation from object construction and rejecting unexpected class references before instantiation.
  • Limiting DAG-author permissions and protecting DAG sources and executor configuration from unauthorized modification.
  • Running Scheduler and API server components with least privilege and isolating their database and secret access.
  • Rotating potentially exposed credentials or signing material when compromise cannot be ruled out.

How teams detect issues like this

Organizations can look for:

  • Static analysis findings involving dynamic imports, reflection, or object construction during deserialization.
  • Code review signals showing class names or callables taken directly from serialized data.
  • Policies that prohibit executable references in DAG metadata and executor configuration.
  • Runtime monitoring for unexpected imports, process execution, or unusual child processes from Scheduler and API server components.
  • Audit events involving unexpected DAG changes, authenticated DAG-detail reads, metadata modifications, or secret access.

Automated code review and dependency-analysis tools may help identify similar unsafe deserialization patterns.

Sources

SourceLink
github.comgithub.com/apache/airflow/pull/68511
lists.apache.orglists.apache.org/thread/t81p688t15jozxsng8521o60nh2kfsos
cve.orgcve.org/CVERecord?id=CVE-2026-33264

Frequently asked

questions

It can be exploitable through normal Airflow operations when an attacker can author or alter a DAG and an authenticated user or the Scheduler causes the serialized DAG to be processed. It does not require a separate network request to the Scheduler if the DAG is processed in its normal loop.

The key prerequisite is the ability to influence serialized DAG content, particularly an operator's executor_config. API-triggered processing also requires authenticated access to a relevant DAG read operation.

Replace unrestricted dynamic imports and instantiation with schema-based parsing and strict allowlisting, permitting only approved exception types during reconstruction.

Treat serialized DAG data as untrusted input, prohibit executable references in configuration, apply least privilege to Airflow components, and use code review and runtime monitoring to detect unsafe deserialization behavior.

Find out what's already
exploitable in your codebase.