CVE-2024-23647: Goauthentik.io Authentik Vulnerable To PKCE Downgrade Vulnerability
HIGHCVE-2024-23647 is a HIGH (CVSS 6.5) authentik vulnerable to pkce downgrade vulnerability (CWE-287: Improper Authentication) affecting Goauthentik.io libraries in the Go ecosystem. The issue involves authentik vulnerable to pkce downgrade attack. Remediation is available by upgrading affected packages to version 2023.10.7, 2023.8.7.
CVE-2024-23647 at a Glance
Security Impact
CVSS: 6.5
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N).
How to Fix CVE-2024-23647
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.
Upgrade goauthentik.io to 2023.10.7
Upgrade goauthentik.io to 2023.8.7
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-23647, 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 2023.10.7), 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-287: Improper Authentication, where when an actor claims to have a given identity, the product does not prove or insufficiently proves that the claim is correct. 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
CVE-2024-23647 Affected Goauthentik.io Versions
2 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
goauthentik.io
|
Go |
≥ 2023.10.0
< 2023.10.7
|
2023.10.7
|
|
goauthentik.io
|
Go |
< 2023.8.7
|
2023.8.7
|
References
Frequently Asked Questions
What is CVE-2024-23647?
Which Goauthentik.io versions are affected?
What version fixes CVE-2024-23647?
Is goauthentik.io affected?
What is the CVSS score of CVE-2024-23647?
What CWE is associated with CVE-2024-23647?
How can I check Go dependencies for CVE-2024-23647?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-mrx3-gxjx-hjqj",
"modified" : "2024-11-18T16:26:35Z",
"published" : "2024-01-29T22:30:54Z",
"aliases" : [ "CVE-2024-23647" ],
"summary" : "Authentik vulnerable to PKCE downgrade attack",
"details" : "## Summary\n\nPKCE is a very important countermeasure in OAuth2 , both for public and confidential clients. It protects against CSRF attacks and code injection attacks. Because of this bug, an attacker can circumvent the protection PKCE offers.\n\n## Patches\n\nauthentik 2023.8.7 and 2023.10.7 fix this issue.\n\n## Details\n\nThere is a bug in our implementation of PKCE that allows an attacker to circumvent the protection that PKCE offers. PKCE adds the `code_challenge’ parameter to the authorization request and adds the `code_verifier’ parameter to the token request. We recently fixed a downgrade attack (in v2023.8.5 and 2023.10.4) where if the attacker removed the `code_verifier’ parameter in the token request, authentik would allow the request to pass, thus circumventing PKCE’s protection. However, in the latest version of the software, another downgrade scenario is still possible: if the attacker removes the `code_challenge’ parameter from the authorization request, authentik will also not do the PKCE check.\n\nNote that this type of downgrade enables an attacker to perform a code injection attack, even if the OAuth client is using PKCE (which is supposed to protect against code injection attacks). To start the attack, the attacker must initiate the authorization process without that `code_challenge’ parameter in the authorization request. But this is easy to do (just use a phishing site or email to trick the user into clicking on a link that the attacker controls – the authorization link without that `code_challenge’ parameter).\n\nThe OAuth BCP (https://datatracker.ietf.org/doc/html/draft-ietf-oauth-security-topics) explicitly mentions this particular attack in section 2.1.1: “Authorization servers MUST mitigate PKCE Downgrade Attacks by ensuring that a token request containing a code_verifier parameter is accepted only if a code_challenge parameter was present in the authorization request, see Section 4.8.2 for details.”\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:L/PR:N/UI:R/S:U/C:N/I:H/A:N"
}, {
"type" : "CVSS_V4",
"score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Go",
"name" : "goauthentik.io"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "2023.10.0"
}, {
"fixed" : "2023.10.7"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 2023.10.6"
}
}, {
"package" : {
"ecosystem" : "Go",
"name" : "goauthentik.io"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "2023.8.7"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 2023.8.6"
}
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/goauthentik/authentik/security/advisories/GHSA-mrx3-gxjx-hjqj"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-23647"
}, {
"type" : "WEB",
"url" : "https://github.com/goauthentik/authentik/commit/38e04ae12720e5d81b4f7ac77997eb8d1275d31a"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/goauthentik/authentik"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-287" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2024-01-29T22:30:54Z",
"nvd_published_at" : "2024-01-30T17:15:10Z"
}
}