CVE-2025-53942: Goauthentik.io Remote Code Execution Vulnerability

HIGH
Advisory Identifier: GHSA-9g4j-v8w5-7x42
CWE-269
Published
Advisory Summary

CVE-2025-53942 is a HIGH remote code execution vulnerability (CWE-269: Improper Privilege Management) affecting Goauthentik.io libraries in the Go ecosystem. The issue involves authentik has insufficient check for account active status when authenticating with oauth/saml sources. Remediation is available by upgrading affected packages to version 0.0.0-20250722122105-7a4c6b9b50f8.

CVE-2025-53942 at a Glance

CVE Identifier CVE-2025-53942
GHSA Identifier GHSA-9g4j-v8w5-7x42
Severity HIGH
CVSS v3.1 Base Score N/A
CWE Classification CWE-269: Improper Privilege Management
Affected Product Goauthentik.io
Package Ecosystem Go
Published Date
Last Updated

How to Fix CVE-2025-53942

To remediate this vulnerability, upgrade all affected Goauthentik.io dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

goauthentik.io fixed: 0.0.0-20250722122105-7a4c6b9b50f8
Upgrade goauthentik.io to 0.0.0-20250722122105-7a4c6b9b50f8
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for goauthentik.io

How to Check if You Are Affected

To determine whether your application is affected by CVE-2025-53942, inspect your project dependencies for Goauthentik.io:

inspect dependencies for goauthentik.io

Analyze the terminal output to locate any version of Goauthentik.io in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.0.0-20250722122105-7a4c6b9b50f8), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-269: Improper Privilege Management, where the product does not properly assign, modify, track, or check privileges for an actor, creating an unintended sphere of control for that actor. In Goauthentik.io, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### Summary Deactivated users that had either enrolled via OAuth/SAML or had their account connected to an OAuth/SAML account can still partially access authentik even if their account is deactivated. They end up in a half-authenticated state where they cannot access the API but crucially they can authorize applications if they know the URL of the application. ### Patches authentik 2025.4.4 and 2025.6.4 fix this issue. ### Workarounds Adding an expression policy to the user login stage on the respective authentication flow with the expression of ```py return request.context["pending_user"].is_active ``` This expression will only activate the user login stage when the user is active. ### For more information If you have any questions or comments about this advisory: - Email us at [security@goauthentik.io](mailto:security@goauthentik.io).

CVE-2025-53942 Affected Goauthentik.io Versions

1 component(s)
Fixed Versions:
0.0.0-20250722122105-7a4c6b9b50f8
Product / Package Ecosystem Affected Versions Fixed Version
goauthentik.io
Go
< 0.0.0-20250722122105-7a4c6b9b50f8
0.0.0-20250722122105-7a4c6b9b50f8

References

Frequently Asked Questions

What is CVE-2025-53942?
CVE-2025-53942 is a security vulnerability in Goauthentik.io involving Authentik has insufficient check for account active status when authenticating with OAuth/SAML Sources under CWE-269: Improper Privilege Management.
Which Goauthentik.io versions are affected?
Affected versions include releases prior to 0.0.0-20250722122105-7a4c6b9b50f8 across affected packages: goauthentik.io.
What version fixes CVE-2025-53942?
Upgrading to 0.0.0-20250722122105-7a4c6b9b50f8 (or the latest patched release for your respective branch) resolves the vulnerability.
Is goauthentik.io affected?
Yes, goauthentik.io is affected in releases prior to 0.0.0-20250722122105-7a4c6b9b50f8. Upgrade your dependency to 0.0.0-20250722122105-7a4c6b9b50f8 or later.
What CWE is associated with CVE-2025-53942?
CVE-2025-53942 is classified under CWE-269: Improper Privilege Management (The product does not properly assign, modify, track, or check privileges for an actor, creating an unintended sphere of control for that actor.).
How can I check Go dependencies for CVE-2025-53942?
Run the dependency tree command: 'inspect dependencies for goauthentik.io'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-9g4j-v8w5-7x42",
  "modified" : "2025-07-23T22:15:09Z",
  "published" : "2025-07-22T14:31:12Z",
  "aliases" : [ "CVE-2025-53942" ],
  "summary" : "Authentik has insufficient check for account active status when authenticating with OAuth/SAML Sources",
  "details" : "### Summary\n\nDeactivated users that had either enrolled via OAuth/SAML or had their account connected to an OAuth/SAML account can still partially access authentik even if their account is deactivated. They end up in a half-authenticated state where they cannot access the API but crucially they can authorize applications if they know the URL of the application.\n\n### Patches\n\nauthentik 2025.4.4 and 2025.6.4 fix this issue.\n\n### Workarounds\n\nAdding an expression policy to the user login stage on the respective authentication flow with the expression of\n\n```py\nreturn request.context[\"pending_user\"].is_active\n```\n\nThis expression will only activate the user login stage when the user is active.\n\n### For more information\n\nIf you have any questions or comments about this advisory:\n\n- Email us at [security@goauthentik.io](mailto:security@goauthentik.io).",
  "severity" : [ {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:N/SC:H/SI:H/SA:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "goauthentik.io"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "0.0.0-20250722122105-7a4c6b9b50f8"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/goauthentik/authentik/security/advisories/GHSA-9g4j-v8w5-7x42"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-53942"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/goauthentik/authentik/commit/7a4c6b9b50f8b837133a7a1fd2cb9b7f18a145cd"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/goauthentik/authentik/commit/c3629d12bfe3d32d3dc8f85c0ee1f087a55dde8f"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/goauthentik/authentik/commit/ce3f9e3763c1778bf3a16b98c95d10f4091436ab"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/goauthentik/authentik"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-269" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2025-07-22T14:31:12Z",
    "nvd_published_at" : "2025-07-23T21:15:26Z"
  }
}