AWS CDK EKS overly permissive trust policies
Key facts
- Attack vector
- Network
- Privileges required
- Low
- User interaction
- None
- Attack complexity
- Low
- Impact type
- Security bypass, Privilege escalation
- Confidentiality · integrity · availability
- High · High · High
- Fix status
- Fixed
Attack profile from CVSS 3.1 · NVD. Fix status from CNA and GitHub. Impact type from CWE-863 and CWE-266.
Summary
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. The 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. The 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. The 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.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- None
- Automatable
- No
- Technical impact
- Total
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| AWS | aws-cdk | aws-cdk-lib >= 2.0.0, < 2.80.0; @aws-cdk/aws-eks >= 1.57.0, < 1.202.0 | — | No fix listed | CNA |
| — | aws-cdk-lib (npm) | 2.0.0 to before 2.80.0 | 2.80.0 | Patch available | GHSA-rx28-r23p-2qc3 |
| — | @aws-cdk/aws-eks (npm) | 1.57.0 to before 1.202.0 | 1.202.0 | Patch available | GHSA-rx28-r23p-2qc3 |
- aws-cdk VendorAWS Affected aws-cdk-lib >= 2.0.0, < 2.80.0; @aws-cdk/aws-eks >= 1.57.0, < 1.202.0 Fixed in — No fix listed CNA
- aws-cdk-lib (npm) Vendor— Affected 2.0.0 to before 2.80.0 Fixed in 2.80.0 Patch available GHSA-rx28-r23p-2qc3
- @aws-cdk/aws-eks (npm) Vendor— Affected 1.57.0 to before 1.202.0 Fixed in 1.202.0 Patch available GHSA-rx28-r23p-2qc3
Remediation
- Fix · GHSA-rx28-r23p-2qc3 aws-cdk-lib (npm) Fixed in 2.80.0 Advisory →
- Fix · GHSA-rx28-r23p-2qc3 @aws-cdk/aws-eks (npm) Fixed in 1.202.0 Advisory →
Timeline
- 2026-10-02 Threatist record created from CVE-2023-35165
- 2026-10-03 Alias added: GHSA-rx28-r23p-2qc3
References
More Aws Cloud Development Kit vulnerabilities
- TI-2024-30149 AWS CDK RestApi not generating authorizationScope correctly in resultant CFN template CVSS 3.1MEDIUM 6.4
- TI-2025-02266 AWS CDK CLI prints AWS credentials retrieved by custom credential plugins CVSS 4.0MEDIUM 5.7
- TI-2025-16991 IAM OIDC custom resource allows connection to unauthorized OIDC provider in aws-cdk CVSS 4.0LOW 1.8
Sources
- CVE-2023-35165 · CVE Program
- CVE-2023-35165 · NVD
- FIRST EPSS
- GHSA-rx28-r23p-2qc3 · GitHub Advisory Database · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences