CVE-2024-45037
AWS CDK RestApi not generating authorizationScope correctly in resultant CFN template
Check your servers for CVE-2024-45037
The Vulnpocalypse collector sends the package list of each Linux server and of its container images once a day. Vulnpocalypse shows every server where CVE-2024-45037 affects aws-cdk, with the command that installs the fix. The free plan covers one server and one domain and does not need a credit card.
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.
Severity (CVSS)
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:L/A:N
- Attack vector
- network: an attacker can reach the vulnerable part over the network, often from the internet
- Attack complexity
- low: an attack works without special conditions
- Privileges required
- low: the attacker needs an ordinary user account
- User interaction
- none: nobody has to click or open anything
- Scope
- changed: the damage reaches other components, such as the host of a container or other users
- Impact
- confidentiality low, integrity low, availability none: what an attacker can read (confidentiality), change (integrity) or stop (availability)
Exploitation
EPSS 0.31%: the probability of exploitation activity in the next 30 days, from the EPSS model of FIRST. The score is higher than 26.2% of all scored CVEs. Scores of 1 Dec 2026.
The assessment of CISA (SSVC, 27 Aug 2024):
- Exploitation
- none: CISA did not find evidence of exploitation or a public proof of concept
- Automatable
- no: each attack takes manual steps
- Technical impact
- partial: limited control or limited data
Weakness
- CWE-863 Incorrect Authorization
Affected products
As the CNA lists them.
Is my server affected?
Find the installed version of aws-cdk and compare it with the fixed version of your distribution. Distributions often fix a CVE in a package version of their own, so the version number of the upstream project can mislead.
Debian, Ubuntu
dpkg -l | grep -i aws-cdk
# packages whose changelog names the CVE (fixed in the installed version)
zgrep -l CVE-2024-45037 /usr/share/doc/*/changelog.Debian.gz
# Ubuntu
pro fix CVE-2024-45037RHEL, Rocky, Alma, Fedora
rpm -q aws-cdk
# lists the advisory while the fix is not installed
dnf updateinfo list --cve CVE-2024-45037Alpine
apk list --installed | grep -i aws-cdkWith Trivy, on the host and for a container image. When a package is affected, it prints the installed and the fixed version:
trivy rootfs --scanners vuln / | grep CVE-2024-45037
trivy image --scanners vuln IMAGE | grep CVE-2024-45037
Vulnpocalypse makes this comparison every day for the package lists of your servers and container images, including language packages (npm, PyPI, Go, Maven and others), and sends the command that installs the fix. Start free with one server and one domain or read how to install the collector.
References
Advisories
Other references
- https://github.com/aws/aws-cdk/commit/4bee768f07e73ab5fe466f9ad3d1845456a0513b github.com
- https://docs.aws.amazon.com/cdk/v2/guide/home.html docs.aws.amazon.com
- https://github.com/aws/aws-cdk/releases/tag/v2.148.1 github.com
Source: the record CVE-2024-45037 of the CVE List (CVE Program), CVE Terms of Use; the CISA KEV catalog and the CISA ADP container; EPSS of FIRST; the CWE catalog of MITRE, CWE Terms of Use. The text of the record is shown as published. Data sources and licences.
Vulnpocalypse