Amazon Web Services Aws C IoApplication · Amazon

CVE-2021-40830

HIGH · 8.8 CVSS v3.1 Published 2021-11-23
Fix available
A fix is available. Upgrade to 1.5.0 / 1.5.3 or later.
See remediation →
93/100
Remediation priority · Urgent
No privileges Zero-click

Official description Straight from the sourceThe vendor's or NVD's own wording, published unedited. Authoritative, but often terse — it says what broke, rarely what to do.

NVD · unedited
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 Unix systems. TLS handshakes will thus succeed if the peer can be verified either from the user-supplied CA or the system’s default trust-store. Attackers with access to a host’s trust stores or are able to compromise a certificate authority already in the host's trust store (note: the attacker must also be able to spoof DNS in this case) may be able to use this issue to bypass CA pinning. An attacker could then spoof the MQTT broker, and either 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. The 'aws_tls_ctx_options_override_default_trust_store_*' function within the aws-c-io submodule has been updated to override the default trust store. This corrects this issue. This issue affects: Amazon Web Services AWS IoT Device SDK v2 for Java versions prior to 1.5.0 on Linux/Unix. Amazon Web Services AWS IoT Device SDK v2 for Python versions prior to 1.6.1 on Linux/Unix. Amazon Web Services AWS IoT Device SDK v2 for C++ versions prior to 1.12.7 on Linux/Unix. Amazon Web Services AWS IoT Device SDK v2 for Node.js versions prior to 1.5.3 on Linux/Unix. Amazon Web Services AWS-C-IO 0.10.4 on Linux/Unix.

Technical summary Written by usOur analysis, written from the advisory, the CVSS vector and the affected-version data. It adds context the advisory leaves out, and never invents facts that are not in the source.

dbcve analysis · high confidence

The AWS IoT Device SDK v2 for Java, Python, C++, and Node.js appends a user-supplied Certificate Authority to the system's default root CAs instead of overriding them on Unix systems. This allows TLS handshakes to succeed if verified by EITHER the user-supplied CA OR the system's trust store, enabling attackers with access to compromised CAs in the system's trust store to bypass CA pinning and spoof the MQTT broker.

MitigationUpdate AWS IoT Device SDK v2 to patched versions (Java 1.5.0+, Python 1.6.1+, C++ 1.12.7+, Node.js 1.5.3+) or aws-c-io 0.10.4+, which contain the corrected aws_tls_ctx_options_override_default_trust_store_* function that properly overrides the default trust store.

Verify against the referenced sources before acting — the references below are authoritative for this CVE, this summary is not.

Affected products & versions What the vendor confirmedThe version ranges the vendor confirmed as vulnerable. If your version sits inside a range here, treat yourself as exposed until you have upgraded.

NVD · CPE data
Amazon Web Services Aws C IoApplication
Affected:= 0.10.4
Amazon Web Services Internet Of Things Device Software Development Kit V2Application
Affected:< 1.5.0< 1.5.3< 1.6.1< 1.12.7

CVSS breakdown How the score is builtThe industry scoring standard. It rates how the flaw is reached, what it takes to exploit, and what an attacker gains — the score is derived from those, not the other way round.

From the vector
Attack vector
Adjacent
Complexity
Low
Privileges
None
User interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

CVSS:3.1/AV:A/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Am I affected? How to checkSteps we derive from the advisory and the affected-version data, so you can decide whether this CVE reaches your setup. They are a guide, not a scan — your own configuration is the authority.

dbcve checks

Work through these to decide whether this CVE applies to you.

  1. Check Python AWS IoT Device SDK v2 version
    Run 'pip show aws-crt-python' or 'pip show awsiotsdk' to see installed version. Also check any requirements.txt or package-lock.json files.
    Affected if Version is below 1.6.1 and custom CA certificate is configured for MQTT connections
  2. Check Java AWS IoT Device SDK v2 version
    Inspect Maven pom.xml for 'aws-iot-device-sdk-v2' artifact version, or check the jar file name in your deployment.
    Affected if Version is below 1.5.0 and custom CA certificate is configured for MQTT connections
  3. Check Node.js AWS IoT Device SDK v2 version
    Run 'npm list aws-iot-device-sdk-v2' or inspect package.json dependencies.
    Affected if Version is below 1.5.3 and custom CA certificate is configured for MQTT connections
  4. Check C++ AWS IoT Device SDK v2 version
    Inspect build configuration or library files for 'aws-crt-cpp' version, or check linked library version.
    Affected if Version is below 1.12.7 and custom CA certificate is configured for MQTT connections
  5. Check aws-c-io library version
    Run 'pip show aws-c-io' (Python) or check the linked aws-c-io library version in C++ applications.
    Affected if Version equals 0.10.4 and custom CA certificate is configured for TLS connections

Environment is affected if any AWS IoT Device SDK v2 component is below the patched versions listed AND custom CA certificates are being used for TLS/MQTT connections (the vulnerability allows fallback to system trust store instead of using only the specified CA).

Generated from the published advisory. Verify against your own configuration.

Check your environment

Paste your version and any relevant configuration and it will be compared against the affected criteria above. Do not include secrets or credentials.

AI-assisted, checked against the advisory. Informational, not a guarantee.

Remediation Closing itWhat it takes to close this. Where a vendor fix exists we point at it; where none exists we say so plainly, and can build one. Effort estimates are scoped from the advisory, not from your codebase.

dbcve · scoped
Upgrade available Upgrade to 1.5.0 / 1.5.3 / 1.6.1 or later
Fixed in 1.5.01.5.31.6.1
Interim mitigation

Update AWS IoT Device SDK v2 to patched versions (Java 1.5.0+, Python 1.6.1+, C++ 1.12.7+, Node.js 1.5.3+) or aws-c-io 0.10.4+, which contain the corrected aws_tls_ctx_options_override_default_trust_store_* function that properly overrides the default trust store.

Recommended fix High confidence

Upgrade to: Java SDK >=1.5.0, Python SDK >=1.6.1, C++ SDK >=1.12.7, Node.js SDK >=1.5.3, aws-c-io >0.10.4

  1. Identify the AWS IoT Device SDK v2 language runtime in use (Java, Python, C++, or Node.js)
  2. Determine the currently installed version of the SDK and aws-c-io library
  3. For Java: Upgrade aws-iot-device-sdk-v2 to version 1.5.0 or later
  4. For Python: Upgrade awsiotsdk to version 1.6.1 or later
  5. For C++: Upgrade aws-iot-device-sdk-v2 to version 1.12.7 or later
  6. For Node.js: Upgrade aws-iot-device-sdk-v2 to version 1.5.3 or later
  7. If using aws-c-io directly, upgrade to a version newer than 0.10.4 that contains the fix
  8. Verify the upgrade by checking that aws_tls_ctx_options_override_default_trust_store_* functions now properly override (not append to) the default trust store
Caveat Upgrading SDK versions may introduce API changes; review the SDK release notes for your specific language for any breaking changes between your current version and the target fixed version

Generated from the published advisory — verify against the referenced sources before acting.

Fix this in Amazon Web Services Aws C Io Scoped from the published advisory
  • Consultation3.0 h
  • Implementation6.0 h
  • Testing4.0 h
  • Review / QA2.0 h
15.0 hours of engineering $2,640
Get the upgrade done

An estimate, not a bill — we confirm scope with you before any work starts. Need it this week? Rush from $4,224.

Scan for this in your stack

Free · runs locally
dbcve dependency scanner

Check whether your project pulls in CVE-2021-40830 — or any other known-vulnerable package — straight from your lock files. Free and open source; it runs locally and uploads nothing.

References Go to the primary sourcePrimary sources — vendor advisories, patches and trackers. Where our summary and a reference disagree, the reference wins.

Primary sources

Practitioner notes

Contributed

Peer-ranked notes from engineers who’ve handled CVE-2021-40830 in production — separate from our analysis above.

No notes yet

Be the first to add a field note for this CVE — a mitigation you’ve verified, a version caveat, or a link to a working fix. Sign in above to contribute.

What this is

A place for practitioners to share what actually worked: a mitigation you’ve tested, a configuration change, a version- or environment-specific caveat, or a link to a verified patch. The most useful notes rise to the top as peers upvote them, so the signal stays high.

What belongs here
  • Verified mitigations, workarounds, and config changes
  • Version or environment caveats, and links to real fixes
  • No weaponised exploit code, or anything meant to cause harm
  • No spam, self-promotion, credentials, or personal data