CVE-2021-40828: Aws iot device sdk Improper Certificate Management Vulnerability
MODERATECVE-2021-40828 is a MODERATE (CVSS 6.3) improper certificate management vulnerability (CWE-295: Improper Certificate Validation) affecting Aws iot device sdk libraries in the Maven ecosystem. The issue involves improper certificate management in aws iot device sdk v2. Remediation is available by upgrading affected packages to version 1.3.3, 1.5.1, 1.5.18.
CVE-2021-40828 at a Glance
Security Impact
CVSS: 6.3
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:A/AC:H/PR:H/UI:R/S:U/C:H/I:H/A:H).
How to Fix CVE-2021-40828
To remediate this vulnerability, upgrade all affected Aws iot device sdk dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
<dependency>
<groupId>software.amazon.awssdk.iotdevicesdk</groupId>
<artifactId>aws-iot-device-sdk</artifactId>
<version>1.3.3</version>
</dependency>
npm install aws-iot-device-sdk-v2@1.5.1
pip install awsiotsdk>=1.5.18
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
mvn dependency:tree -Dincludes=software.amazon.awssdk.iotdevicesdk
How to Check if You Are Affected
To determine whether your Java application is affected by CVE-2021-40828, inspect your build dependencies using the Maven Dependency Plugin:
mvn dependency:tree -Dincludes=software.amazon.awssdk.iotdevicesdk
Analyze the terminal output to locate any version of Aws iot device sdk in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.3.3), your application is affected.
Note: The mvn dependency:tree -Dincludes=software.amazon.awssdk.iotdevicesdk command inspects the resolved dependency graph declared in your project's POM files; it does not perform automated security scanning or inspect runtime dynamic classpaths. Always verify runtime container classpaths and shaded JARs.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-295: Improper Certificate Validation, where the product does not validate, or incorrectly validates, a certificate. In Aws iot device sdk, 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-2021-40828 Affected Aws iot device sdk Versions
3 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
software.amazon.awssdk.iotdevicesdk:aws-iot-device-sdk
|
Maven |
< 1.3.3
|
1.3.3
|
|
aws-iot-device-sdk-v2
|
npm |
< 1.5.1
|
1.5.1
|
|
awsiotsdk
|
PyPI |
< 1.5.18
|
1.5.18
|
References
Frequently Asked Questions
What is CVE-2021-40828?
Which Aws iot device sdk versions are affected?
What version fixes CVE-2021-40828?
Is aws-iot-device-sdk affected?
Is aws-iot-device-sdk-v2 affected?
What is the CVSS score of CVE-2021-40828?
What CWE is associated with CVE-2021-40828?
How can I check Maven dependencies for CVE-2021-40828?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-94jq-q5v2-76wj",
"modified" : "2024-09-12T21:14:08Z",
"published" : "2021-11-24T21:02:24Z",
"aliases" : [ "CVE-2021-40828" ],
"summary" : "Improper certificate management in AWS IoT Device SDK v2",
"details" : "Connections initialized by the AWS IoT Device SDK v2 for Java (versions prior to 1.3.3), Python (versions prior to 1.5.18), C++ (versions prior to 1.12.7) and Node.js (versions prior to 1.5.1) did not verify server certificate hostname during TLS handshake when overriding Certificate Authorities (CA) in their trust stores on Windows. This issue has been addressed in aws-c-io submodule versions 0.9.13 onward. This issue affects: Amazon Web Services AWS IoT Device SDK v2 for Java versions prior to 1.3.3 on Microsoft Windows. Amazon Web Services AWS IoT Device SDK v2 for Python versions prior to 1.5.18 on Microsoft Windows. Amazon Web Services AWS IoT Device SDK v2 for C++ versions prior to 1.12.7 on Microsoft Windows. Amazon Web Services AWS IoT Device SDK v2 for Node.js versions prior to 1.5.3 on Microsoft Windows.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:A/AC:H/PR:H/UI:R/S:U/C:H/I:H/A:H"
}, {
"type" : "CVSS_V4",
"score" : "CVSS:4.0/AV:A/AC:L/AT:P/PR:H/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Maven",
"name" : "software.amazon.awssdk.iotdevicesdk:aws-iot-device-sdk"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "1.3.3"
} ]
} ]
}, {
"package" : {
"ecosystem" : "npm",
"name" : "aws-iot-device-sdk-v2"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "1.5.1"
} ]
} ]
}, {
"package" : {
"ecosystem" : "PyPI",
"name" : "awsiotsdk"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "1.5.18"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2021-40828"
}, {
"type" : "WEB",
"url" : "https://github.com/aws/aws-iot-device-sdk-java-v2/commit/67950ad2a02f2f9355c310b69dc9226b017f32f2"
}, {
"type" : "WEB",
"url" : "https://github.com/aws/aws-iot-device-sdk-js-v2/commit/4be41394f1aee979e6f4b012fcb01eecabd0c08d"
}, {
"type" : "WEB",
"url" : "https://github.com/aws/aws-iot-device-sdk-python-v2/commit/fd4c0ba04b35eab9e20c635af5548fcc5a92d8be"
}, {
"type" : "ADVISORY",
"url" : "https://github.com/advisories/GHSA-94jq-q5v2-76wj"
}, {
"type" : "WEB",
"url" : "https://github.com/aws/aws-iot-device-sdk-cpp-v2"
}, {
"type" : "WEB",
"url" : "https://github.com/aws/aws-iot-device-sdk-java-v2"
}, {
"type" : "WEB",
"url" : "https://github.com/aws/aws-iot-device-sdk-js-v2"
}, {
"type" : "WEB",
"url" : "https://github.com/aws/aws-iot-device-sdk-python-v2"
}, {
"type" : "WEB",
"url" : "https://github.com/awslabs/aws-c-io"
}, {
"type" : "WEB",
"url" : "https://github.com/pypa/advisory-database/tree/main/vulns/awsiotsdk/PYSEC-2021-861.yaml"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-295" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2021-11-24T20:33:58Z",
"nvd_published_at" : "2021-11-23T00:15:00Z"
}
}