Incorrect Privilege Assignment Affecting aws-cdk-lib package, versions >=2.0.0 <2.80.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-AWSCDKLIB-5721464
- 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-lib
to version 2.80.0 or higher.
Overview
aws-cdk-lib is a Version 2 of the AWS Cloud Development Kit library
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')
});