# CVE-2026-40166: goauthentik authentik information disclosure in OAuth2 API

Source: https://junglewise.ai/threats/cve-2026-40166-goauthentik-authentik-information-disclosure-in-oauth2-api  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-05-22. Updated: 2026-07-23  
License: CC BY 4.0 with a link back

CVE-2026-40166 · Severity: info · CVSS 7.1 · Published 2026-05-22

authentik is an open-source identity provider used to manage user authentication and access to applications. A security flaw allows standard, non-administrator users to view sensitive 'client secrets' for applications they have logged into. An attacker could use these stolen secrets to impersonate legitimate applications, potentially leading to unauthorized data access or further security breaches.

Technologies: [Goauthentik Authentik](https://junglewise.ai/threats/technologies/authentik). Vendors: [Goauthentik](https://junglewise.ai/threats/vendors/goauthentik).

## Quick answers

**Is CVE-2026-40166 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-40166 being exploited in the wild.

**How severe is CVE-2026-40166?** Informational severity, with a CVSS score of 7.1, published 22 May 2026.

**Which products and versions are affected?** Goauthentik Authentik < 2025.12.5, >= 2026.2.0-rc1, < 2026.2.3.

**Is there a fix for CVE-2026-40166?** A patch was published on 2026-05-12: Versions 2025.12.5 and 2026.2.3 released Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2026-40166 attacked?** It is attacked over the network, in a network appliance.

**Am I affected by CVE-2026-40166?** Check whether you run Goauthentik Authentik at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## Technical details

An information disclosure vulnerability exists in the authentik API endpoint 'GET /api/v3/oauth2/access_tokens/'. The root cause is an authorization failure where the API response includes a nested provider object containing the 'client_id' and 'client_secret' for confidential OAuth2 providers. To exploit this, an attacker must be an authenticated non-admin user who has previously completed an OAuth2 flow against a confidential provider. Successful exploitation allows the attacker to retrieve the provider's secret, which could be used to facilitate unauthorized credential reuse. The issue is fixed in versions 2025.12.5 and 2026.2.3.

## Affected products

- goauthentik authentik < 2025.12.5, >= 2026.2.0-rc1, < 2026.2.3

## Timeline

- 2026-05-12: patched: Versions 2025.12.5 and 2026.2.3 released
- 2026-05-12: advisory: GitHub Security Advisory GHSA-hhpc-rqgm-pxj4 published
- 2026-05-22: disclosed: CVE-2026-40166 published to NVD

## References

- [https://github.com/goauthentik/authentik/releases/tag/version%2F2025.12.5](https://github.com/goauthentik/authentik/releases/tag/version%2F2025.12.5)
- [https://github.com/goauthentik/authentik/releases/tag/version%2F2026.2.3](https://github.com/goauthentik/authentik/releases/tag/version%2F2026.2.3)
- [https://github.com/goauthentik/authentik/security/advisories/GHSA-hhpc-rqgm-pxj4](https://github.com/goauthentik/authentik/security/advisories/GHSA-hhpc-rqgm-pxj4)

## Related threats

- [goauthentik authentik authentication bypass in Source stage](https://junglewise.ai/threats/cve-2026-49448-goauthentik-authentik-authentication-bypass-in-source-stage)
- [goauthentik authentik improper authentication in Source Connections](https://junglewise.ai/threats/cve-2026-49443-goauthentik-authentik-improper-authentication-in-source)
- [goauthentik authentik XML Signature Wrapping in SAML Source ACS](https://junglewise.ai/threats/cve-2026-47201-goauthentik-authentik-xml-signature-wrapping-in-saml-source-acs)
- [authentik reflected XSS in Simple Flow Executor AutosubmitStage](https://junglewise.ai/threats/cve-2026-42849-authentik-reflected-xss-in-simple-flow-executor-autosubmitstage)
- [authentik WS-Federation origin bypass in wreply parameter](https://junglewise.ai/threats/cve-2026-41569-authentik-ws-federation-origin-bypass-in-wreply-parameter)
