Skip to content
Noroxi
NVD / CVE Program· CNA F-SecureUS

CVE-2021-40831: Missing SNI validation and inconsistent CA override function behavior within AWS IoT Device SDKs on Apple devices

HighCVSS 7.2 · v3.1—No exploit Fix available

Noroxi assessment

Priority: Monitor (action score 28/100)

  • The sources we track (CISA KEV, Exploit-DB, Metasploit, Nuclei, GitHub) show no public exploit code or exploitation in the wild.
  • Probability of exploitation in the next 30 days: 0.63% (FIRST EPSS); higher than 51% of all records.
  • Anyone who can reach it over the internet can trigger it. Administrator privileges are required. No user action is required. No special conditions are required; it is repeatable.
  • Fixed version: software.amazon.awssdk.iotdevicesdk:aws-iot-device-sdk (Maven) 1.5.0; aws-iot-device-sdk-v2 (npm) 1.6.0; awsiotsdk (PyPI) 1.7.0.

Low priority for now. Upgrade to software.amazon.awssdk.iotdevicesdk:aws-iot-device-sdk (Maven) 1.5.0; aws-iot-device-sdk-v2 (npm) 1.6.0; awsiotsdk (PyPI) 1.7.0 or later.

Generated automatically from the record's data: CVSS (NVD and CNA), CISA KEV and SSVC, FIRST EPSS, exploit sources, fixed versions. How we calculate it

Primary sources: NVD · CVE.org · FIRST EPSS

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”. 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 address this behavior. This issue affects: Amazon Web Services AWS IoT Device SDK v2 for Java versions prior to 1.5.0 on macOS. Amazon Web Services AWS IoT Device SDK v2 for Python versions prior to 1.7.0 on macOS. Amazon Web Services AWS IoT Device SDK v2 for C++ versions prior to 1.14.0 on macOS. Amazon Web Services 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.

Published
Nov 22, 2021
Updated
Jun 17, 2026
EPSS
0.6% · 51th percentile

Report tools

JSON

Action score

28

Monitor

Low priority for now.

CVSS
28 / 40 · 7.2 / 10
CISA KEV
0 / 30 · Not listed
EPSS
0 / 30 · 0.6%

CNA vs NVD score

NVD
7.2
CNA · F-SecureUS
6.3
0.9 point gap

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

The score given by the assigning authority versus NVD’s independent score. A gap means the severity is contested.

Get told when this record changes

  • Not in KEV: no record of exploitation in the wild
  • No public exploit code on record
  • A fix has been released

If any of these changes, we'll tell you in the daily email digest.

Follow CVE-2021-40831

When you'll hear from us

  • when it enters CISA KEV
  • when exploit code appears or is weaponized
  • when the record is updated (including a fixed version)
  • when EPSS rises 20 points in a week

One daily email digest (06:00 UTC); connect a webhook for KEV listings and weaponized exploits every 10 minutes on paid plans, on the hour on the free plan.

Check your site's encryptionRun the SSL check

Your free account also gets you

  • CVE alerts: add the products and versions you run, get the new CVEs that affect them
  • Uptime monitoring: 1 site, instant email when it goes down
  • Add your domain: subdomains and takeover risk scanned every week (1 domain)
  • 10 scans an hour on the security tools, at most 30 a day (3 a day without an account), an API key and MCP
  • All your scans in one panel: findings, what changed in the last scan, a report per domain or per client (PDF, share link)
All free tools

Check your site's encryptionRun the SSL check

Is your version affected? Check it

Noroxi analysis

What does it mean in your environment?

The assessment above is generated automatically from the record's data; it doesn't know your environment. Our team verifies on your systems whether this vulnerability is actually exploitable and which mitigation is enough.

We use this product, ask for help

Affected systems

Is your version affected?

Pick the product and type the version you run. It's compared with this record's version ranges in your browser; the version isn't sent anywhere.

VendorProduct
amazonamazon web services aws-c-io
amazonamazon web services internet of things device software development kit v2
applemacos

Check your site's encryption

This vulnerability is about certificate validation or weak cryptography. The free SSL checker tests your certificate, enabled TLS versions and weak ciphers.

Run the SSL check

Versions reported by the vendor

Affected version ranges reported by the assigning authority (F-SecureUS). Independent of NVD's CPE analysis and usually ahead of it.

  • Amazon Web Services AWS IoT Device SDK v2 for C++

    • unspecified and later · before 1.14.0affected
  • Amazon Web Services AWS IoT Device SDK v2 for Java

    • unspecified and later · before 1.5.0affected
  • Amazon Web Services AWS IoT Device SDK v2 for Node.js

    • unspecified and later · before 1.6.0affected
  • Amazon Web Services AWS IoT Device SDK v2 for Python

    • unspecified and later · before 1.7.0affected
  • Amazon Web Services AWS-C-IO

    • 0.10.7affected

Package-level exposure

OSV and GitHub Advisory data: ecosystem, package and range. SBOM matching uses this table.

EcosystemPackageAffected rangeFix
Mavensoftware.amazon.awssdk.iotdevicesdk:aws-iot-device-sdkbefore 1.5.01.5.0
npmaws-iot-device-sdk-v2before 1.6.01.6.0
PyPIawsiotsdkbefore 1.7.01.7.0

Other highest-scoring records for the same primary product.

  • CVE-2021-40830Inconsistent CA override function behavior within AWS IoT Device SDKs on Unix systems
    35Monitor
  • CVE-2021-40828TLS hostname validation issues within AWS IoT Device SDKs on Windows
    35Monitor

Remediation

Which version to upgrade to

Fix versions compiled from the vendor, package registries and Microsoft. Verify the vendor's note before upgrading.

Product / packageFixed versionSource
Maven:software.amazon.awssdk.iotdevicesdk:aws-iot-device-sdk1.5.0Package registry (OSV)
npm:aws-iot-device-sdk-v21.6.0Package registry (OSV)
PyPI:awsiotsdk1.7.0Package registry (OSV)

Exploit status

No known public exploit

No public exploit has been observed yet. That doesn't mean you're safe, only that the bar is a little higher.

Research context

For pentesters and researchers: attack profile, score disagreement, timeline, patch commits, credits, variant and chain candidates, bug bounty scope. All derived from existing data; no exploit code.

Timeline

From publication to today: proof of concept, Metasploit module, CISA KEV and fix record. Dates are as reported by the sources.

No dated events beyond publication.

Finders, reporters and analysts named in the CNA record. Click a name for that researcher’s other records.

Bug bounty scope

The product’s vendor appears in a public program. Matched by name; verify the scope text in the program.

Not on record for this CVE: EPSS history · patch commit or PR link · variant or chain candidate.

Technical details

Attack conditions

  • Anyone who can reach it over the internet can trigger it.
  • Administrator privileges are required.
  • No user action is required.
  • No special conditions are required; it is repeatable.

If successful

Confidentiality
high · data can be read
Integrity
high · data or configuration can be modified
Availability
high · the service can be disrupted
Attack vector
Network
Attack complexity
Low
Privileges required
High
User interaction
None
Scope
Unchanged
Confidentiality impact
High
Integrity impact
High
Availability impact
High

CVSS vector

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

nvd-primary

Root cause

A certificate validation error is silently swallowed instead of terminating the connection. Often, code added for a test environment makes its way into production.

A representative example of this vulnerability class. Not the vendor's source code; it shows the faulty pattern and its fix.

Vulnerable

kotlin
override fun checkServerTrusted(chain: Array<X509Certificate>, type: String) {  // Left empty for the test environment}

Fixed

kotlin
val client = OkHttpClient.Builder()  .certificatePinner(    CertificatePinner.Builder()      .add("api.sirius.example", "sha256/…")      .build()  ).build()

Attack context

MITRE CAPEC attack patterns and ATT&CK techniques for this weakness class (CWE). A starting point for detection rules and threat hunting.

References

All records