CVE-2021-40829 TLS hostname validation issues within AWS IoT Device SDKs on macOS

Medium 6.3 Published Updated

AWS IoT Device SDKs on macOS fail to validate TLS hostnames when custom CAs are used, allowing man-in-the-middle attacks.

Exploited in the wild
Not known
Login needed
An administrator
Attackable
Local or same network only
Victim action needed
A user has to click or open something
Fix
Available

What is CVE-2021-40829?

CVE-2021-40829 is a medium-severity vulnerability in Amazon Web Services AWS IoT Device SDK v2 for C++, published on 22 Nov 2021. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.

Official description

Connections initialized by the AWS IoT Device SDK v2 for Java (versions prior to 1.4.2), Python (versions prior to 1.6.1), C++ (versions prior to 1.12.7) and Node.js (versions prior to 1.5.3) did not verify server certificate hostname during TLS handshake when overriding Certificate Authorities (CA) in their trust stores on MacOS. This issue has been addressed in aws-c-io submodule versions 0.10.5 onward. This issue affects: Amazon Web Services AWS IoT Device SDK v2 for Java versions prior to 1.4.2 on macOS. Amazon Web Services AWS IoT Device SDK v2 for Python versions prior to 1.6.1 on macOS. Amazon Web Services AWS IoT Device SDK v2 for C++ versions prior to 1.12.7 on macOS. Amazon Web Services AWS IoT Device SDK v2 for Node.js versions prior to 1.5.3 on macOS. Amazon Web Services AWS-C-IO 0.10.4 on macOS.

Weakness: CWE-295

Which versions are affected by CVE-2021-40829?

7 open source packages ship an affected version, including software.amazon.awssdk.iotdevicesdk:aws-iot-device-sdk, awsiotsdk and aws-iot-device-sdk-v2. It affects 1 product.

PackageAffectedFixed in
software.amazon.awssdk.iotdevicesdk:aws-iot-device-sdk MavenAll versions1.4.2
software.amazon.awssdk.iotdevicesdk:aws-iot-device-sdk MavenAll versions1.4.2
awsiotsdk PyPIAll versions1.6.1
awsiotsdk PyPIAll versions1.6.1
awsiotsdk PyPIAll versions1.6.1
aws-iot-device-sdk-v2 npmAll versions1.5.3
1 more packages
aws-iot-device-sdk-v2 npmAll versions1.5.3

Products include Amazon Amazon Web Services Internet of Things Device Software Development Kit V2.

How do I fix CVE-2021-40829?

Upgrade software.amazon.awssdk.iotdevicesdk:aws-iot-device-sdk to 1.4.2 or later.

Is CVE-2021-40829 being exploited?

There is no known exploitation of CVE-2021-40829 in the wild and no public exploit code.

Sources

Also known as GHSA-743r-5g92-5vgf, PYSEC-2021-862.

Is CVE-2021-40829 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free