Skip to content
Access control Disclosed report Intermediate CVE-2024-25128

CVE-2024-25128: Apache Airflow: Authentication Bypass when Legacy OpenID(2.0) is in use as AUTH_TYPE

When Apache Airflow is configured to use the legacy OpenID 2.0 authentication method, the backend fails to validate that the OpenID provider URL supplied in the login request is on the configured list of trusted providers. An attacker can therefore point the login at their own OpenID provider and be authenticated as any existing Airflow account.

parantheses Follow

Originally disclosed on HackerOne

  • Triaged in 4 hours
  • Fixed in 25 days
  • Paid in 25 days
  • Disclosed after 55 days

Summary by the program

CVE-2024-25128: Vulnerability in custom, long deprecated OpenID (NOT OIDC) authentication method in Flask AppBuilder

Severity: moderate

Affected versions:

  • Apache Airflow before 2.8.2

Description:

When Flask-AppBuilder configuration is set to AUTH_TYPE set to AUTH_OID, it allows an attacker to forge an HTTP request that could deceive the backend into using any requested OpenID service.

This vulnerability could grant an attacker unauthorised privilege access if a custom OpenID service is deployed by the attacker and accessible by the backend.

For more details and remediation, see the blog post here: https://airflow.apache.org/blog/fab-oid-vulnerability/

Credit: Islam Rzayev (finder)

Full Security Advisory: https://lists.apache.org/thread/kf5kyfl6626kmp1wlxm6h0gk7vobny0y

The report

When OpenID(2.0) is in use as Authentication Type, it is possible for an attacker to forge authentication to any existing account in the Target Airflow installation. This was possible via deceiving the backend of app to trust arbitrary OpenID 2.0 Identity Provider(even if the provider is not in the trusted IDP list in config). In conclusion, an attacker could deploy their own IDP and could alter the target app's authentication fully and gain unauthorized access.

The Impact is Critical but as OpenID(2.0) is a legacy mechanism, the severity was lowered to Medium on the basis of low usage probability.

Details:

Airflow uses Flask-AppBuilder as basic authenication and authorization manager under the hood. It is possible to configure the service in the Airflow config file for desired Authentication option. The Options for using OpenID 2.0 as auth type is as following:

  1. AUTH_TYPE = AUTH_OID should be defined
  2. Uncommenting the following lines:
unnamed.png
unnamed.png From the original on HackerOne

As it is seen from the attachment, there is a predefined list of allowed IDPs, normally the backend should have checked for provided values(idp urls) from client with the allowed idp list in backend, but didn't.

Attack flow

When OpenID(2.0) is enabled, the login page of Airflow looks like this:

image.png
image.png From the original on HackerOne

Selecting a provider from list and clicking Sign In button triggers a request like this:

image.png
image.png From the original on HackerOne

The one body parameter of this POST request to /login/ page, openid is used to define IDP provider Url. An attacker could change this url to their malicious IDP and can make a fake authentication and deceive the backend to trust it(as the allowed providers check wasn't properly done). For a quick Proof of Concept demonstration, 'https://openstackid.org' idp can be used:

image.png
image.png From the original on HackerOne

After successful auth with provider, the attacker will be redirected to Airflow and logged in as target existing user account:

image.png
image.png From the original on HackerOne

Leading to Full Account Hijacking

Advisory and Acknowledgement Details

The Project Advisory: https://lists.apache.org/thread/kf5kyfl6626kmp1wlxm6h0gk7vobny0y

The Github Advisory: https://github.com/dpgaspar/Flask-AppBuilder/security/advisories/GHSA-j2pw-vp55-fqqj

Screenshot of email from the Team for Acknowledgement:

████

Extra screenshot, from a part of report email:

██████████

Impact

Full Authentication Bypass via deceiving the backend server to trust arbitrary OpenID(2.0) IDPs.

The original report as published on HackerOne, by parantheses. Images and videos are our own copies; raw HTML is shown as text. View it on HackerOne.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

How it worked

Root cause

The backend did not properly check the client-supplied OpenID provider URL against the configured list of allowed identity providers.

Impact

An attacker could fully hijack any existing Airflow account, but only when the legacy OpenID 2.0 authentication type is enabled, which is why the severity was lowered to medium.

What the attacker needed

Airflow configured with AUTH_TYPE = AUTH_OID; Attacker controls an OpenID 2.0 provider; Backend can reach the attacker's provider

The fix

The text refers to a blog post for remediation but does not describe the fix itself; it should be fixed by validating the supplied OpenID provider URL against the configured allow-list.

How it was found

  1. Configure Airflow to use OpenID 2.0 as the authentication type.
  2. Open the Airflow login page and select a provider, which sends a POST request to /login/ with an openid parameter.
  3. Change the openid parameter to point to an attacker-controlled identity provider.
  4. Complete authentication with that provider and get redirected back to Airflow, now logged in as the target user.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

OpenID 2.0 is an old way for a website to let you log in through another service, like a trusted identity provider. The Airflow backend was supposed to check that the provider you chose was on its approved list, but it did not. So an attacker could set up their own provider, choose it at login, and the site would believe them and log them in as someone else.

What is Access control?

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.

More from Internet Bug Bounty

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Broken access control

The lesson behind this report.

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.