All vulnerabilities

Servers and applications

CVE-2026-40166

Non-admin user can retrieve confidential OAuth client_secret via /api/v3/oauth2/access_tokens/

Severity
High
Published
12 May 2026
Last changed
12 May 2026
Added to UpHeron
3 Nov 2026
Fixed in
2025.12.5, 2026.2.3
Exploit chance
0.5% in the next 30 daysHigher than 40% of CVEs. EPSS by FIRST, 19 Nov 2026
Weakness
Information exposure (CWE-200)Incorrect authorization (CWE-863)
Also known as
GHSA-hhpc-rqgm-pxj4
Sources
Project advisories (GitHub)

Description

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, via 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.

Any authenticated non-admin user who has previously completed an OAuth2 flow against a confidential provider — and therefore has an access token object returned by /api/v3/oauth2/access_tokens/ — can read that provider's client_secret. Exposure is limited to providers the user has access to and has logged into at least once; users cannot read secrets for providers they have never authenticated against. This could allow unauthorized reuse of confidential client credentials depending on the provider configuration.

From goauthentik/authentik's security advisory.

Workarounds

Restrict API access to /api/v3/oauth2/access_tokens/ for non-admin users, or review and limit which users are permitted to complete OAuth2 flows against confidential providers until a patched version can be applied.

Workarounds as given by goauthentik/authentik's security advisory.

Affected software

SoftwareAffected versions
authentikServers and applications · github:goauthentik/authentik
  • Every version before 2026.2.3
  • Every version before 2025.12.5

About authentik

The authentication glue you need.

From its GitHub repository.
Total installations
1 millionauthentik
GitHub stars
26,351GitHub, 15 Nov 2026
Forks
2,134GitHub, 15 Nov 2026
Latest release
version/2026.8.5GitHub, 15 Nov 2026
Released
21 Oct 2026GitHub
First published on GitHub
30 Dec 2019GitHub

Release lines

ReleaseLatestSecurity fixes
2026.82026.8.5Yes
2026.52026.5.8Yes
2026.22026.2.7Ended 18 Aug 2026
2025.122025.12.6Ended 22 May 2026
2025.102025.10.4Ended 24 Feb 2026
2025.82025.8.6Ended 13 Jan 2026

From endoflife.date.

References

  • CVE.org https://www.cve.org/CVERecord?id=CVE-2026-40166
  • GitHub Advisory Database https://github.com/advisories/GHSA-hhpc-rqgm-pxj4
  • github.com https://github.com/goauthentik/authentik/security/advisories/GHSA-hhpc-rqgm-pxj4