Ecosyste.ms: Advisories
An open API service providing security vulnerability metadata for many open source software ecosystems.
Security Advisories: GSA_kwCzR0hTQS1xajg1LTY5eGYtMnZ4cc4AA--n
AWS CDK RestApi not generating authorizationScope correctly in resultant CFN template
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
- AWS CDK Documentation: https://docs.aws.amazon.com/cdk/v2/guide/home.html
- AWS CDK RestApi Construct Documentation: https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-[lib.aws](http://lib.aws/)_apigateway.RestApi.html
- AWS CDK CognitoUserPoolsAuthorizer Documentation: https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk- lib.aws_apigateway.CognitoUserPoolsAuthorizer.html
- AWS CDK v2.148.1 Release Notes: https://github.com/aws/aws-cdk/releases/tag/v2.148.1
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 [email protected]. Please do not create a public GitHub issue.
[1] Vulnerability reporting page: https://aws.amazon.com/security/vulnerability-reporting
Permalink: https://github.com/advisories/GHSA-qj85-69xf-2vxqJSON: https://advisories.ecosyste.ms/api/v1/advisories/GSA_kwCzR0hTQS1xajg1LTY5eGYtMnZ4cc4AA--n
Source: GitHub Advisory Database
Origin: Unspecified
Severity: Moderate
Classification: General
Published: 3 months ago
Updated: 2 months ago
CVSS Score: 6.4
CVSS vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:L/A:N
Identifiers: GHSA-qj85-69xf-2vxq, CVE-2024-45037
References:
- https://github.com/aws/aws-cdk/security/advisories/GHSA-qj85-69xf-2vxq
- https://github.com/aws/aws-cdk/commit/4bee768f07e73ab5fe466f9ad3d1845456a0513b
- https://github.com/aws/aws-cdk/releases/tag/v2.148.1
- https://nvd.nist.gov/vuln/detail/CVE-2024-45037
- https://docs.aws.amazon.com/cdk/v2/guide/home.html
- https://github.com/advisories/GHSA-qj85-69xf-2vxq
Blast Radius: 24.9
Affected Packages
npm:aws-cdk
Dependent packages: 796Dependent repositories: 7,755
Downloads: 9,390,392 last month
Affected Version Ranges: >= 2.142.0, <= 2.148.0
Fixed in: 2.148.1
All affected versions: 2.142.0, 2.142.1, 2.143.0, 2.143.1, 2.144.0, 2.145.0, 2.146.0, 2.147.0, 2.147.1, 2.147.2, 2.147.3, 2.148.0
All unaffected versions: 0.8.0, 0.8.1, 0.8.2, 0.9.0, 0.9.1, 0.9.2, 0.10.0, 0.11.0, 0.12.0, 0.13.0, 0.14.0, 0.14.1, 0.15.0, 0.15.1, 0.15.2, 0.16.0, 0.17.0, 0.18.0, 0.18.1, 0.19.0, 0.20.0, 0.21.0, 0.22.0, 0.23.0, 0.24.0, 0.24.1, 0.25.0, 0.25.1, 0.25.2, 0.25.3, 0.26.0, 0.27.0, 0.28.0, 0.29.0, 0.30.0, 0.31.0, 0.32.0, 0.33.0, 0.34.0, 0.35.0, 0.36.0, 0.36.1, 0.36.2, 0.37.0, 0.38.0, 0.39.0, 1.0.0, 1.1.0, 1.2.0, 1.3.0, 1.4.0, 1.5.0, 1.6.0, 1.6.1, 1.7.0, 1.8.0, 1.9.0, 1.10.0, 1.10.1, 1.11.0, 1.12.0, 1.13.0, 1.13.1, 1.14.0, 1.15.0, 1.16.0, 1.16.1, 1.16.2, 1.16.3, 1.17.0, 1.17.1, 1.18.0, 1.19.0, 1.20.0, 1.21.0, 1.21.1, 1.22.0, 1.23.0, 1.24.0, 1.25.0, 1.26.0, 1.27.0, 1.28.0, 1.29.0, 1.30.0, 1.31.0, 1.32.0, 1.32.1, 1.32.2, 1.33.0, 1.33.1, 1.34.0, 1.34.1, 1.35.0, 1.36.0, 1.36.1, 1.37.0, 1.38.0, 1.39.0, 1.40.0, 1.41.0, 1.42.0, 1.42.1, 1.43.0, 1.44.0, 1.45.0, 1.46.0, 1.47.0, 1.47.1, 1.48.0, 1.49.0, 1.49.1, 1.50.0, 1.51.0, 1.52.0, 1.53.0, 1.54.0, 1.55.0, 1.56.0, 1.57.0, 1.58.0, 1.59.0, 1.60.0, 1.61.0, 1.61.1, 1.62.0, 1.63.0, 1.64.0, 1.64.1, 1.65.0, 1.66.0, 1.67.0, 1.68.0, 1.69.0, 1.70.0, 1.71.0, 1.72.0, 1.73.0, 1.74.0, 1.75.0, 1.76.0, 1.77.0, 1.78.0, 1.79.0, 1.80.0, 1.81.0, 1.82.0, 1.83.0, 1.84.0, 1.85.0, 1.86.0, 1.87.0, 1.87.1, 1.88.0, 1.89.0, 1.90.0, 1.90.1, 1.91.0, 1.92.0, 1.93.0, 1.94.0, 1.94.1, 1.95.0, 1.95.1, 1.95.2, 1.96.0, 1.97.0, 1.98.0, 1.99.0, 1.100.0, 1.101.0, 1.102.0, 1.103.0, 1.104.0, 1.105.0, 1.106.0, 1.106.1, 1.107.0, 1.108.0, 1.108.1, 1.109.0, 1.110.0, 1.110.1, 1.111.0, 1.112.0, 1.113.0, 1.114.0, 1.115.0, 1.116.0, 1.117.0, 1.118.0, 1.119.0, 1.120.0, 1.121.0, 1.122.0, 1.123.0, 1.124.0, 1.125.0, 1.126.0, 1.127.0, 1.128.0, 1.129.0, 1.130.0, 1.131.0, 1.132.0, 1.133.0, 1.134.0, 1.135.0, 1.136.0, 1.137.0, 1.138.0, 1.138.1, 1.138.2, 1.139.0, 1.140.0, 1.141.0, 1.142.0, 1.143.0, 1.144.0, 1.145.0, 1.146.0, 1.147.0, 1.148.0, 1.149.0, 1.150.0, 1.151.0, 1.152.0, 1.153.0, 1.153.1, 1.154.0, 1.155.0, 1.156.0, 1.156.1, 1.157.0, 1.158.0, 1.159.0, 1.160.0, 1.161.0, 1.162.0, 1.163.0, 1.163.1, 1.163.2, 1.164.0, 1.165.0, 1.166.1, 1.167.0, 1.168.0, 1.169.0, 1.170.0, 1.170.1, 1.171.0, 1.172.0, 1.173.0, 1.174.0, 1.175.0, 1.176.0, 1.177.0, 1.178.0, 1.179.0, 1.180.0, 1.181.0, 1.181.1, 1.182.0, 1.183.0, 1.184.0, 1.184.1, 1.185.0, 1.186.0, 1.186.1, 1.187.0, 1.188.0, 1.189.0, 1.190.0, 1.191.0, 1.192.0, 1.193.0, 1.194.0, 1.195.0, 1.196.0, 1.197.0, 1.198.0, 1.198.1, 1.199.0, 1.200.0, 1.201.0, 1.202.0, 1.203.0, 1.204.0, 2.0.0, 2.1.0, 2.2.0, 2.3.0, 2.4.0, 2.5.0, 2.6.0, 2.7.0, 2.8.0, 2.9.0, 2.10.0, 2.11.0, 2.12.0, 2.13.0, 2.14.0, 2.15.0, 2.16.0, 2.17.0, 2.18.0, 2.19.0, 2.20.0, 2.21.0, 2.21.1, 2.22.0, 2.23.0, 2.24.0, 2.24.1, 2.25.0, 2.26.0, 2.27.0, 2.28.0, 2.28.1, 2.29.0, 2.29.1, 2.30.0, 2.31.0, 2.31.1, 2.31.2, 2.32.0, 2.32.1, 2.33.0, 2.34.0, 2.34.1, 2.34.2, 2.35.0, 2.36.0, 2.37.0, 2.37.1, 2.38.0, 2.38.1, 2.39.0, 2.39.1, 2.40.0, 2.41.0, 2.42.0, 2.42.1, 2.43.0, 2.43.1, 2.44.0, 2.45.0, 2.46.0, 2.47.0, 2.48.0, 2.49.0, 2.49.1, 2.50.0, 2.51.0, 2.51.1, 2.52.0, 2.52.1, 2.53.0, 2.54.0, 2.55.0, 2.55.1, 2.56.0, 2.56.1, 2.57.0, 2.58.0, 2.58.1, 2.59.0, 2.60.0, 2.61.0, 2.61.1, 2.62.0, 2.62.1, 2.62.2, 2.63.0, 2.63.1, 2.63.2, 2.64.0, 2.65.0, 2.66.0, 2.66.1, 2.67.0, 2.68.0, 2.69.0, 2.70.0, 2.71.0, 2.72.0, 2.72.1, 2.73.0, 2.74.0, 2.75.0, 2.75.1, 2.76.0, 2.77.0, 2.78.0, 2.79.0, 2.79.1, 2.80.0, 2.81.0, 2.82.0, 2.83.0, 2.83.1, 2.84.0, 2.85.0, 2.86.0, 2.87.0, 2.88.0, 2.89.0, 2.90.0, 2.91.0, 2.92.0, 2.93.0, 2.94.0, 2.95.0, 2.95.1, 2.96.0, 2.96.1, 2.96.2, 2.97.0, 2.97.1, 2.98.0, 2.99.0, 2.99.1, 2.100.0, 2.101.0, 2.101.1, 2.102.0, 2.102.1, 2.103.0, 2.103.1, 2.104.0, 2.105.0, 2.106.0, 2.106.1, 2.107.0, 2.108.0, 2.108.1, 2.109.0, 2.110.0, 2.110.1, 2.111.0, 2.112.0, 2.113.0, 2.114.0, 2.114.1, 2.115.0, 2.116.0, 2.116.1, 2.117.0, 2.118.0, 2.119.0, 2.120.0, 2.121.0, 2.121.1, 2.122.0, 2.123.0, 2.124.0, 2.125.0, 2.126.0, 2.127.0, 2.128.0, 2.129.0, 2.130.0, 2.131.0, 2.132.0, 2.132.1, 2.133.0, 2.134.0, 2.135.0, 2.136.0, 2.136.1, 2.137.0, 2.138.0, 2.139.0, 2.139.1, 2.140.0, 2.141.0, 2.148.1, 2.149.0, 2.150.0, 2.151.0, 2.151.1, 2.152.0, 2.153.0, 2.154.0, 2.154.1, 2.155.0, 2.156.0, 2.157.0, 2.158.0, 2.159.0, 2.159.1, 2.160.0, 2.161.0, 2.161.1, 2.162.0, 2.162.1, 2.163.0, 2.163.1, 2.164.0, 2.164.1, 2.165.0, 2.166.0