CVE-2024-45037
JSON

6.4medium

AWS CDK RestApi not generating authorizationScope correctly in resultant CFN template

Severity
6.4medium CVSS:3.1 by GitHub_M
Exploit likelihood
0.31% (higher than 26% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
GitHub_M
Also known as
GHSA-qj85-69xf-2vxq

Description

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. We identified an issue in AWS Cloud Development Kit (CDK) which, under certain conditions, can result in granting authenticated Amazon Cognito users broader than intended access. Specifically, if a CDK application uses the "RestApi" construct with "CognitoUserPoolAuthorizer" as the authorizer and uses authorization scopes to limit access. This issue does not affect the availability of the specific API resources. Authenticated Cognito users may gain unintended access to protected API resources or methods, leading to potential data disclosure, and modification issues. Impacted versions: >=2.142.0;<=2.148.0. A patch is included in CDK versions >=2.148.1. Users are advised to upgrade their AWS CDK version to 2.148.1 or newer and re-deploy their application(s) to address this issue.

Affected

Product or packageVersionsReported by
aws aws-cdk>= 2.142.0, < 2.148.1CVE List
aws-cdk (npm)from 2.142.0 before 2.148.1GitHub Advisory Database
amazon aws_cloud_development_kitfrom 2.142.0 before 2.148.1NVD

All scores

GitHub_M6.4medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:L/A:N
GitHub6.4medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:L/A:N
GitHubmedium CVSS:4.0CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N

Classification

CWE-863

SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial.

What each source says

CVE List

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. We identified an issue in AWS Cloud Development Kit (CDK) which, under certain conditions, can result in granting authenticated Amazon Cognito users broader than intended access. Specifically, if a CDK application uses the "RestApi" construct with "CognitoUserPoolAuthorizer" as the authorizer and uses authorization scopes to limit access. This issue does not affect the availability of the specific API resources. Authenticated Cognito users may gain unintended access to protected API resources or methods, leading to potential data disclosure, and modification issues. Impacted versions: >=2.142.0;<=2.148.0. A patch is included in CDK versions >=2.148.1. Users are advised to upgrade their AWS CDK version to 2.148.1 or newer and re-deploy their application(s) to address this issue.

GitHub Advisory Database
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.

We identified an issue in AWS Cloud Development Kit (CDK) which, under certain conditions, can result in granting authenticated Amazon Cognito users broader than intended access. Specifically, if a CDK application uses the "RestApi" construct with "CognitoUserPoolAuthorizer" as the authorizer and uses authorization scopes to limit access. This issue does not affect the availability of the specific API resources.

Impact

Authenticated Cognito users may gain unintended access to protected API resources or methods, leading to potential data disclosure, and modification issues.

Impacted versions: >=2.142.0;<=2.148.0

Patches

The patch is included in CDK version >=2.148.1.

Recommended Actions
  • Upgrade your AWS CDK version to 2.148.1 or newer and re-deploy your application(s) to address this issue.
  • If you are using older CDK versions before 2.142.0, you are not affected by this issue, however it is recommended to upgrade to the latest version to receive the latest features and fixes.
  • Confirm whether your application(s) is affected by searching for "CognitoUserPoolsAuthorizer" in your CDK application. If it is referenced inside the "RestApi" construct, and the "RestApi" resource or method utilize authorization scopes to limit access, and you deployed your applications using the impacted versions of CDK, your application is affected.
References

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

[1] Vulnerability reporting page: https://aws.amazon.com/security/vulnerability-reporting

NVD (es)

El kit de desarrollo de la nube (CDK) de AWS es un framework de código abierto para definir la infraestructura de la nube mediante código. Los clientes lo utilizan para crear sus propias aplicaciones que se convierten en plantillas de AWS CloudFormation durante la implementación en la cuenta de AWS del cliente. CDK contiene componentes prediseñados llamados "construcciones" que son abstracciones de nivel superior que proporcionan valores predeterminados y mejores prácticas. Este enfoque permite a los desarrolladores utilizar lenguajes de programación familiares para definir una infraestructura de nube compleja de manera más eficiente que escribir plantillas de CloudFormation sin procesar. Identificamos un problema en el kit de desarrollo de la nube (CDK) de AWS que, bajo ciertas condiciones, puede dar lugar a que se otorgue a los usuarios autenticados de Amazon Cognito un acceso más amplio del previsto. Específicamente, si una aplicación CDK usa la construcción "RestApi" con "CognitoUserPoolAuthorizer" como autorizador y usa alcances de autorización para limitar el acceso. Este problema no afecta la disponibilidad de los recursos API específicos. Los usuarios autenticados de Cognito pueden obtener acceso no deseado a recursos o métodos de API protegidos, lo que puede generar problemas de modificación y divulgación de datos. Versiones afectadas: &gt;=2.142.0;&lt;=2.148.0. Se incluye un parche en las versiones CDK &gt;=2.148.1. Se recomienda a los usuarios que actualicen su versión de AWS CDK a 2.148.1 o más reciente y vuelvan a implementar sus aplicaciones para solucionar este problema.

References

Sources

SourceRecordLicence
CVE ListCVE-2024-45037 changed 2024-08-27CVE Terms of Use
GitHub Advisory DatabaseGHSA-qj85-69xf-2vxq changed 2024-08-28CC-BY-4.0
NVDCVE-2024-45037 changed 2026-06-17Public domain