Baja

AWS CDK CodePipeline: trusted entities are too broad

  • Publicada: 24.03.2025
  • Actualizado: 11.10.2026 10:22

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.

Software afectado

Haz clic en una tecnología para ver todas sus vulnerabilidades.

PlataformaPaqueteVersiones vulnerablesCorregida en
Paquete de npm aws-cdk-lib < 2.189.0 2.189.0

Referencias

Puntuación CVSS 3.8/10
Vector CVSS
CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:L/I:L/A:N
Debilidad (CWE)
CWE-276
Plataforma
npm
Paquete
aws-cdk-lib
Publicada
24.03.2025
Actualizado
11.10.2026 10:22

Fuentes y licencias

OSV / GitHub Advisory Database - GHSA-5pq3-h73f-66hr - CC BY 4.0

Historial de vulnerabilidades: aws-cdk-lib

Todas las vulnerabilidades publicadas de este paquete (Paquete de npm), de la más reciente a la más antigua. Muestra si es un fallo aislado o un paquete que hay que vigilar.

Entradas en total
8
Primera → última
06.2023 07.2026
Sin corrección
0
Explotada en ataques
0

Distribución por gravedad

  • Alta 2
  • Media 2
  • Baja 4

Divulgaciones por año

  1. 2023: 1
  2. 2024: 0
  3. 2025: 4
  4. 2026: 3
  1. Baja · 3.3 ghsa-464c-974j-9xm6 < 2.253.0 2.253.0
  2. Alta · 7.3 CVE-2026-13760 < 2.260.0 2.260.0
  3. Alta · 7.3 CVE-2026-11417 < 2.246.0 2.246.0
  4. Baja · 2.2 ghsa-qc59-cxj2-c2w4 >= 2.172.0, < 2.189.1 2.189.1
  5. AWS CDK CodePipeline: trusted entities are too broad esta entrada
    Baja · 3.8 ghsa-5pq3-h73f-66hr < 2.189.0 2.189.0
  6. Media · 6.6 CVE-2023-35165 >= 2.0.0, < 2.80.0 2.80.0

Identifica las vulnerabilidades de tu aplicación

Con la integración de DockRay y el inventario de software activado, DockRay compara las versiones notificadas de los componentes con las vulnerabilidades conocidas y avisa de las coincidencias confirmadas. La cobertura depende de la tecnología compatible y de los avisos disponibles.

Conectar tu aplicación
Newsletter DockRay

La seguridad de tus aplicaciones en tu correo

Vulnerabilidades importantes, recomendaciones concretas y consejos prácticos para tus aplicaciones. Elige tus tecnologías y sigue lo que importa para tu proyecto.

  • Un resumen diario de nuevas vulnerabilidades, también las críticas.
  • Avisos sobre actualizaciones importantes.
  • Consejos prácticos sobre seguridad y monitorización de aplicaciones.

Déjalo vacío para recibir avisos de todas las tecnologías.

Suscripción gratuita. Date de baja con un clic en cualquier correo.