Intel

AIKIDO-2025-10191

aws-cdk-lib is vulnerable to Incorrect Default Permissions

Incorrect Default Permissions Pre-CVE
Found by Aikido Intel before public disclosure or CVE publication.
Published Mar 28, 2025

50

Medium Risk

This Affects:

JSaws-cdk-lib
2.0.0 - 2.183.0
Fixed in 2.184.0
Are you affected? Scan for Free

TL;DR

Affected versions of this package create over-permissive roles for AWS CodePipeline, specifically the 'PipelineProdPromoteToProd' and 'PipelineSource' roles. Those role could be assumed by any entity in the account. As those roles are highly privileged, it could allow an attacker to escalate their privileges within your AWS account.

Who does this affect?

You are affected if you are using a version that falls within the vulnerable range, and define & deploy AWS CodePipeline instances via CDK.

Background info

aws-cdk-lib is vulnerable to Incorrect Default Permissions in versions 2.0.0 - 2.183.0.

How to fix this

Upgrade the aws-cdk-lib library to the patch version. Upgrading to the patched version alone is not sufficient; the feature flag @aws-cdk/pipelines:reduceStageRoleTrustScope must be set to true, and the infrastructure must be redeployed to fully mitigate the issue.