CVE-2026-40166: CWE-200: Exposure of Sensitive Information to an Unauthorized Actor in goauthentik authentik
authentik is an open-source identity provider. In versions prior to 2025.12.5 and 2026.2.0-rc1 through 2026.2.2, authenticated non-admin users with at least one OAuth2 access token can retrieve the client_secret of confidential OAuth2 providers they have previously authenticated against, exposing sensitive information to users without the correct permissions. This logic is GET /api/v3/oauth2/access_tokens/. The API response includes a nested provider object containing client_id and client_secret for providers configured with client_type: confidential, which should not be accessible to low-privilege users. This issue has been fixed in versions 2025.12.5 and 2026.2.3.
AI Analysis
Technical Summary
The vulnerability (CVE-2026-40166) in goauthentik authentik involves exposure of sensitive information (client_secret) to unauthorized actors. Authenticated non-admin users with an OAuth2 access token can access the client_secret of confidential OAuth2 providers via the GET /api/v3/oauth2/access_tokens/ API endpoint. This occurs because the API response includes a nested provider object with client_id and client_secret for providers configured as confidential, which should be restricted. The flaw affects versions before 2025.12.5 and versions from 2026.2.0-rc1 up to but not including 2026.2.3. The vulnerability is classified under CWE-200 (Exposure of Sensitive Information) and CWE-863 (Incorrect Authorization).
Potential Impact
Unauthorized disclosure of client_secret credentials for confidential OAuth2 providers can lead to compromise of OAuth2 client confidentiality, potentially enabling unauthorized access to protected resources or impersonation of the client. The vulnerability requires an authenticated user with at least one OAuth2 access token but does not require admin privileges. The CVSS 4.0 score is 7.1 (high severity), reflecting network attack vector, low attack complexity, no user interaction, and high impact on confidentiality.
Mitigation Recommendations
This vulnerability has been fixed in authentik versions 2025.12.5 and 2026.2.3. Users should upgrade to one of these versions or later to remediate the issue. Since this is not a cloud service, remediation depends on applying the official patch. Patch status is confirmed fixed in these versions. No additional mitigations are indicated by the vendor advisory.
CVE-2026-40166: CWE-200: Exposure of Sensitive Information to an Unauthorized Actor in goauthentik authentik
Description
authentik is an open-source identity provider. In versions prior to 2025.12.5 and 2026.2.0-rc1 through 2026.2.2, authenticated non-admin users with at least one OAuth2 access token can retrieve the client_secret of confidential OAuth2 providers they have previously authenticated against, exposing sensitive information to users without the correct permissions. This logic is GET /api/v3/oauth2/access_tokens/. The API response includes a nested provider object containing client_id and client_secret for providers configured with client_type: confidential, which should not be accessible to low-privilege users. This issue has been fixed in versions 2025.12.5 and 2026.2.3.
CVSS v4.0
Score 7.1high
Affected software
pkg:golang/github.com/goauthentik/authentikRun on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The vulnerability (CVE-2026-40166) in goauthentik authentik involves exposure of sensitive information (client_secret) to unauthorized actors. Authenticated non-admin users with an OAuth2 access token can access the client_secret of confidential OAuth2 providers via the GET /api/v3/oauth2/access_tokens/ API endpoint. This occurs because the API response includes a nested provider object with client_id and client_secret for providers configured as confidential, which should be restricted. The flaw affects versions before 2025.12.5 and versions from 2026.2.0-rc1 up to but not including 2026.2.3. The vulnerability is classified under CWE-200 (Exposure of Sensitive Information) and CWE-863 (Incorrect Authorization).
Potential Impact
Unauthorized disclosure of client_secret credentials for confidential OAuth2 providers can lead to compromise of OAuth2 client confidentiality, potentially enabling unauthorized access to protected resources or impersonation of the client. The vulnerability requires an authenticated user with at least one OAuth2 access token but does not require admin privileges. The CVSS 4.0 score is 7.1 (high severity), reflecting network attack vector, low attack complexity, no user interaction, and high impact on confidentiality.
Mitigation Recommendations
This vulnerability has been fixed in authentik versions 2025.12.5 and 2026.2.3. Users should upgrade to one of these versions or later to remediate the issue. Since this is not a cloud service, remediation depends on applying the official patch. Patch status is confirmed fixed in these versions. No additional mitigations are indicated by the vendor advisory.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- GitHub_M
- Date Reserved
- 2026-04-09T19:31:56.014Z
- Cvss Version
- 4.0
- State
- PUBLISHED
- Remediation Level
- null
Threat ID: 6a10ab41e1370fbb483c5684
Added to database: 05/22/2026, 19:15:13 UTC
Last enriched: 05/29/2026, 20:29:37 UTC
Last updated: 07/31/2026, 19:22:58 UTC
Views: 131
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.