CVE-2024-42490: Goauthentik.io GoAuthentik Vulnerable To Insufficient Authorization Vulnerability

CRITICAL
Advisory Identifier: GHSA-qxqc-27pr-wgc8
CVSS 8.7
CWE-285 CWE-863
Published
Advisory Summary

CVE-2024-42490 is a CRITICAL (CVSS 8.7) goauthentik vulnerable to insufficient authorization vulnerability (CWE-285: Improper Authorization) affecting Goauthentik.io libraries in the Go ecosystem. The issue involves goauthentik vulnerable to insufficient authorization for several api endpoints. Remediation is available by upgrading affected packages to version 2024.6.4, 2024.4.4.

CVE-2024-42490 at a Glance

CVE Identifier CVE-2024-42490
GHSA Identifier GHSA-qxqc-27pr-wgc8
Severity CRITICAL
CVSS v3.1 Base Score 8.7
CWE Classification CWE-285: Improper Authorization
Affected Product Goauthentik.io
Package Ecosystem Go
Published Date
Last Updated

Security Impact

CVSS: 8.7

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:N/A:H).

Attack Vector Network (AV:N)
Attack Complexity High (AC:H)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Changed (S:C)
Confidentiality High (C:H)
Integrity None (I:N)
Availability High (A:H)

How to Fix CVE-2024-42490

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: 2024.6.4
Upgrade goauthentik.io to 2024.6.4
goauthentik.io fixed: 2024.4.4
Upgrade goauthentik.io to 2024.4.4
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-2024-42490, 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 2024.6.4), 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-285: Improper Authorization, where the product does not perform or incorrectly performs an authorization check when an actor attempts to access a resource or perform an action. 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 Several API endpoints can be accessed by users without correct authentication/authorization. The main API endpoints affected by this: - `/api/v3/crypto/certificatekeypairs/<uuid>/view_certificate/` - `/api/v3/crypto/certificatekeypairs/<uuid>/view_private_key/` - `/api/v3/.../used_by/` Note that all of the affected API endpoints require the knowledge of the ID of an object, which especially for certificates is not accessible to an unprivileged user. Additionally the IDs for most objects are UUIDv4, meaning they are not easily guessable/enumerable. ### Patches authentik 2024.4.4, 2024.6.4 and 2024.8.0 fix this issue. ### Workarounds Access to the API endpoints can be blocked at a Reverse-proxy/Load balancer level to prevent this issue from being exploited. ### For more information If you have any questions or comments about this advisory: - Email us at [security@goauthentik.io](mailto:security@goauthentik.io)

CVE-2024-42490 Affected Goauthentik.io Versions

2 component(s)
Fixed Versions:
2024.6.42024.4.4
Product / Package Ecosystem Affected Versions Fixed Version
goauthentik.io
Go
≥ 2024.6.0-rc1
< 2024.6.4
2024.6.4
goauthentik.io
Go
< 2024.4.4
2024.4.4

References

Frequently Asked Questions

What is CVE-2024-42490?
CVE-2024-42490 is a security vulnerability in Goauthentik.io involving GoAuthentik vulnerable to Insufficient Authorization for several API endpoints under CWE-285: Improper Authorization.
Which Goauthentik.io versions are affected?
Affected versions include releases prior to 2024.6.4, 2024.4.4 across affected packages: goauthentik.io.
What version fixes CVE-2024-42490?
Upgrading to 2024.6.4, 2024.4.4 (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 2024.6.4, 2024.4.4. Upgrade your dependency to 2024.6.4, 2024.4.4 or later.
What is the CVSS score of CVE-2024-42490?
CVE-2024-42490 has a CVSS v3.1 base score of 8.7 (CRITICAL) with vector string CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:N/A:H.
What CWE is associated with CVE-2024-42490?
CVE-2024-42490 is classified under CWE-285: Improper Authorization (The product does not perform or incorrectly performs an authorization check when an actor attempts to access a resource or perform an action.).
How can I check Go dependencies for CVE-2024-42490?
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-qxqc-27pr-wgc8",
  "modified" : "2024-11-18T16:27:06Z",
  "published" : "2024-08-22T16:39:25Z",
  "aliases" : [ "CVE-2024-42490" ],
  "summary" : "GoAuthentik vulnerable to Insufficient Authorization for several API endpoints",
  "details" : "### Summary\n\nSeveral API endpoints can be accessed by users without correct authentication/authorization.\n\nThe main API endpoints affected by this:\n\n-   `/api/v3/crypto/certificatekeypairs/<uuid>/view_certificate/`\n-   `/api/v3/crypto/certificatekeypairs/<uuid>/view_private_key/`\n-   `/api/v3/.../used_by/`\n\nNote that all of the affected API endpoints require the knowledge of the ID of an object, which especially for certificates is not accessible to an unprivileged user. Additionally the IDs for most objects are UUIDv4, meaning they are not easily guessable/enumerable.\n\n### Patches\n\nauthentik 2024.4.4, 2024.6.4 and 2024.8.0 fix this issue.\n\n### Workarounds\n\nAccess to the API endpoints can be blocked at a Reverse-proxy/Load balancer level to prevent this issue from being exploited.\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)\n",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:N/A:H"
  }, {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:N/VA:H/SC:H/SI:N/SA:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "goauthentik.io"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2024.6.0-rc1"
      }, {
        "fixed" : "2024.6.4"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Go",
      "name" : "goauthentik.io"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "2024.4.4"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/goauthentik/authentik/security/advisories/GHSA-qxqc-27pr-wgc8"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-42490"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/goauthentik/authentik/commit/19318d4c00bb02c4ec3c4f8f15ac2e1dbe8d846c"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/goauthentik/authentik/commit/359b343f51524342a5ca03828e7c975a1d654b11"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/goauthentik/authentik"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-285", "CWE-863" ],
    "severity" : "CRITICAL",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-08-22T16:39:25Z",
    "nvd_published_at" : "2024-08-22T16:15:09Z"
  }
}