# CVE-2024-28056: AWS Amplify CLI has incorrect trust policy management

> Improper IAM role trust policy configuration in AWS Amplify CLI allows unauthorized assume role access if Authentication components are removed.

- **Severity:** Critical 9.8 (`CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 15 Apr 2024
- **Updated:** 20 Mar 2025
- **Also known as:** GHSA-846g-p7hm-f54r

## What is CVE-2024-28056?

CVE-2024-28056 is a critical vulnerability in n/a, published on 15 Apr 2024. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

Amazon AWS Amplify CLI before 12.10.1 incorrectly configures the role trust policy of IAM roles associated with Amplify projects. When the Authentication component is removed from an Amplify project, a Condition property is removed but "Effect":"Allow" remains present, and consequently sts:AssumeRoleWithWebIdentity would be available to threat actors with no conditions. Thus, if Amplify CLI had been used to remove the Authentication component from a project built between August 2019 and January 2024, an "assume role" may have occurred, and may have been leveraged to obtain unauthorized access to an organization's AWS resources. NOTE: the problem could only occur if an authorized AWS user removed an Authentication component. (The vulnerability did not give a threat actor the ability to remove an Authentication component.) However, in realistic situations, an authorized AWS user may have removed an Authentication component, e.g., if the objective were to stop using built-in Cognito resources, or move to a completely different identity provider.

Weakness: CWE-276 (Incorrect Default Permissions)

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

2 open source packages ship an affected version, including @aws-amplify/cli. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `@aws-amplify/cli` | npm | All versions | 12.10.1 |
| `@aws-amplify/cli` | npm | All versions | 12.10.1 |

Products: Amazon Aws Amplify Cli.

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

Upgrade @aws-amplify/cli to 12.10.1 or later.

## Is CVE-2024-28056 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2024-28056 exists.

## Fix prompt for AI coding agents

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

What it is: CVE-2024-28056 is a critical vulnerability in n/a, published on 15 Apr 2024. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2024-28056 exists.

Affected packages and fixed versions:
- @aws-amplify/cli (npm): affected all versions; fixed in 12.10.1
- @aws-amplify/cli (npm): affected all versions; fixed in 12.10.1

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-28056/ (Markdown: https://insights.sbomify.com/CVE-2024-28056/index.md)
```

## Sources

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

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