Incorrect Privilege Assignment Affecting @aws-cdk/aws-eks package, versions >=1.57.0 <1.202.0


Severity

Recommended
0.0
high
0
10

CVSS assessment made by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
0.09% (41st percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications

Snyk Learn

Learn about Incorrect Privilege Assignment vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-JS-AWSCDKAWSEKS-5721463
  • published20 Jun 2023
  • disclosed19 Jun 2023
  • credittwelvemo

Introduced: 19 Jun 2023

CVE-2023-35165  (opens in a new tab)
CWE-266  (opens in a new tab)

How to fix?

Upgrade @aws-cdk/aws-eks to version 1.202.0 or higher.

Overview

@aws-cdk/aws-eks is a The CDK Construct Library for AWS::EKS

Affected versions of this package are vulnerable to Incorrect Privilege Assignment such that eks.Cluster and eks.FargateCluster constructs create two roles that have an overly permissive trust policy. Both these roles use the account root principal in their trust policy, which allows any identity in the account with the appropriate sts:AssumeRole permissions to assume it.

Note:

Only eks.Cluster or eks.FargateCluster construct users are impacted.

Workaround

There is no workaround available for CreationRole.

To avoid creating the default MastersRole, users can set the mastersRole property to explicitly provide a role. For example:

new eks.Cluster(this, 'Cluster', { 
  ... 
  mastersRole: iam.Role.fromRoleArn(this, 'Admin', 'arn:aws:iam::xxx:role/Admin') 
}); 

CVSS Scores

version 3.1