Update dependency aws-cdk-lib to v2.246.0 [SECURITY]#4
Open
renovate[bot] wants to merge 1 commit into
Open
Conversation
Contributor
Author
|
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
1de5da9 to
bcffb79
Compare
bcffb79 to
70b50c4
Compare
70b50c4 to
61b2990
Compare
61b2990 to
04ea7f6
Compare
04ea7f6 to
6cef65d
Compare
6cef65d to
228d436
Compare
228d436 to
61d439f
Compare
61d439f to
cda37bc
Compare
cda37bc to
e096289
Compare
e096289 to
8342720
Compare
8342720 to
f6afdea
Compare
f6afdea to
d5789dd
Compare
d5789dd to
73202fb
Compare
73202fb to
71aba60
Compare
71aba60 to
c9fd2b5
Compare
c9fd2b5 to
1209b1d
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
2.164.1→2.246.0AWS Cloud Development Kit (AWS CDK) IAM OIDC custom resource allows connection to unauthorized OIDC provider
CVE-2025-23206 / GHSA-v4mq-x674-ff73
More information
Details
Impact
Users who use IAM OIDC custom resource provider package will download CA Thumbprints as part of the custom resource workflow, https://github.com/aws/aws-cdk/blob/d16482fc8a4a3e1f62751f481b770c09034df7d2/packages/%40aws-cdk/custom-resource-handlers/lib/aws-iam/oidc-handler/external.ts#L34.
However, the current
tls.connectmethod will always setrejectUnauthorized: falsewhich is a potential security concern. CDK should follow the best practice and setrejectUnauthorized: true. However, this could be a breaking change for existing CDK applications and we should fix this with a feature flag.Note that this is marked as low severity Security advisory because the issuer url is provided by CDK users who define the CDK application. If they insist on connecting to a unauthorized OIDC provider, CDK should not disallow this. Additionally, the code block is run in a Lambda environment which mitigate the MITM attack.
As a best practice, CDK should still fix this issue under a feature flag to avoid regression.
Patches
The patch is in progress. To mitigate, upgrade to CDK v2.177.0 (Expected release date 2025-02-22).
Once upgraded, please make sure the feature flag '@aws-cdk/aws-iam:oidcRejectUnauthorizedConnections' is set to true in
cdk.context.jsonorcdk.json. More details on feature flag setting is here.Workarounds
N/A
References
https://github.com/aws/aws-cdk/issues/32920
Severity
CVSS:4.0/AV:N/AC:H/AT:P/PR:H/UI:A/VC:L/VI:L/VA:L/SC:N/SI:N/SA:NReferences
This data is provided by the GitHub Advisory Database (CC-BY 4.0).
aws-cdk-lib has Insertion of Sensitive Information into Log File vulnerability when using Cognito UserPoolClient Construct
GHSA-qq4x-c6h6-rfxh
More information
Details
Summary
The AWS Cloud Development Kit (CDK) is an open-source framework for defining cloud infrastructure using code. Customers use it to create their own applications which are converted to AWS CloudFormation templates during deployment to a customer’s AWS account. CDK contains pre-built components called "constructs" that are higher-level abstractions providing defaults and best practices. This approach enables developers to use familiar programming languages to define complex cloud infrastructure more efficiently than writing raw CloudFormation templates.
The CDK Cognito UserPool construct deploys an AWS cognito user pool. An Amazon Cognito user pool is a user directory for web and mobile app authentication and authorization. Customers can deploy a client under this user pool through construct ‘UserPoolClient’ or through helper method 'addClient'. A user pool client resource represents an Amazon Cognito user pool client which is a configuration within a user pool that interacts with one mobile or web application authenticating with Amazon Cognito.
When users of the 'cognito.UserPoolClient' construct generate a secret value for the application client in AWS CDK, they can then reference the generated secrets in their stack. The CDK had an issue where, when the custom resource performed an SDK API call to 'DescribeCognitoUserPoolClient' to retrieve the generated secret, the full response was logged in the associated lambda function's log group. Any user authenticated in the account where logs of the custom resource are accessible and who has read-only permission could view the secret written to those logs.
This issue does not affect customers who are generating the secret value outside of the CDK as the secret is not referenced or logged.
Impact
To leverage this issue, an actor has to be authenticated in the account where logs of the custom resource Custom::DescribeCognitoUserPoolClient are accessible and have read-only permission for lambda function logs.
Users can review access to their log group through AWS CloudTrail logs to detect any unexpected access to read the logs.
Impacted versions: >2.37.0 and <=2.187.0
Patches
The patches are included in the AWS CDK Library release v2.187.0. We recommend upgrading to the latest version and ensuring any forked or derivative code is patched to incorporate the new fixes. To fully address this issue, users should rotate the secret by generating a new secret stored in AWS Secrets Manager. References to the secret will use the new secret on update.
When new CDK applications using the latest version are initialized, they will use the new behavior with updated logging.
Existing applications must upgrade to the latest version, change the feature flag (@aws-cdk/cognito:logUserPoolClientSecretValue) to false, redeploy the application to apply this fix and use the new implementation with updated logging behavior.
Workarounds
Users can override the implementation changing Logging to be Logging.withDataHidden(). For example define class CustomUserPoolClient extends UserPoolClient and in the new class define get userPoolClientSecret() to use Logging.withDataHidden().
Example
References
If you have any questions or comments about this advisory please contact AWS/Amazon Security via our vulnerability reporting page or directly via email to aws-security@amazon.com. Please do not create a public GitHub issue.
Severity
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:NReferences
This data is provided by the GitHub Advisory Database (CC-BY 4.0).
AWS CDK CodePipeline: trusted entities are too broad
GHSA-5pq3-h73f-66hr
More information
Details
Summary
The AWS Cloud Development Kit (CDK) is an open-source framework for defining cloud infrastructure using code. Users use it to create their own applications, which are converted to AWS CloudFormation templates during deployment to a user's AWS account. AWS CDK contains pre-built components called "constructs," which are higher-level abstractions providing defaults and best practices. This approach enables developers to use familiar programming languages to define complex cloud infrastructure more efficiently than writing raw CloudFormation templates.
The AWS CodePipeline construct deploys CodePipeline, a managed service that orchestrates software release processes through a series of stages, each comprising one or more actions executed by CodePipeline. To perform these actions, CodePipeline assumes IAM roles with permissions necessary for each step, allowing it to interact with AWS services and resources on behalf of the user.
An issue exists where, when using CDK to create a CodePipeline with the CDK Construct Library, CDK creates an AWS Identity and Access Management (AWS IAM) trust policy with overly broad permissions. Any user with unrestricted sts:AssumeRole permissions could assume that trust policy. This issue does not affect users who supply their own role for CodePipeline.
Impact
To leverage the issue, an actor has to be authenticated in the account and have an unrestricted sts:AssumeRole permission. The permissions an actor could leverage depend on the actions added to the pipeline. Possible permissions include actions on services such as CloudFormation, CodeCommit, Lambda, and ECS, as well as access to the S3 bucket holding pipeline build artifacts (see documentation).
Users can review their AWS CloudTrail logs for when the role was assumed to determine if this was expected.
Impacted versions: <v2.189.0
Patches
The patches are included in the CDK Construct Library release v2.189.0. We recommend upgrading to the latest version and ensuring any forked or derivative code is patched to incorporate the new fixes.
When new CDK applications using the latest version are initialized, they will use the new behavior with more restrictive permissions.
Existing applications must upgrade to the latest version, change the feature flag (@aws-cdk/pipelines:reduceStageRoleTrustScope) and (@aws-cdk/pipelines:reduceCrossAccountActionRoleTrustScope) to true and redeploy the application to apply this fix and use the new behavior with more restrictive permissions.
Workarounds
You can explicitly supply the role for your CodePipeline and follow the policy recommendations detailed in CodePipeline documentation.
References
Original reporting issue.
If you have any questions or comments about this advisory please contact AWS/Amazon Security via our vulnerability reporting page or directly via email to aws-security@amazon.com. Please do not create a public GitHub issue.
Severity
CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:L/I:L/A:NReferences
This data is provided by the GitHub Advisory Database (CC-BY 4.0).
aws-cdk-lib: OS Command Injection in NodejsFunction Bundling
CVE-2026-11417 / GHSA-999r-qq7v-r334
More information
Details
Summary
AWS CDK (
aws-cdk-lib) is an open-source framework for defining cloud infrastructure in code and provisioning it through AWS CloudFormation. OS command injection in theNodejsFunctionlocal bundling pipeline inaws-cdk-libbefore 2.245.0 (2.246.0 on Windows) might allow a threat actor who controls the value of one or more bundling properties (externalModules,define,loader,inject, oresbuildArgs) to execute arbitrary commands on the host running the CDK toolchain via injected shell metacharacters. This issue requires the threat actor to control the value of one or more of the affected bundling properties in the CDK application.Impact
During local Lambda bundling,
NodejsFunctionassembled an esbuild command string from the bundling propertiesexternalModules,define,loader,inject, andesbuildArgsand executed it via a shell (bash -con Linux/macOS,cmd /con Windows) throughspawnSync. The property values were interpolated without escaping or validation, so values containing shell metacharacters could execute arbitrary commands with the privileges of the user runningcdk synth,cdk deploy, orcdk diff. Exploitation requires a threat actor to control one or more of the affected property values in the CDK application — for example via an untrusted npm dependency that vends a wrapper construct, or via a pull request that introduces untrusted values.Impacted versions:
< 2.245.0 (on Windows, < 2.246.0)
Patches
This issue has been addressed in
aws-cdk-libversion 2.245.0 (PR #37292), with a Windows-specific regression fix in 2.246.0 (PR #37412). The fix replaces shell-based command execution with array-basedspawnSyncinvocation that does not invoke a shell. We recommend upgrading to the latest version and ensuring any forked or derivative code is patched to incorporate the new fixes.Workarounds
Ensure the values supplied to
NodejsFunctionbundling properties (externalModules,define,loader,inject,esbuildArgs) originate only from trusted sources, and audit third-party constructs and pull requests that set them. Upgrading to a fixed version is the recommended remediation.References
If you have any questions or comments about this advisory, we ask that you contact AWS Security via our vulnerability reporting page or directly via email to aws-security@amazon.com. Please do not create a public GitHub issue.
Acknowledgement
AWS would like to thank the external researcher Hesham Ashraf who reported this issue through the AWS Vulnerability Disclosure Program (HackerOne) for collaborating on it through the coordinated vulnerability disclosure process.
Severity
CVSS:4.0/AV:L/AC:L/AT:N/PR:L/UI:A/VC:H/VI:H/VA:H/SC:N/SI:N/SA:NReferences
This data is provided by the GitHub Advisory Database (CC-BY 4.0).
AWS Cloud Development Kit (AWS CDK) IAM OIDC custom resource allows connection to unauthorized OIDC provider
CVE-2025-23206 / GHSA-v4mq-x674-ff73
More information
Details
Impact
Users who use IAM OIDC custom resource provider package will download CA Thumbprints as part of the custom resource workflow, https://github.com/aws/aws-cdk/blob/d16482fc8a4a3e1f62751f481b770c09034df7d2/packages/%40aws-cdk/custom-resource-handlers/lib/aws-iam/oidc-handler/external.ts#L34.
However, the current
tls.connectmethod will always setrejectUnauthorized: falsewhich is a potential security concern. CDK should follow the best practice and setrejectUnauthorized: true. However, this could be a breaking change for existing CDK applications and we should fix this with a feature flag.Note that this is marked as low severity Security advisory because the issuer url is provided by CDK users who define the CDK application. If they insist on connecting to a unauthorized OIDC provider, CDK should not disallow this. Additionally, the code block is run in a Lambda environment which mitigate the MITM attack.
As a best practice, CDK should still fix this issue under a feature flag to avoid regression.
Patches
The patch is in progress. To mitigate, upgrade to CDK v2.177.0 (Expected release date 2025-02-22).
Once upgraded, please make sure the feature flag '@aws-cdk/aws-iam:oidcRejectUnauthorizedConnections' is set to true in
cdk.context.jsonorcdk.json. More details on feature flag setting is here.Workarounds
N/A
References
https://github.com/aws/aws-cdk/issues/32920
Severity
CVSS:4.0/AV:N/AC:H/AT:P/PR:H/UI:A/VC:L/VI:L/VA:L/SC:N/SI:N/SA:NReferences
This data is provided by OSV and the GitHub Advisory Database (CC-BY 4.0).
aws-cdk-lib has Insertion of Sensitive Information into Log File vulnerability when using Cognito UserPoolClient Construct
GHSA-qq4x-c6h6-rfxh
More information
Details
Summary
The AWS Cloud Development Kit (CDK) is an open-source framework for defining cloud infrastructure using code. Customers use it to create their own applications which are converted to AWS CloudFormation templates during deployment to a customer’s AWS account. CDK contains pre-built components called "constructs" that are higher-level abstractions providing defaults and best practices. This approach enables developers to use familiar programming languages to define complex cloud infrastructure more efficiently than writing raw CloudFormation templates.
The CDK Cognito UserPool construct deploys an AWS cognito user pool. An Amazon Cognito user pool is a user directory for web and mobile app authentication and authorization. Customers can deploy a client under this user pool through construct ‘UserPoolClient’ or through helper method 'addClient'. A user pool client resource represents an Amazon Cognito user pool client which is a configuration within a user pool that interacts with one mobile or web application authenticating with Amazon Cognito.
When users of the 'cognito.UserPoolClient' construct generate a secret value for the application client in AWS CDK, they can then reference the generated secrets in their stack. The CDK had an issue where, when the custom resource performed an SDK API call to 'DescribeCognitoUserPoolClient' to retrieve the generated secret, the full response was logged in the associated lambda function's log group. Any user authenticated in the account where logs of the custom resource are accessible and who has read-only permission could view the secret written to those logs.
This issue does not affect customers who are generating the secret value outside of the CDK as the secret is not referenced or logged.
Impact
To leverage this issue, an actor has to be authenticated in the account where logs of the custom resource Custom::DescribeCognitoUserPoolClient are accessible and have read-only permission for lambda function logs.
Users can review access to their log group through AWS CloudTrail logs to detect any unexpected access to read the logs.
Impacted versions: >2.37.0 and <=2.187.0
Patches
The patches are included in the AWS CDK Library release v2.187.0. We recommend upgrading to the latest version and ensuring any forked or derivative code is patched to incorporate the new fixes. To fully address this issue, users should rotate the secret by generating a new secret stored in AWS Secrets Manager. References to the secret will use the new secret on update.
When new CDK applications using the latest version are initialized, they will use the new behavior with updated logging.
Existing applications must upgrade to the latest version, change the feature flag (@aws-cdk/cognito:logUserPoolClientSecretValue) to false, redeploy the application to apply this fix and use the new implementation with updated logging behavior.
Workarounds
Users can override the implementation changing Logging to be Logging.withDataHidden(). For example define class CustomUserPoolClient extends UserPoolClient and in the new class define get userPoolClientSecret() to use Logging.withDataHidden().
Example
References
If you have any questions or comments about this advisory please contact AWS/Amazon Security via our vulnerability reporting page or directly via email to aws-security@amazon.com. Please do not create a public GitHub issue.
Severity
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:NReferences
This data is provided by OSV and the GitHub Advisory Database (CC-BY 4.0).
AWS CDK CodePipeline: trusted entities are too broad
GHSA-5pq3-h73f-66hr
More information
Details
Summary
The AWS Cloud Development Kit (CDK) is an open-source framework for defining cloud infrastructure using code. Users use it to create their own applications, which are converted to AWS CloudFormation templates during deployment to a user's AWS account. AWS CDK contains pre-built components called "constructs," which are higher-level abstractions providing defaults and best practices. This approach enables developers to use familiar programming languages to define complex cloud infrastructure more efficiently than writing raw CloudFormation templates.
The AWS CodePipeline construct deploys CodePipeline, a managed service that orchestrates software release processes through a series of stages, each comprising one or more actions executed by CodePipeline. To perform these actions, CodePipeline assumes IAM roles with permissions necessary for each step, allowing it to interact with AWS services and resources on behalf of the user.
An issue exists where, when using CDK to create a CodePipeline with the CDK Construct Library, CDK creates an AWS Identity and Access Management (AWS IAM) trust policy with overly broad permissions. Any user with unrestricted sts:AssumeRole permissions could assume that trust policy. This issue does not affect users who supply their own role for CodePipeline.
Impact
To leverage the issue, an actor has to be authenticated in the account and have an unrestricted sts:AssumeRole permission. The permissions an actor could leverage depend on the actions added to the pipeline. Possible permissions include actions on services such as CloudFormation, CodeCommit, Lambda, and ECS, as well as access to the S3 bucket holding pipeline build artifacts (see documentation).
Users can review their AWS CloudTrail logs for when the role was assumed to determine if this was expected.
Impacted versions: <v2.189.0
Patches
The patches are included in the CDK Construct Library release v2.189.0. We recommend upgrading to the latest version and ensuring any forked or derivative code is patched to incorporate the new fixes.
When new CDK applications using the latest version are initialized, they will use the new behavior with more restrictive permissions.
Existing applications must upgrade to the latest version, change the feature flag (@aws-cdk/pipelines:reduceStageRoleTrustScope) and (@aws-cdk/pipelines:reduceCrossAccountActionRoleTrustScope) to true and redeploy the application to apply this fix and use the new behavior with more restrictive permissions.
Workarounds
You can explicitly supply the role for your CodePipeline and follow the policy recommendations detailed in CodePipeline documentation.
References
Original reporting issue.
If you have any questions or comments about this advisory please contact AWS/Amazon Security via our vulnerability reporting page or directly via email to aws-security@amazon.com. Please do not create a public GitHub issue.
Severity
CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:L/I:L/A:NReferences
This data is provided by OSV and the GitHub Advisory Database (CC-BY 4.0).
aws-cdk-lib: OS Command Injection in NodejsFunction Bundling
CVE-2026-11417 / GHSA-999r-qq7v-r334
More information
Details
Summary
AWS CDK (
aws-cdk-lib) is an open-source framework for defining cloud infrastructure in code and provisioning it through AWS CloudFormation. OS command injection in theNodejsFunctionlocal bundling pipeline inaws-cdk-libbefore 2.245.0 (2.246.0 on Windows) might allow a threat actor who controls the value of one or more bundling properties (externalModules,define,loader,inject, oresbuildArgs) to execute arbitrary commands on the host running the CDK toolchain via injected shell metacharacters. This issue requires the threat actor to control the value of one or more of the affected bundling properties in the CDK application.Impact
During local Lambda bundling,
NodejsFunctionassembled an esbuild command string from the bundling propertiesexternalModules,define,loader,inject, andesbuildArgsand executed it via a shell (bash -con Linux/macOS,cmd /con Windows) throughspawnSync. The property values were interpolated without escaping or validation, so values containing shell metacharacters could execute arbitrary commands with the privileges of the user runningcdk synth,cdk deploy, orcdk diff. Exploitation requires a threat actor to control one or more of the affected property values in the CDK application — for example via an untrusted npm dependency that vends a wrapper construct, or via a pull request that introduces untrusted values.Impacted versions:
< 2.245.0 (on Windows, < 2.246.0)
Patches
This issue has been addressed in
aws-cdk-libversion 2.245.0 (PR #37292), with a Windows-specific regression fix in 2.246.0 (PR #37412). The fix replaces shell-based command execution with array-basedspawnSyncinvocation that does not invoke a shell. We recommend upgrading to the latest version and ensuring any forked or derivative code is patched to incorporate the new fixes.Workarounds
Ensure the values supplied to
NodejsFunctionbundling properties (externalModules,define,loader,inject,esbuildArgs) originate only from trusted sources, and audit third-party constructs and pull requests that set them. Upgrading to a fixed version is the recommended remediation.References
If you have any questions or comments about this advisory, we ask that you contact AWS Security via our vulnerability reporting page or directly via email to aws-security@amazon.com. Please do not create a public GitHub issue.
Acknowledgement
AWS would like to thank the external researcher Hesham Ashraf who reported this issue through the AWS Vulnerability Disclosure Program (HackerOne) for collaborating on it through the coordinated vulnerability disclosure process.
Severity
CVSS:4.0/AV:L/AC:L/AT:N/PR:L/UI:A/VC:H/VI:H/VA:H/SC:N/SI:N/SA:NReferences
This data is provided by OSV and the GitHub Advisory Database (CC-BY 4.0).
Release Notes
aws/aws-cdk (aws-cdk-lib)
v2.246.0Compare Source
Features
Bug Fixes
Reverts
Alpha modules (2.246.0-alpha.0)
v2.245.0Compare Source
Features
Bug Fixes
Alpha modules (2.245.0-alpha.0)
Features
v2.244.0Compare Source
Features
actions()method to Grants classes (#36987) (bbeaf5d)Bug Fixes
Alpha modules (2.244.0-alpha.0)
Bug Fixes
v2.243.0Compare Source
Features
Bug Fixes
Alpha modules (2.243.0-alpha.0)
v2.242.0Compare Source
⚠ BREAKING CHANGES
** L1 resources are automatically generated from public CloudFormation Resource Schemas. They are built to closely reflect the real state of CloudFormation. Sometimes these updates can contain changes that are incompatible with previous types, but more accurately reflect reality. In this release we have changed:
Features
PropertyMergeStrategyto merge arbitrary CFN property objects (#37206) (793ad97)s3andecsservice mixins are now available inaws-cdk-lib(#37151) (52c99da)Bug Fixes
Assetuses a lot of memory (#37186) (70cae75)enableAutoSoftwareUpdate: falseis not reflected in the CloudFormation template (#37152) (dec8e6f), closes #36382Configuration
📅 Schedule: (in timezone Asia/Jerusalem)
🚦 Automerge: Enabled.
♻ Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.