Amazon Web Services · Aws Iot Device Sdk V2 For Python · CVE-2021-40831
**Name of the Vulnerable Software and Affected Versions**
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
Amazon Web Services AWS-C-IO 0.10.7 on macOS
**Description**
The AWS IoT Device SDK v2 for Java, Python, C++, and Node.js appends a user-supplied Certificate Authority (CA) to the root CAs instead of overriding it on macOS systems. Additionally, SNI validation is also not enabled when the CA has been "overridden". This allows attackers with access to a host's trust stores or who can compromise a certificate authority already in the host's trust store to bypass CA pinning. An attacker could then spoof the MQTT broker, drop traffic, and/or respond with the attacker's data, but they would not be able to forward this data on to the MQTT broker because the attacker would still need the user's private keys to authenticate against the MQTT broker.
**Recommendations**
For AWS IoT Device SDK v2 for Java versions prior to 1.5.0 on macOS, update to version 1.5.0 or later.
For AWS IoT Device SDK v2 for Python versions prior to 1.7.0 on macOS, update to version 1.7.0 or later.
For AWS IoT Device SDK v2 for C++ versions prior to 1.14.0 on macOS, update to version 1.14.0 or later.
For AWS IoT Device SDK v2 for Node.js versions prior to 1.6.0 on macOS, update to version 1.6.0 or later.
For Amazon Web Services AWS-C-IO 0.10.7 on macOS, update to a version that includes the updated `aws tls ctx options override default trust store *` function.