{"id":"CVE-2024-25128","kind":"vulnerability","aliases":["CVE-2024-25128","GHSA-j2pw-vp55-fqqj"],"related":[],"title":"Flask-AppBuilder vulnerable to incorrect authentication when using auth type OpenID","description":"### Impact\nWhen Flask-AppBuilder is set to AUTH_TYPE AUTH_OID, 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. \n\nThis 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.\n\n### Patches\nUpgrade to Flask-AppBuilder 4.3.11\n\n### Workarounds\nIf upgrade is not possible add the following to your config:\n\n```\nfrom flask import flash, redirect\nfrom flask_appbuilder import expose\nfrom flask_appbuilder.security.sqla.manager import SecurityManager\nfrom flask_appbuilder.security.views import AuthOIDView\nfrom flask_appbuilder.security.forms import LoginForm_oid\n\nbasedir = os.path.abspath(os.path.dirname(__file__))\n\n\nclass FixedOIDView(AuthOIDView):\n    @expose(\"/login/\", methods=[\"GET\", \"POST\"])\n    def login(self, flag=True):\n        form = LoginForm_oid()\n        if form.validate_on_submit():\n            identity_url = None\n            for provider in self.appbuilder.sm.openid_providers:\n                if provider.get(\"url\") == form.openid.data:\n                    identity_url = form.openid.data\n            if identity_url is None:\n                flash(self.invalid_login_message, \"warning\")\n                return redirect(self.appbuilder.get_url_for_login)\n        return super().login(flag=flag)\n\nclass FixedSecurityManager(SecurityManager):\n    authoidview = FixedOIDView\n\n\nFAB_SECURITY_MANAGER_CLASS = \"config.FixedSecurityManager\"\n```","summary":"Flask-AppBuilder's OpenID 2.0 login (AUTH_OID) lets a forged request make the backend authenticate against any OpenID service the attacker names, including one the attacker runs. That can grant unauthorised access to the application.","severity":"critical","cvss":9.1,"epss":0.00857,"exploited":false,"exploited_at":null,"products":[{"name":"Flask-AppBuilder","fixed":["4.3.11"],"affected":"< 4.3.11","ecosystem":"pypi"},{"name":"dpgaspar flask-appbuilder","fixed":["4.3.11"],"affected":"< 4.3.11","ecosystem":"vendor"}],"ecosystems":["pypi","vendor"],"tags":["cwe-287","flask","flask-appbuilder","package","python","self-hosted"],"not_affected_if":["auth-type-not-oid","patched-4.3.11"],"how_to_check":"- Check the installed version with `pip show Flask-AppBuilder`; versions below `4.3.11` are affected.\n- Check the config for `AUTH_TYPE = AUTH_OID`; the flaw only applies when OpenID 2.0 is the login method.","fix":"- Upgrade Flask-AppBuilder to `4.3.11`.\n- If the upgrade is not possible, apply the workaround from the advisory: a custom `AuthOIDView` whose login rejects any OpenID provider URL not in `openid_providers`, wired in via `FAB_SECURITY_MANAGER_CLASS`.\n- Or move off AUTH_OID to another authentication type.","status":"open","published_at":"2024-02-28T18:37:06+00:00","first_seen_at":"2026-10-27T16:35:55+00:00","triaged_at":"2026-10-27T16:38:08+00:00","updated_at":"2026-10-27T17:03:04+00:00","category":"package","confidence":0.85,"triage":{"at":"2026-10-27T16:38:08Z","model":"claude-haiku-5-5","output":{"fix":"- Upgrade Flask-AppBuilder to `4.3.11`.\n- If the upgrade is not possible, apply the workaround from the advisory: a custom `AuthOIDView` whose login rejects any OpenID provider URL not in `openid_providers`, wired in via `FAB_SECURITY_MANAGER_CLASS`.\n- Or move off AUTH_OID to another authentication type.","reach":"internet","title":"Flask-AppBuilder: OpenID 2.0 login accepts attacker-chosen identity provider","impact":"high","summary":"Flask-AppBuilder's OpenID 2.0 login (AUTH_OID) lets a forged request make the backend authenticate against any OpenID service the attacker names, including one the attacker runs. That can grant unauthorised access to the application.","category":"package","nicknames":[],"who_cares":["flask-appbuilder","python","flask","self-hosted"],"confidence":0.85,"needs_auth":"no","worst_case":"Attacker logs in as another user and gains unauthorised privileged access","analyst_note":"","how_to_check":"- Check the installed version with `pip show Flask-AppBuilder`; versions below `4.3.11` are affected.\n- Check the config for `AUTH_TYPE = AUTH_OID`; the flaw only applies when OpenID 2.0 is the login method.","needs_analyst":false,"not_affected_if":["auth-type-not-oid","patched-4.3.11"],"who_is_affected":"Only applications that use Flask-AppBuilder with AUTH_TYPE set to AUTH_OID, the deprecated OpenID 2.0 protocol, are exposed. Applications using OIDC, database, LDAP or OAuth login are not affected by this flaw, and those on the patched 4.3.11 release are safe.","user_interaction":"no","needs_special_setup":"yes","severity_if_unknown":"critical"},"cost_usd":0.000729,"input_tokens":3966,"output_tokens":664,"severity_before":"critical"},"analyst_status":null,"analyst_note":null,"search":"'-2024':14A,22A '-25128':15A,23A '-287':32B '/login':240C '10':147C '2.0':47B,151C '4.3.11':196C 'access':75B,118C,130C 'add':203C 'ago':149C 'allow':91C 'appbuild':3A,36B,44B,83C,195C,216C 'appbuilder':26A,30A 'applic':78B,141C 'attack':64B,69B,93C,115C,128C 'auth':10A,49B,87C,89C 'authent':7A,58B 'authoidview':226C,238C,295C 'author':152C,188C 'backend':57B,103C,133C 'basedir':232C 'class':236C,292C,300C 'config':208C 'config.fixedsecuritymanager':301C 'connect':164C 'could':100C,112C 'current':169C 'custom':121C 'cve':13A,21A 'cwe':31B 'deceiv':101C 'def':244C 'deploy':125C 'deprec':146C 'differ':157C 'dpgaspar':27A 'exploit':138C 'expos':218C,239C 'fab':297C 'file':235C 'fixedoidview':237C,296C 'fixedsecuritymanag':293C 'flag':247C,290C,291C 'flash':212C,276C 'flask':2A,25A,29A,33B,35B,43B,82C,194C,210C,215C 'flask-appbuild':1A,34B,42B,81C,193C 'flask-appbuilder':24A,28A 'flask_appbuilder.security.forms':228C 'flask_appbuilder.security.sqla.manager':220C 'flask_appbuilder.security.views':224C 'follow':205C 'forg':53B,95C 'form':249C 'form.openid.data':267C,270C 'form.validate':253C 'fqqj':20A 'get':242C 'ghsa':17A 'ghsa-j2pw-vp55-fqqj':16A 'grant':73B,113C 'host':41B 'http':97C 'id':163C 'ident':256C,268C,272C 'impact':79C 'import':211C,217C,221C,225C,229C 'includ':66B 'incorrect':6A 'j2pw':18A 'legaci':175C 'let':51B 'login':48B,245C,278C,286C,289C 'loginform':230C,250C 'major':187C 'make':55B 'manag':299C 'messag':279C 'method':241C 'name':65B 'none':258C,275C 'oid':50B,90C,231C,251C 'oidc':161C 'old':145C 'one':67B 'open':162C 'openid':12A,46B,61B,108C,122C,150C 'os.path.abspath':233C 'os.path.dirname':234C 'packag':37B 'patch':190C 'popular':160C,165C 'possibl':202C 'post':243C 'privileg':117C 'protocol':153C,166C,171C 'provid':189C,260C,263C 'provider.get':265C 'python':38B 'redirect':213C,282C 'reduc':178C 'regard':173C 'request':54B,98C,107C 'return':281C,287C 'run':70B 'secur':298C 'securitymanag':222C,294C 'self':40B,246C 'self-host':39B 'self.appbuilder.get':283C 'self.appbuilder.sm.openid':262C 'self.invalid':277C 'servic':62B,109C,123C 'set':85C 'sever':184C 'signific':177C 'submit':255C 'super':288C 'support':182C 'today':168C 'true':248C 'type':11A,88C 'unauthoris':74B,116C 'upgrad':191C,199C 'url':257C,266C,269C,273C,284C 'usag':179C 'use':9A,105C,143C,167C 'vp55':19A 'vulner':4A,111C,135C 'warn':280C 'workaround':197C 'year':148C,185C","nicknames":[],"mitigations":[],"who_affected":"Only applications that use Flask-AppBuilder with AUTH_TYPE set to AUTH_OID, the deprecated OpenID 2.0 protocol, are exposed. Applications using OIDC, database, LDAP or OAuth login are not affected by this flaw, and those on the patched 4.3.11 release are safe.","tier":"B","verified":{},"analyst_revisit_at":null,"first_public_at":"2024-02-28T18:37:06+00:00","kev":null,"cvss_vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N","cvss_by":"GitHub","poc_count":0,"sources":[{"source":"ghsa","external_id":"GHSA-j2pw-vp55-fqqj","url":"https://github.com/advisories/GHSA-j2pw-vp55-fqqj","severity":"critical","published_at":"2024-02-28T18:37:06+00:00","modified_at":"2026-10-27T16:32:31+00:00","first_seen_at":"2026-10-27T16:35:55+00:00","fetched_at":"2026-10-27T16:35:55+00:00","note":null},{"source":"nvd","external_id":"CVE-2024-25128","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-25128","severity":null,"published_at":"2024-02-29T01:44:14+00:00","modified_at":"2026-06-17T07:15:33+00:00","first_seen_at":"2026-10-27T17:03:04+00:00","fetched_at":"2026-10-27T17:03:04+00:00","note":null}],"documents":[],"notice":"Free to read at a human pace. An API with keys and an MCP server are in preparation; early access: hello@infrastack.ai"}