Description Preview
Overview
CVE-2021-40831 is a certificate validation vulnerability (CWE-295) affecting AWS IoT Device SDK v2 implementations across multiple programming languages when running on macOS systems. The vulnerability stems from improper handling of Certificate Authority trust stores, where user-supplied CAs are appended to rather than replacing the system's default trust store. This implementation flaw, combined with disabled SNI validation, creates a security weakness where attackers could potentially bypass certificate pinning protections.
The vulnerability specifically impacts:
- AWS IoT Device SDK v2 for Java versions prior to 1.5.0 on macOS
- AWS IoT Device SDK v2 for Python versions prior to 1.7.0 on macOS
- AWS IoT Device SDK v2 for C++ versions prior to 1.14.0 on macOS
- AWS IoT Device SDK v2 for Node.js versions prior to 1.6.0 on macOS
- AWS-C-IO 0.10.7 on macOS
Remediation
To remediate this vulnerability, users should:
-
Update to the following fixed versions or later:
- AWS IoT Device SDK v2 for Java: version 1.5.0 or later
- AWS IoT Device SDK v2 for Python: version 1.7.0 or later
- AWS IoT Device SDK v2 for C++: version 1.14.0 or later
- AWS IoT Device SDK v2 for Node.js: version 1.6.0 or later
- AWS-C-IO: newer than version 0.10.7
-
The core fix addresses the 'aws_tls_ctx_options_override_default_trust_store_*' function within the aws-c-io submodule to correctly override the default trust store rather than appending to it.
-
If immediate updates are not possible, consider implementing additional network security controls to prevent potential DNS spoofing attacks and unauthorized access to trust stores.
-
Review your application's security architecture to ensure proper certificate validation practices are followed throughout your IoT implementation.
References
- AWS IoT Device SDK for C++: https://github.com/aws/aws-iot-device-sdk-cpp-v2
- AWS IoT Device SDK for Java: https://github.com/aws/aws-iot-device-sdk-java-v2
- AWS IoT Device SDK for JavaScript: https://github.com/aws/aws-iot-device-sdk-js-v2
- AWS IoT Device SDK for Python: https://github.com/aws/aws-iot-device-sdk-python-v2
- AWS C IO Library: https://github.com/awslabs/aws-c-io/
Industry ExposureMost to leastThis section illustrates the prevalence of a specific Common Vulnerabilities and Exposures (CVE) across various industries based on customer reports. The ranking displays industries from the most to least affected by this particular vulnerability, offering valuable insight into where this CVE has been most frequently observed. This information can help organizations within these sectors prioritize their security efforts, understand their relative risk exposure compared to their peers, and focus remediation strategies where they are most needed. By understanding the industry-specific impact, organizations can make more informed decisions regarding patching, resource allocation, and overall risk management related to this CVE.
- Accommodation & Food ServicesAccommodation & Food Services
- Administrative, Support, Waste Management & Remediation ServicesAdministrative, Support, Waste Management & Remediation Services
- Agriculture, Forestry Fishing & HuntingAgriculture, Forestry Fishing & Hunting
- Arts, Entertainment & RecreationArts, Entertainment & Recreation
- ConstructionConstruction
- Educational ServicesEducational Services
- Finance and InsuranceFinance and Insurance
- Health Care & Social AssistanceHealth Care & Social Assistance
- InformationInformation
- Management of Companies & EnterprisesManagement of Companies & Enterprises
- ManufacturingManufacturing
- MiningMining
- Other Services (except Public Administration)Other Services (except Public Administration)
- Professional, Scientific, & Technical ServicesProfessional, Scientific, & Technical Services
- Public AdministrationPublic Administration
- Real Estate Rental & LeasingReal Estate Rental & Leasing
- Retail TradeRetail Trade
- Transportation & WarehousingTransportation & Warehousing
- UtilitiesUtilities
- Wholesale TradeWholesale Trade