Incorrect Privilege Assignment Affecting @aws-cdk/aws-eks package, versions >=1.57.0 <1.202.0
Threat Intelligence
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 ID SNYK-JS-AWSCDKAWSEKS-5721463
- published 20 Jun 2023
- disclosed 19 Jun 2023
- credit twelvemo
Introduced: 19 Jun 2023
CVE-2023-35165 Open this link in a new tabHow 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')
});