Skip to main content
Vulnerability Database/CVE-2024-37293

CVE-2024-37293: AWS Deployment Framework Privilege Escalation

CVE-2024-37293 is a privilege escalation vulnerability in AWS Deployment Framework that allows actors to escalate privileges via CodeBuild or Lambda modifications. This article covers technical details, security implications, and mitigation strategies.

Published:

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

CVE-2024-37293 Overview

The AWS Deployment Framework (ADF) contains a privilege escalation vulnerability in its bootstrap process prior to version 4.0.0. ADF manages staged, multi-account, cross-region deployments across an AWS Organization using CodePipeline, CodeBuild, and CodeCommit. The bootstrap process relies on an elevated CodeBuild role that grants sts:AssumeRole without further restrictions. An actor with permissions to alter the behavior of the bootstrap CodeBuild project or Lambda function can assume the cross-account access role in any account within the AWS Organization. By default, that cross-account role provides Administrator-level access, enabling full control of resources across the organization [CWE-266].

Critical Impact

Abuse of the unrestricted sts:AssumeRole permission allows an attacker to pivot from the ADF management account into any member account with administrative privileges.

Affected Products

  • Amazon AWS Deployment Framework (aws-deployment-framework) versions prior to 4.0.0
  • Deployments using the CodeBuild-driven bootstrap pipeline
  • Deployments using the Lambda-driven event bootstrap state machine

Discovery Timeline

  • 2024-06-11 - CVE-2024-37293 published to NVD
  • 2026-06-17 - Last updated in NVD database

Technical Details for CVE-2024-37293

Vulnerability Analysis

ADF's bootstrap process is designed to deploy bootstrap stacks that enable multi-account, cross-region deployments. Two implementations exist: a CodeBuild-driven pipeline and a Lambda-driven state machine. Both run with elevated privileges in the AWS Organizations management account. The CodeBuild role attached to the bootstrap project is granted sts:AssumeRole with no resource constraints or condition keys. Any principal that can modify the CodeBuild project definition, the Lambda function code, or their execution environment inherits the ability to call AssumeRole against arbitrary targets within the organization.

The most impactful target is the AWS Organizations service-linked cross-account access role created automatically when a new account joins the organization. By default this role trusts the management account and carries the AdministratorAccess managed policy. Assuming it from the bootstrap context yields full control over the destination account.

Root Cause

The underlying weakness is overly broad IAM policy design in the bootstrap CodeBuild role. The policy allows sts:AssumeRole on Resource: "*" without a path prefix, account scoping, or aws:PrincipalTag condition. Combined with the default unrestricted trust policy on the Organizations cross-account role, this produces a classic confused-deputy privilege escalation path.

Attack Vector

Exploitation requires local, authenticated access to the ADF management account with permissions to modify the bootstrap CodeBuild project, its buildspec, source repository, or the bootstrap Lambda function. An attacker injects commands into the build or function to call sts:AssumeRole against the cross-account role of any target account in the organization, then uses the returned temporary credentials to perform administrative actions. No user interaction is required and the attack executes within normal AWS control-plane traffic, making it difficult to distinguish from legitimate bootstrap activity. Technical details are documented in the GitHub Security Advisory GHSA-mcj7-ppmv-h6jr.

Detection Methods for CVE-2024-37293

Indicators of Compromise

  • CloudTrail AssumeRole events originating from the ADF bootstrap CodeBuild role or Lambda function targeting accounts outside the normal bootstrap workflow.
  • Unexpected modifications to the ADF bootstrap CodeBuild project, buildspec files, or Lambda function code in the management account.
  • Use of the Organizations cross-account access role (for example, OrganizationAccountAccessRole) at times inconsistent with scheduled deployments.

Detection Strategies

  • Alert on UpdateProject, UpdateFunctionCode, and UpdateFunctionConfiguration API calls against ADF-managed CodeBuild and Lambda resources.
  • Baseline the set of role ARNs the bootstrap role legitimately assumes, then flag deviations in CloudTrail.
  • Correlate AssumeRole events with the originating pipeline execution ID to spot calls made outside sanctioned builds.

Monitoring Recommendations

  • Forward CloudTrail management-event logs and GuardDuty findings into a centralized analytics platform for continuous review.
  • Monitor IAM Access Analyzer findings for new cross-account trust changes affecting Organizations roles.
  • Track CodeCommit, CodeBuild, and Lambda change events for the ADF stack and require ticket correlation for each change.

How to Mitigate CVE-2024-37293

Immediate Actions Required

  • Upgrade aws-deployment-framework to version 4.0.0 or later in all management accounts running ADF.
  • Audit CloudTrail for prior AssumeRole activity performed by the ADF bootstrap role or Lambda function and verify each invocation.
  • Restrict IAM permissions on the bootstrap CodeBuild project and Lambda function so only pipeline administrators can modify them.

Patch Information

The fix is included in aws-deployment-framework version 4.0.0, available from the GitHub Release v4.0.0. The code change is tracked in GitHub Pull Request #732. After upgrading, re-bootstrap managed accounts so the hardened role definitions are deployed.

Workarounds

  • Attach a permissions boundary to the ADF-created roles in the management account that explicitly denies all iam:* and sts:* actions until the upgrade is applied.
  • Keep the permissions boundary in place until ADF is upgraded or until a new account is bootstrapped, accepting that account management and bootstrapping will be disabled while it is active.
  • Review the AWS IAM Policy Boundaries Guide before applying the boundary to avoid breaking unrelated workloads.
bash
# Configuration example: permissions boundary denying IAM and STS actions
aws iam create-policy \
  --policy-name ADFBootstrapBoundary \
  --policy-document '{
    "Version": "2012-10-17",
    "Statement": [
      {
        "Effect": "Deny",
        "Action": ["iam:*", "sts:*"],
        "Resource": "*"
      }
    ]
  }'

aws iam put-role-permissions-boundary \
  --role-name adf-bootstrap-codebuild-role \
  --permissions-boundary arn:aws:iam::<management-account-id>:policy/ADFBootstrapBoundary

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.