{"id":"CVE-2023-35165","published":"2023-06-23T20:32:49Z","modified":"2024-12-05T16:12:52Z","title":"AWS CDK EKS overly permissive trust policies","vendor":"aws","product":"aws-cdk","tier":"tail","description":{"text":"AWS Cloud Development Kit (AWS CDK) is an open-source software development framework to define cloud infrastructure in code and provision it through AWS CloudFormation. In the packages `aws-cdk-lib` 2.0.0 until 2.80.0 and `@aws-cdk/aws-eks` 1.57.0 until 1.202.0, `eks.Cluster` and `eks.FargateCluster` constructs create two roles, `CreationRole` and `default MastersRole`, that have an overly permissive trust policy. \n \nThe first, referred to as the `CreationRole`, is used by lambda handlers to create the cluster and deploy Kubernetes resources (e.g `KubernetesManifest`, `HelmChart`, ...) onto it. Users with CDK version higher or equal to 1.62.0 (including v2 users) may be affected.\n \nThe second, referred to as the `default MastersRole`, is provisioned only if the `mastersRole` property isn't provided and has permissions to execute `kubectl` commands on the cluster. Users with CDK version higher or equal to 1.57.0 (including v2 users) may be affected.\n\nThe issue has been fixed in `@aws-cdk/aws-eks` v1.202.0 and `aws-cdk-lib` v2.80.0. These versions no longer use the account root principal. Instead, they restrict the trust policy to the specific roles of lambda handlers that need it. There is no workaround available for CreationRole. To avoid creating the `default MastersRole`, use the `mastersRole` property to explicitly provide a role.","provenance":"source","from":"CVE.org"},"cvss":{"score":6.6,"severity":"MEDIUM","version":"3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:U/C:H/I:H/A:H","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00897,"percentile":0.60446,"provenance":"source"},"cwes":[{"id":"CWE-863","name":"Incorrect Authorization"}],"references":[{"url":"https://github.com/aws/aws-cdk/security/advisories/GHSA-rx28-r23p-2qc3","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/aws/aws-cdk/issues/25674","tags":["x_refsource_MISC"]}],"priority":{"score":16.7,"factors":[{"name":"EPSS percentile","points":12.09},{"name":"CVSS severity","points":4.62}]},"vendorSlug":"aws","affectedVersions":[{"vendor":"aws","product":"aws-cdk","versions":["aws-cdk-lib >= 2.0.0, < 2.80.0","@aws-cdk/aws-eks >= 1.57.0, < 1.202.0"]}],"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"total","timestamp":"2024-12-05T16:12:30.983214Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"npm","package":"aws-cdk-lib","vulnerableRanges":[">=2.0.0, <2.80.0"],"patched":["2.80.0"],"from":["GHSA-rx28-r23p-2qc3"],"provenance":"source"},{"ecosystem":"npm","package":"@aws-cdk/aws-eks","vulnerableRanges":[">=1.57.0, <1.202.0"],"patched":["1.202.0"],"from":["GHSA-rx28-r23p-2qc3"],"provenance":"source"}],"summary":{"text":"The AWS CDK eks.Cluster and eks.FargateCluster constructs in the aws-cdk-lib package (versions 2.0.0 through 2.80.0) and the @aws-cdk/aws-eks package (versions 1.57.0 through 1.202.0) create the CreationRole and default MastersRole with an overly permissive trust policy that trusts the account root principal. An attacker who can reach the AWS account and satisfy the requirement of being able to assume these roles, with high attack complexity and privileges already held, could gain the ability to deploy to or administer the cluster, with impacts to confidentiality, integrity and availability.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T21:10:07Z"},"euvd":{"id":"EUVD-2023-1884","exploited":false,"provenance":"source"},"lineage":{"packageHistory":[{"cve":"CVE-2023-35165","published":"2023-06-23","fixed":"2.80.0","kev":false},{"cve":"CVE-2025-23206","published":"2025-01-17","fixed":"2.177.0","kev":false,"link":{"from":"CVE-2023-35165","to":"CVE-2025-23206","relation":"successor","confidence":"low","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"npm:aws-cdk-lib","fromFixed":"2.80.0","toFixed":"2.177.0","daysApart":574}]}},{"cve":"CVE-2026-11417","published":"2026-06-10","fixed":"2.246.0","kev":false},{"cve":"CVE-2026-13760","published":"2026-07-01","fixed":"2.260.0","kev":false}],"package":"npm:aws-cdk-lib"}}