/

CVE-2026-40913

Severity:

HIGH RISK

(8.2)

Improper Authorization (CWE-285) in Airflow Import Errors

CVE-2026-40913

Awaiting Analysis

Vulnerability type

Category:

Improper Authorization

CWE:

CWE-285

Impact:

Unauthorized Information Disclosure

Severity:

HIGH RISK

(8.2)

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 public Import Errors API can disclose raw parse-failure stack traces to users who have the ImportError.can_read permission, even when they should not be able to view details about the affected file. The traces may reveal file paths and code when a file has no registered DAGs.

Affected context

The issue occurs in Apache Airflow's public Import Errors API when a file's parse error remains but the file has no registered DAG. This can happen if parsing fails before a DAG is defined, or if all previously registered DAGs have been removed while the error remains. In these cases, the API returns the raw stack trace to users with ImportError.can_read, rather than requiring the more restrictive permission intended for viewing all import errors.

Exploit preconditions

  • Attack surface: Apache Airflow's public Import Errors API
  • Required access: An account with the ImportError.can_read permission
  • Trigger point: Reading an import error for a file with no registered DAG
  • Why exposure is possible: Authorization does not sufficiently restrict access to the stack trace when no DAG is associated with the failing file

Why this happens

The API's authorization logic does not consistently apply the appropriate access control to raw parse-failure details. When a failing file has no registered DAG, the response exposes its stack trace to a user with a general import-error read permission. This is an authorization flaw mapped to CWE-285: Improper Authorization: access to sensitive information is not adequately checked against the intended permission boundary.

Potential impact

  • Stack traces may disclose internal file paths or code
  • An attacker with the required permission could learn details about application structure
  • Exposed information could help inform further attacks

General mitigation guidance

Mitigation generally focuses on enforcing authorization at the point where sensitive error details are returned.

Common defensive patterns include:

  • Require a narrowly scoped permission to view raw stack traces
  • Apply the same access checks whether or not a file has a registered DAG
  • Return sanitized error summaries to users without elevated access
  • Follow least-privilege principles when assigning API permissions
  • Test authorization behavior across missing, removed, and successfully registered resources

How teams detect issues like this

Teams can review API handlers and authorization policies for cases where access checks depend on resource-registration state.

  • Use static analysis or code review to find sensitive response fields returned without an explicit permission check
  • Test API responses for users with different permission levels and for files with no associated DAG
  • Use policy tests to verify that stack traces are visible only to appropriately authorized roles
  • Monitor access to import-error details and investigate unexpected retrieval patterns

Sources

SourceLink
github.comgithub.com/apache/airflow/pull/69790
lists.apache.orglists.apache.org/thread.html/t04l76dtx12m5cw8zfsnzo9r5rqnw0qv
openwall.comopenwall.com/lists/oss-security/2026/11/09/3

Frequently asked

questions

A user with the ImportError.can_read permission may receive them when the failing file has no registered DAG.

The described access requires an Airflow account with the relevant permission; the issue is not described as unauthenticated access.

Check a dedicated, narrowly scoped permission before returning raw stack traces, regardless of whether the file has a registered DAG.

Apply consistent authorization checks to sensitive API fields and test access controls across resource lifecycle states, including missing or removed resources.

Find out what's already
exploitable in your codebase.