{"answers":{"affected":"4 open source packages ship an affected version, including @aws-cdk/aws-eks and aws-cdk-lib. It affects 1 product.","exploited":"There is no known exploitation of CVE-2023-35165 in the wild and no public exploit code.","fix":"Upgrade @aws-cdk/aws-eks to 1.202.0 or later.","what":"CVE-2023-35165 is a medium-severity vulnerability in aws-cdk, published on 23 Jun 2023. An attacker needs administrator access to exploit it, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2023-35165 and fix it if it is affected.\n\nWhat it is: CVE-2023-35165 is a medium-severity vulnerability in aws-cdk, published on 23 Jun 2023. An attacker needs administrator access to exploit it, with no action from the victim.\nExploitation: There is no known exploitation of CVE-2023-35165 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- @aws-cdk/aws-eks (npm): affected from 1.57.0; fixed in 1.202.0\n- @aws-cdk/aws-eks (npm): affected from 1.57.0; fixed in 1.202.0\n- aws-cdk-lib (npm): affected from 2.0.0; fixed in 2.80.0\n- aws-cdk-lib (npm): affected from 2.0.0; fixed in 2.80.0\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2023-35165/ (Markdown: https://insights.sbomify.com/CVE-2023-35165/index.md)","id":"CVE-2023-35165","markdown":"https://insights.sbomify.com/CVE-2023-35165/index.md","name":"CVE-2023-35165","record":{"aliases":["GHSA-rx28-r23p-2qc3"],"analysis":{"component_type":"cloud_service","fix_type":"upgrade","impacts":["privilege_escalation","security_bypass"],"network_reachable":"yes","non_default_config":false,"product_category":"AWS CDK EKS","requires_auth":"high_privilege","summary":"AWS CDK EKS constructs create overly permissive IAM trust policies, allowing unauthorized privilege escalation and cluster access.","user_interaction":"not_required","vuln_class":"misconfiguration"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[{"product":"aws_cloud_development_kit","vendor":"amazon"}],"cvss":{"score":6.6,"severity":"medium","source":"cna","vector":"CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:U/C:H/I:H/A:H","version":"3.1"},"cwes":[{"id":"CWE-863","name":"Incorrect Authorization"}],"description":"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.","ecosystems":["npm"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"none_known"},"has_fix":true,"headline":"AWS CDK EKS overly permissive trust policies","id":"CVE-2023-35165","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"npm","product":null,"products":[],"type":"misconfiguration","year":"2023"},"n_packages":4,"n_references":2,"next":{"headline":"Privilege escalation (PR) from account through TipsPanel","id":"CVE-2023-35166"},"packages":[{"ecosystem":"npm","fixed":["1.202.0"],"introduced":["1.57.0"],"last_affected":[],"package":"@aws-cdk/aws-eks","purl":null,"source":"GHSA-rx28-r23p-2qc3"},{"ecosystem":"npm","fixed":["1.202.0"],"introduced":["1.57.0"],"last_affected":[],"package":"@aws-cdk/aws-eks","purl":"pkg:npm/%40aws-cdk/aws-eks","source":"GHSA-rx28-r23p-2qc3"},{"ecosystem":"npm","fixed":["2.80.0"],"introduced":["2.0.0"],"last_affected":[],"package":"aws-cdk-lib","purl":null,"source":"GHSA-rx28-r23p-2qc3"},{"ecosystem":"npm","fixed":["2.80.0"],"introduced":["2.0.0"],"last_affected":[],"package":"aws-cdk-lib","purl":"pkg:npm/aws-cdk-lib","source":"GHSA-rx28-r23p-2qc3"}],"prev":{"headline":"Unauthorized users can manipulate a dashboard created by an administrator in DataEase","id":"CVE-2023-35164"},"products":["aws-cdk"],"published":"2023-06-23","related":[{"cvss_score":6.4,"headline":"AWS CDK RestApi not generating authorizationScope correctly in resultant CFN template","id":"CVE-2024-45037","kev_date_added":null,"published":"2024-08-27"},{"cvss_score":5.7,"headline":"AWS CDK CLI prints AWS credentials retrieved by custom credential plugins","id":"CVE-2025-2598","kev_date_added":null,"published":"2025-03-21"},{"cvss_score":1.8,"headline":"IAM OIDC custom resource allows connection to unauthorized OIDC provider in aws-cdk","id":"CVE-2025-23206","kev_date_added":null,"published":"2025-01-17"}],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"attribution","licence":"US public information, NVD API terms","name":"NVD"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"}],"ssvc":{"automatable":"no","exploitation":"none","technical_impact":"total"},"state":"PUBLISHED","updated":"2024-12-05","vendors":["aws"]},"summary":"AWS CDK EKS constructs create overly permissive IAM trust policies, allowing unauthorized privilege escalation and cluster access.","url":"https://insights.sbomify.com/CVE-2023-35165/"}