# CVE-2024-37293: aws-deployment-framework's potential risk can lead to privilege escalation

> Attackers with CodeBuild or Lambda modification permissions can escalate privileges to Administrator level due to unrestricted STS AssumeRole permissions in the bootstrap process.

- **Severity:** High 7.6 (`CVSS:3.1/AV:L/AC:H/PR:H/UI:N/S:C/C:H/I:H/A:H`)
- **Exploited in the wild:** Not known
- **Login needed:** An administrator
- **Attackable:** Local or same network only
- **Victim action needed:** Not needed
- **Fix available:** No
- **Published:** 11 Jun 2024
- **Updated:** 2 Aug 2024
- **Also known as:** GHSA-mcj7-ppmv-h6jr

## What is CVE-2024-37293?

CVE-2024-37293 is a high-severity vulnerability in awslabs aws-deployment-framework, published on 11 Jun 2024. It can only be exploited from the same machine or local network, with no action from the victim.

### Official description

The AWS Deployment Framework (ADF) is a framework to manage and deploy resources across multiple AWS accounts and regions within an AWS Organization. ADF allows for staged, parallel, multi-account, cross-region deployments of applications or resources via the structure defined in AWS Organizations while taking advantage of services such as AWS CodePipeline, AWS CodeBuild, and AWS CodeCommit to alleviate the heavy lifting and management compared to a traditional CI/CD setup. ADF contains a bootstrap process that is responsible to deploy ADF's bootstrap stacks to facilitate multi-account cross-region deployments. The ADF bootstrap process relies on elevated privileges to perform this task. Two versions of the bootstrap process exist; a code-change driven pipeline using AWS CodeBuild and an event-driven state machine using AWS Lambda. If an actor has permissions to change the behavior of the CodeBuild project or the Lambda function, they would be able to escalate their privileges.

Prior to version 4.0.0, the bootstrap CodeBuild role provides access to the `sts:AssumeRole` operation without further restrictions. Therefore, it is able to assume into any AWS Account in the AWS Organization with the elevated privileges provided by the cross-account access role. By default, this role is not restricted when it is created by AWS Organizations, providing Administrator level access to the AWS resources in the AWS Account. The patches for this issue are included in `aws-deployment-framework` version 4.0.0.

As a temporary mitigation, add a permissions boundary to the roles created by ADF in the management account. The permissions boundary should deny all IAM and STS actions. This permissions boundary should be in place until you upgrade ADF or bootstrap a new account. While the permissions boundary is in place, the account management and bootstrapping of accounts are unable to create, update, or assume into roles. This mitigates the privilege escalation risk, but also disables ADF's ability to create, manage, and bootstrap accounts.

Weakness: CWE-266 (Incorrect Privilege Assignment)

## Which versions are affected by CVE-2024-37293?

It affects 1 product.


Products: Amazon Aws Deployment Framework.

## How do I fix CVE-2024-37293?

No fix has been published for CVE-2024-37293 yet. Limit exposure of the affected software until one is available.

## Is CVE-2024-37293 being exploited?

There is no known exploitation of CVE-2024-37293 in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2024-37293 and fix it if it is affected.

What it is: CVE-2024-37293 is a high-severity vulnerability in awslabs aws-deployment-framework, published on 11 Jun 2024. It can only be exploited from the same machine or local network, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2024-37293 in the wild and no public exploit code.

Affected product: awslabs aws-deployment-framework. No package-level version data is available, so check the vendor advisory linked from the reference page.

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2024-37293/ (Markdown: https://insights.sbomify.com/CVE-2024-37293/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2024-37293
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2024-37293
- OSV: https://osv.dev/vulnerability/CVE-2024-37293

---
From sbomify Insights: https://insights.sbomify.com/CVE-2024-37293/
Summaries are generated and may contain mistakes; the official description above is the record.
