AccessKeyID validation bypass
Description
A security issue was discovered in aws-iam-authenticator where an allow-listed IAM identity may be able to modify their username and escalate privileges.
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
An allow-listed IAM identity in aws-iam-authenticator could modify their username to escalate privileges, affecting versions v0.5.2-v0.5.8.
Vulnerability
Description
The vulnerability in aws-iam-authenticator (CVE-2022-2385) stems from the insecure use of the AccessKeyID template parameter when constructing usernames. By supplying a crafted AccessKeyID, an authenticated IAM identity that is already allow-listed can modify their own username within the mapping to Kubernetes RBAC [2][4]. This bypasses the intended identity mapping logic.
Exploitation
Exploitation requires an attacker to have valid AWS IAM credentials that are already allow-listed in the cluster's authentication configuration. No additional network access is needed beyond the ability to authenticate. The attack is indistinguishable from legitimate requests because the AccessKeyID is normally trusted [4].
Impact
Successful exploitation allows the attacker to assume any username that is mapped to a higher privilege role, leading to privilege escalation within the Kubernetes cluster. The CVSS score is 7.1 (High) with impacts on confidentiality and integrity (C:H/I:H/A:N) [2][4].
Mitigation
Users should upgrade to aws-iam-authenticator v0.5.9 or later, which removes the use of AccessKeyID in username templates [3]. Until patched, the vulnerability can be mitigated by not using the {{AccessKeyID}} template parameter in username mappings [4].
AI Insight generated on May 21, 2026. Synthesized from this CVE's description and the cited reference URLs; citations are validated against the source bundle.
Affected packages
Versions sourced from the GitHub Security Advisory.
| Package | Affected versions | Patched versions |
|---|---|---|
sigs.k8s.io/aws-iam-authenticatorGo | < 0.5.9 | 0.5.9 |
Affected products
9- ghsa-coords8 versionspkg:golang/sigs.k8s.io/aws-iam-authenticatorpkg:rpm/opensuse/aws-iam-authenticator&distro=openSUSE%20Leap%2015.3pkg:rpm/opensuse/aws-iam-authenticator&distro=openSUSE%20Leap%2015.4pkg:rpm/suse/aws-iam-authenticator&distro=SUSE%20Linux%20Enterprise%20Module%20for%20Public%20Cloud%2015pkg:rpm/suse/aws-iam-authenticator&distro=SUSE%20Linux%20Enterprise%20Module%20for%20Public%20Cloud%2015%20SP1pkg:rpm/suse/aws-iam-authenticator&distro=SUSE%20Linux%20Enterprise%20Module%20for%20Public%20Cloud%2015%20SP2pkg:rpm/suse/aws-iam-authenticator&distro=SUSE%20Linux%20Enterprise%20Module%20for%20Public%20Cloud%2015%20SP3pkg:rpm/suse/aws-iam-authenticator&distro=SUSE%20Linux%20Enterprise%20Module%20for%20Public%20Cloud%2015%20SP4
< 0.5.9+ 7 more
- (no CPE)range: < 0.5.9
- (no CPE)range: < 0.5.3-150000.1.9.1
- (no CPE)range: < 0.5.3-150000.1.9.1
- (no CPE)range: < 0.5.3-150000.1.9.1
- (no CPE)range: < 0.5.3-150000.1.9.1
- (no CPE)range: < 0.5.3-150000.1.9.1
- (no CPE)range: < 0.5.3-150000.1.9.1
- (no CPE)range: < 0.5.3-150000.1.9.1
- Kubernetes/aws-iam-authenticatorv5Range: v0.5.2
Patches
1029d1dcf2ec8Add query parameter validation for multiple parameters
2 files changed · +16 −0
pkg/token/token.go+15 −0 modified@@ -473,6 +473,10 @@ func (v tokenVerifier) Verify(token string) (*Identity, error) { return nil, FormatError{"malformed query parameter"} } + if err = validateDuplicateParameters(queryParams); err != nil { + return nil, err + } + for key, values := range queryParams { if !parameterWhitelist[strings.ToLower(key)] { return nil, FormatError{fmt.Sprintf("non-whitelisted query parameter %q", key)} @@ -576,6 +580,17 @@ func (v tokenVerifier) Verify(token string) (*Identity, error) { return id, nil } +func validateDuplicateParameters(queryParams url.Values) error { + duplicateCheck := make(map[string]bool) + for key, _ := range queryParams { + if _, found := duplicateCheck[strings.ToLower(key)]; found { + return FormatError{fmt.Sprintf("duplicate query parameter found: %q", key)} + } + duplicateCheck[strings.ToLower(key)] = true + } + return nil +} + func hasSignedClusterIDHeader(paramsLower *url.Values) bool { signedHeaders := strings.Split(paramsLower.Get("x-amz-signedheaders"), ";") for _, hdr := range signedHeaders {
pkg/token/token_test.go+1 −0 modified@@ -190,6 +190,7 @@ func TestVerifyTokenPreSTSValidations(t *testing.T) { validationSuccessTest(t, "aws", toToken(fmt.Sprintf("https://sts.ca-central-1.amazonaws.com/?action=GetCallerIdentity&x-amz-signedheaders=x-k8s-aws-id&x-amz-date=%s&x-amz-expires=60", timeStr))) validationSuccessTest(t, "aws", toToken(fmt.Sprintf("https://sts.eu-west-1.amazonaws.com/?action=GetCallerIdentity&x-amz-signedheaders=x-k8s-aws-id&x-amz-date=%s&x-amz-expires=60", timeStr))) validationSuccessTest(t, "aws", toToken(fmt.Sprintf("https://sts.sa-east-1.amazonaws.com/?action=GetCallerIdentity&x-amz-signedheaders=x-k8s-aws-id&x-amz-date=%s&x-amz-expires=60", timeStr))) + validationErrorTest(t, "aws", toToken(fmt.Sprintf("https://sts.us-west-2.amazonaws.com/?Action=GetCallerIdentity&Version=2011-06-15&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=ASIAAAAAAAAAAAAAAAAA%%2F20220601%%2Fus-west-2%%2Fsts%%2Faws4_request&X-Amz-Date=%s&X-Amz-Expires=900&X-Amz-Security-Token=XXXXXXXXXXXXX&X-Amz-SignedHeaders=host%%3Bx-k8s-aws-id&x-amz-credential=eve&X-Amz-Signature=999999999999999999", timeStr)), "input token was not properly formatted: duplicate query parameter found:") } func TestVerifyHTTPError(t *testing.T) {
Vulnerability mechanics
Generated on May 9, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.
References
7- github.com/advisories/GHSA-pp3f-98qg-5g75ghsaADVISORY
- nvd.nist.gov/vuln/detail/CVE-2022-2385ghsaADVISORY
- github.com/kubernetes-sigs/aws-iam-authenticator/commit/029d1dcf2ec8d662d9b1c21260bb197404bc8218ghsaWEB
- github.com/kubernetes-sigs/aws-iam-authenticator/issues/472ghsax_refsource_MISCWEB
- github.com/kubernetes-sigs/aws-iam-authenticator/pull/469ghsaWEB
- github.com/kubernetes-sigs/aws-iam-authenticator/releases/tag/v0.5.9ghsaWEB
- groups.google.com/a/kubernetes.io/g/dev/c/EMxHpU-1ZYsghsax_refsource_MISCWEB
News mentions
0No linked articles in our index yet.