CVE-2024-25128: Flask-AppBuilder incorrect authentication when using auth type OpenID
Impact When Flask-AppBuilder is set to AUTHTYPE AUTHOID, 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.
This vulnerability is only exploitable when the application is using the old (deprecated 10 years ago) OpenID 2.0 authorization protocol (which is very different from the popular OIDC - Open ID Connect - popular protocol used today). Currently, this protocol is regarded as legacy, with significantly reduced usage and not supported for several years by major authorization providers.
Patches Upgrade to Flask-AppBuilder 4.3.11
Workarounds If upgrade is not possible add the following to your config:
from flask import flash, redirect from flaskappbuilder import expose from flaskappbuilder.security.sqla.manager import SecurityManager from flaskappbuilder.security.views import AuthOIDView from flaskappbuilder.security.forms import LoginFormoid
basedir = os.path.abspath(os.path.dirname(file))
class FixedOIDView(AuthOIDView): @expose("/login/", methods=["GET", "POST"]) def login(self, flag=True): form = LoginFormoid() if form.validateonsubmit(): identityurl = None for provider in self.appbuilder.sm.openidproviders: if provider.get("url") == form.openid.data: identityurl = form.openid.data if identityurl is None: flash(self.invalidloginmessage, "warning") return redirect(self.appbuilder.geturlforlogin) return super().login(flag=flag)
class FixedSecurityManager(SecurityManager): authoidview = FixedOIDView
FABSECURITYMANAGERCLASS = "config.FixedSecurityManager"
Other sources
Flask-AppBuilder is an application development framework, built on top of Flask. When Flask-AppBuilder is set to AUTHTYPE AUTHOID, 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. This vulnerability is only exploitable when the application is using the OpenID 2.0 authorization protocol. Upgrade to Flask-AppBuilder 4.3.11 to fix the vulnerability.
— MITRE
Affected Software
Remediation
Event History
Frequently Asked Questions
What is the severity of CVE-2024-25128?
CVE-2024-25128 is considered a high severity vulnerability due to its potential to grant unauthorized privilege access.
How do I fix CVE-2024-25128?
To fix CVE-2024-25128, it is recommended to upgrade Flask-AppBuilder to version 4.3.11 or later.
What systems are affected by CVE-2024-25128?
CVE-2024-25128 affects installations of Flask-AppBuilder that are using AUTH_TYPE AUTH_OID.
What type of attack does CVE-2024-25128 allow?
CVE-2024-25128 allows attackers to forge HTTP requests that can deceive the backend into using arbitrary OpenID services.
Is there a specific version of Flask-AppBuilder that mitigates CVE-2024-25128?
Yes, Flask-AppBuilder version 4.3.11 contains patches that mitigate CVE-2024-25128.