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

    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 ID SNYK-JS-AWSCDKAWSEKS-5721463
  • published 20 Jun 2023
  • disclosed 19 Jun 2023
  • credit twelvemo

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
Expand this section

Snyk

Recommended
8.8 high
  • Attack Vector (AV)
    Network
  • Attack Complexity (AC)
    Low
  • Privileges Required (PR)
    Low
  • User Interaction (UI)
    None
  • Scope (S)
    Unchanged
  • Confidentiality (C)
    High
  • Integrity (I)
    High
  • Availability (A)
    High
Expand this section

NVD

8.8 high