Skip to content

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Mar 25, 2025

This PR contains the following updates:

Package Change Age Confidence
aws-cdk-lib (source) 2.177.0 -> 2.189.1 age confidence

GitHub Vulnerability Alerts

GHSA-qq4x-c6h6-rfxh

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

export class CustomUserPoolClient extends UserPoolClient {

  private readonly customUserPool : UserPool;
  private readonly customuserPoolClientId : string;
  constructor(scope: Construct, id: string, props: UserPoolClientProps) {
    super(scope, id, props);

    this.customUserPool = new UserPool(this, 'pool', {
      removalPolicy: RemovalPolicy.DESTROY,
    });

    const client = this.customUserPool.addClient('client', { generateSecret: true });
  }

  // Override the userPoolClientSecret getter to always return the secret
  public get userPoolClientSecret(): SecretValue {
    // Create the Custom Resource that assists in resolving the User Pool Client secret
    const secretValue = SecretValue.resourceAttribute(new AwsCustomResource(
      this,
      'DescribeCognitoUserPoolClient',
      {
    resourceType: 'Custom::DescribeCognitoUserPoolClient',
    onUpdate: {
      region: cdk.Stack.of(this).region,
      service: 'CognitoIdentityServiceProvider',
      action: 'describeUserPoolClient',
      parameters: {
        UserPoolId: this.customUserPool.userPoolId,
        ClientId: this.customUserPool,
      },
      physicalResourceId: PhysicalResourceId.of(this.userPoolClientId),
      // Disable logging of sensitive data
      logging: Logging.withDataHidden(),
    },
    policy: AwsCustomResourcePolicy.fromSdkCalls({
      resources: [this.customUserPool.userPoolArn],
    }),
    installLatestAwsSdk: false,
      },
    ).getResponseField('UserPoolClient.ClientSecret'));
    
    return secretValue;
  }
}

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 [email protected]. Please do not create a public GitHub issue.

GHSA-5pq3-h73f-66hr

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 [email protected]. Please do not create a public GitHub issue.

GHSA-qc59-cxj2-c2w4

Summary

The AWS Cloud Development Kit (AWS CDK) is an open-source software development framework for defining cloud infrastructure in code and provisioning it through AWS CloudFormation. In the CDK, developers organize their applications into reusable components called "constructs," which are organized into a hierarchical tree structure. One of the features of this framework is the ability to call "Aspects," which are mechanisms to set configuration options for all AWS Resources in a particular part of the hierarchy at once. Aspect execution happens in a specific order, and the last Aspect to execute controls the final values in the template.

AWS CDK version 2.172.0 introduced a new priority system for Aspects. Prior to this version, CDK would run Aspects based on hierarchical location. The new priority system takes precedence over hierarchical location, altering the invocation order of Aspects. Different priority classes were introduced: Aspects added by CDK APIs were classified as MUTATING (priority 200), while Aspects added directly by the user were classified as DEFAULT (priority 500) unless the user specified otherwise. As a result of this change, CDK apps that use a custom Aspect to assign a default permissions boundary and then use a built-in CDK method to override it on select resources could have unexpected permissions boundaries assigned.

The following is an affected code sample:

Aspects.of(stack).add(new CustomAspectThatAssignsDefaultPermissionsBoundaries());   // {1}

PermissionsBoundary.of(lambdaFunc).apply(...);  // {2} -- uses Aspects internally

In versions prior to 2.172.0, the Aspect added by {2} would invoke last and assign its permissions boundary to the Lambda function role.

In versions 2.172.0 and after, the Aspect added by {2} would have priority 200 while the Aspect added by {1} would have priority 500 and therefore be invoked last. The Lambda function role would get the permissions boundary of {1} assigned, which may not be what users expect.

Impact

If an unexpected permissions boundary is selected for a role, it could lead to that role having insufficient permissions. Alternatively, this could lead to a role having wider permissions than intended; however, this could happen only in combination with an overly permissive role policy, as permissions boundaries do not grant permissions by themselves.

Impacted versions: versions 2.172.0 up until 2.189.1

Patches

In version 2.189.1, the behavior has been reverted to the behavior of pre-2.172.0. The new behavior is available through a feature flag:

{
  "context": {
    "@&#8203;aws-cdk/core:aspectPrioritiesMutating": true
  }
}

The patches are included in AWS CDK Library version 2.189.1 and after. We recommend upgrading to the latest version and ensuring any forked or derivative code is patched to incorporate the new fixes.

Workarounds

As a workaround, users can use the location hierarchy to order the invocation of Aspects. To do this, users can assign the custom Aspect a priority of MUTATING to ensure it has the same priority as the Aspect added by the CDK API, and that the location hierarchy is used for the order of invocation Aspects.

The following code is an example:

Aspects.of(stack).add(new CustomAspectThatAssignsDefaultPermissionsBoundaries(), {
  priority: AspectPriority.MUTATING,
});

References

If you have any questions or comments about this advisory, we ask that you contact AWS/Amazon Security via our vulnerability reporting page or directly via email to [email protected]. Please do not create a public GitHub issue.

Credit

We would like to thank GoDaddy for collaborating on this issue through the coordinated vulnerability disclosure process.


Release Notes

aws/aws-cdk (aws-cdk-lib)

v2.189.1

Compare Source

Bug Fixes
  • core: implicit Aspect applications do not override custom Aspect applications (#​34132) (b7f4bc7)

Alpha modules (2.189.1-alpha.0)

v2.189.0

Compare Source

Features
Bug Fixes
  • codepipeline: replace account root principal with pipeline role in trust policy for cross-account actions (under feature flag) (#​34074) (2d901f4)
  • custom-resources: AwsCustomResource assumed role session name may contain invalid characters (#​34016) (32b6b4d), closes #​23260 #​34011

Alpha modules (2.189.0-alpha.0)

Features
Bug Fixes

v2.188.0

Compare Source

Features
Bug Fixes

Alpha modules (2.188.0-alpha.0)

Features
Bug Fixes

v2.187.0

Compare Source

Features
Bug Fixes

Alpha modules (2.187.0-alpha.0)

Features

v2.186.0

Compare Source

⚠ BREAKING CHANGES TO EXPERIMENTAL FEATURES
  • redshiftserverless: The CfnWorkgroup.attrWorkgroupMaxCapacity attribute has been removed.
  • quicksight: The CfnAnalysis.SheetTextBoxProperty.interactions, CfnDashboard.SheetTextBoxProperty.interactions, and CfnTemplate.SheetTextBoxProperty.interactions properties have been removed.
  • imagebuilder: The CfnDistributionConfiguration.DistributionProperty.ssmParameterConfigurations property has been removed.
Features
Bug Fixes

Alpha modules (2.186.0-alpha.0)

Features
Bug Fixes

v2.185.0

Compare Source

Features
Bug Fixes

Alpha modules (2.185.0-alpha.0)

⚠ BREAKING CHANGES TO EXPERIMENTAL FEATURES
  • scheduler-targets-alpha: The class KinesisDataFirehosePutRecord has been renamed to FirehosePutRecord.
Bug Fixes

v2.184.1

Compare Source

Reverts

Alpha modules (2.184.1-alpha.0)

v2.184.0

Compare Source

Features
Bug Fixes

Alpha modules (2.184.0-alpha.0)

⚠ BREAKING CHANGES TO EXPERIMENTAL FEATURES
  • glue-alpha: Updated casing of workflow.addconditionalTrigger to workflow.addConditionalTrigger.
Bug Fixes

v2.183.0

Compare Source

Features
Bug Fixes

Alpha modules (2.183.0-alpha.0)

⚠ BREAKING CHANGES TO EXPERIMENTAL FEATURES
  • scheduler-targets-alpha: The InspectorStartAssessmentRun target's constructor now accepts IAssessmentTemplate instead of CfnAssessmentTemplate as its parameter type. To migrate existing code, use the AssessmentTemplate.fromCfnAssessmentTemplate() method to convert your CfnAssessmentTemplate instances to IAssessmentTemplate.
Features
  • kinesisanalytics-flink-alpha: backfill missing enums for kinesisanalytics-flink-alpha (#​33632) (b55199a)
  • kinesisfirehose-destinations-alpha: backfill missing enums for kinesisfirehose-destinations-alpha (#​33633) (6ed7a45)
Bug Fixes
  • scheduler-alpha: deprecate Group in favour of ScheduleGroup (#​33678) (4d8eae9)
  • scheduler-targets-alpha: update inspector target to use IAssessmentTemplate instead of CfnAssessmentTemplate (#​33682) (50ba3ef)

v2.182.0

Compare Source

Features
Bug Fixes

Configuration

📅 Schedule: Branch creation - "" (UTC), Automerge - At any time (no schedule defined).

🚦 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 these updates again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

Copy link
Contributor Author

renovate bot commented Mar 25, 2025

Branch automerge failure

This PR was configured for branch automerge. However, this is not possible, so it has been raised as a PR instead.


  • Branch has one or more failed status checks

@renovate renovate bot force-pushed the renovate/npm-aws-cdk-lib-vulnerability branch 9 times, most recently from 06a61c4 to 0b0d3b0 Compare March 30, 2025 22:53
@renovate renovate bot changed the title chore(deps): update dependency aws-cdk-lib to v2.184.0 [security] chore(deps): update dependency aws-cdk-lib to v2.184.0 [security] - autoclosed Mar 31, 2025
@renovate renovate bot closed this Mar 31, 2025
@renovate renovate bot deleted the renovate/npm-aws-cdk-lib-vulnerability branch March 31, 2025 23:11
@renovate renovate bot changed the title chore(deps): update dependency aws-cdk-lib to v2.184.0 [security] - autoclosed chore(deps): update dependency aws-cdk-lib to v2.184.0 [security] Apr 1, 2025
@renovate renovate bot reopened this Apr 1, 2025
@renovate renovate bot force-pushed the renovate/npm-aws-cdk-lib-vulnerability branch from 353be00 to 0b0d3b0 Compare April 1, 2025 03:04
@renovate renovate bot changed the title chore(deps): update dependency aws-cdk-lib to v2.184.0 [security] chore(deps): update dependency aws-cdk-lib to v2.187.0 [security] Apr 1, 2025
@renovate renovate bot force-pushed the renovate/npm-aws-cdk-lib-vulnerability branch 7 times, most recently from 81b8987 to 4b4d830 Compare April 7, 2025 05:41
@renovate renovate bot force-pushed the renovate/npm-aws-cdk-lib-vulnerability branch 3 times, most recently from a350f69 to 56785d7 Compare April 10, 2025 07:32
@renovate renovate bot changed the title chore(deps): update dependency aws-cdk-lib to v2.187.0 [security] chore(deps): update dependency aws-cdk-lib to v2.189.0 [security] Apr 10, 2025
@renovate renovate bot force-pushed the renovate/npm-aws-cdk-lib-vulnerability branch 2 times, most recently from d73fd63 to 088e057 Compare April 12, 2025 03:27
@renovate renovate bot force-pushed the renovate/npm-aws-cdk-lib-vulnerability branch 8 times, most recently from 8b78b02 to 17255f0 Compare August 11, 2025 00:39
@renovate renovate bot force-pushed the renovate/npm-aws-cdk-lib-vulnerability branch 6 times, most recently from 91d23a7 to 5ae134d Compare August 15, 2025 21:51
@renovate renovate bot force-pushed the renovate/npm-aws-cdk-lib-vulnerability branch 8 times, most recently from e9ac3a8 to 1ec1122 Compare August 27, 2025 23:14
@renovate renovate bot force-pushed the renovate/npm-aws-cdk-lib-vulnerability branch 6 times, most recently from e090cda to 3fe58d7 Compare September 3, 2025 20:37
@renovate renovate bot force-pushed the renovate/npm-aws-cdk-lib-vulnerability branch from 3fe58d7 to 448dab4 Compare September 25, 2025 21:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants