CVE-2024-28056: @aws amplify/cli AWS Amplify CLI Has Incorrect Vulnerability
CRITICALCVE-2024-28056 is a CRITICAL (CVSS 9.8) aws amplify cli has incorrect vulnerability (CWE-269: Improper Privilege Management) affecting @aws amplify/cli libraries in the npm ecosystem. The issue involves aws amplify cli has incorrect trust policy management. Remediation is available by upgrading affected packages to version 12.10.1.
CVE-2024-28056 at a Glance
Security Impact
CVSS: 9.8
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H).
How to Fix CVE-2024-28056
To remediate this vulnerability, upgrade all affected @aws amplify/cli dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
npm install @aws-amplify/cli@12.10.1
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls @aws-amplify/cli
How to Check if You Are Affected
To determine whether your Node.js application is affected by CVE-2024-28056, inspect your project dependencies using npm:
npm ls @aws-amplify/cli
Analyze the terminal output to locate any version of @aws amplify/cli in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 12.10.1), your application is affected.
Note: The npm ls @aws-amplify/cli command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-269: Improper Privilege Management, where the product does not properly assign, modify, track, or check privileges for an actor, creating an unintended sphere of control for that actor. In @aws amplify/cli, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2024-28056 Affected @aws amplify/cli Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
@aws-amplify/cli
|
npm |
< 12.10.1
|
12.10.1
|
References
Frequently Asked Questions
What is CVE-2024-28056?
Which @aws amplify/cli versions are affected?
What version fixes CVE-2024-28056?
Is @aws-amplify/cli affected?
What is the CVSS score of CVE-2024-28056?
What CWE is associated with CVE-2024-28056?
How can I check npm dependencies for CVE-2024-28056?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-846g-p7hm-f54r",
"modified" : "2024-08-15T21:38:29Z",
"published" : "2024-04-15T18:30:51Z",
"aliases" : [ "CVE-2024-28056" ],
"summary" : "AWS Amplify CLI has incorrect trust policy management",
"details" : "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.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "@aws-amplify/cli"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "12.10.1"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-28056"
}, {
"type" : "WEB",
"url" : "https://github.com/aws-amplify/amplify-cli/commit/73b08dc424db2fb60399c5343c314e02e849d4a1"
}, {
"type" : "WEB",
"url" : "https://aws.amazon.com/security/security-bulletins/AWS-2024-003"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/aws-amplify/amplify-cli"
}, {
"type" : "WEB",
"url" : "https://github.com/aws-amplify/amplify-cli/blob/8ad57bf99a404f3c92547c8a175458016f682fac/packages/amplify-provider-awscloudformation/resources/update-idp-roles-cfn.json"
}, {
"type" : "WEB",
"url" : "https://github.com/aws-amplify/amplify-cli/releases/tag/v12.10.1"
}, {
"type" : "WEB",
"url" : "https://securitylabs.datadoghq.com/articles/amplified-exposure-how-aws-flaws-made-amplify-iam-roles-vulnerable-to-takeover"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-269", "CWE-276" ],
"severity" : "CRITICAL",
"github_reviewed" : true,
"github_reviewed_at" : "2024-04-15T20:25:04Z",
"nvd_published_at" : "2024-04-15T18:15:10Z"
}
}