Summary
A permission mapping flaw in Apache Airflow's FAB auth manager causes a DAG named DAGs to collide with the global all-DAGs permission resource.
When per-DAG access is granted on this specific DAG, the user is silently given read and edit permissions across all DAGs, enabling unintended privilege escalation in environments using per-DAG access_control.
Affected context
This issue occurs in Apache Airflow deployments that:
- Use the FAB auth manager and per-DAG
access_control - Define a DAG whose
dag_idis exactlyDAGs - Rely on resource names generated by
resource_name()for permission scoping
Under these conditions, the per-DAG permission for the DAGs DAG overlaps with the global all-DAGs resource, leading to broader access than intended for affected users.
Exploit preconditions
- Attack surface: Airflow web UI and API permission system
- Required access: Ability of an administrator or permission manager to assign per-DAG access for a DAG named
DAGs - Trigger point: Granting per-DAG
access_controlon theDAGsDAG using FAB auth - Why exploitation is possible: The
resource_name()function produces an identical resource identifier for the global all-DAGs permission and for the specific DAGdag_idofDAGs, causing a collision that merges scoped and global permissions.
Why this happens
The underlying problem is an authorization design flaw where resource identifiers used for access control are not guaranteed to be unique between global and per-object scopes.
In this case, the Airflow FAB auth manager's resource_name() function generates the same resource name for the global "all DAGs" permission and for a specific DAG whose dag_id is DAGs, which maps to CWE-269: Improper Privilege Management.
Because the system cannot distinguish between the global and per-DAG resource, granting access to the DAGs DAG effectively assigns global DAG permissions, violating the intended access boundaries.
Potential impact
- A lower-privileged user may gain read access to all DAG definitions
- A user could edit, pause, or unpause any DAG in the environment
- Unintended modification of production workflows can occur
- Sensitive operational logic and configuration embedded in DAGs may be exposed
General mitigation guidance
Mitigation generally focuses on strengthening authorization boundaries and ensuring unambiguous resource identifiers.
Common defensive patterns include:
- Designing access-control resource names so that global and per-object scopes cannot collide (e.g., explicit namespacing or prefixing)
- Validating that identifiers derived from user-controlled fields (like
dag_id) cannot overlap with reserved or global resource names - Applying least-privilege principles when granting per-DAG access and reviewing existing assignments for unintended broad permissions
- Introducing guardrails in permission-management workflows, such as warnings or checks when granting access to resources with special or reserved identifiers
How teams detect issues like this
High-level detection approaches include:
- Reviewing Airflow permission mappings for cases where per-DAG access on a single DAG implicitly grants global DAG permissions
- Inspecting configuration and audit logs for assignments of
access_controlto a DAG namedDAGsand correlating them with effective permissions - Using policy checks or custom scripts to verify that resource identifiers used in authorization systems are unique and do not overlap with reserved global names
- Incorporating static or configuration analysis in CI/CD pipelines to flag risky identifier patterns or ambiguous resource naming schemes

