CVE-2021-40831: Missing SNI validation and inconsistent CA override function behavior within AWS IoT Device SDKs on Apple devices
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
- CWE
- CWE-295
Report tools
Action score
28
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.
Check your site's encryptionRun the SSL check
Is your version affected? Check itNoroxi 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 helpAffected 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.
| Vendor | Product | CPE |
|---|---|---|
| amazon | amazon web services aws-c-io | cpe:2.3:a:amazon:amazon_web_services_aws-c-io |
| amazon | amazon web services internet of things device software development kit v2 | cpe:2.3:a:amazon:amazon_web_services_internet_of_things_device_software_development_kit_v2 |
| apple | macos | cpe:2.3:o:apple:macos |
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 checkVersions 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
Affected versions · NVD (5)
NVD version ranges (for catalog products). Add the product to your stack with a version and matching uses these.
- amazon amazon web services aws-c-io0.10.7
- amazon amazon web services internet of things device software development kit v2before 1.5.0
- amazon amazon web services internet of things device software development kit v2before 1.6.0
- amazon amazon web services internet of things device software development kit v2before 1.7.0
- amazon amazon web services internet of things device software development kit v2before 1.14.0
Package-level exposure
OSV and GitHub Advisory data: ecosystem, package and range. SBOM matching uses this table.
| Ecosystem | Package | Affected range | Fix |
|---|---|---|---|
| Maven | software.amazon.awssdk.iotdevicesdk:aws-iot-device-sdk | before 1.5.0 | 1.5.0 |
| npm | aws-iot-device-sdk-v2 | before 1.6.0 | 1.6.0 |
| PyPI | awsiotsdk | before 1.7.0 | 1.7.0 |
Same product
amazon: all recordsOther highest-scoring records for the same primary product.
- CVE-2021-40830Inconsistent CA override function behavior within AWS IoT Device SDKs on Unix systems35Monitor
- CVE-2021-40828TLS hostname validation issues within AWS IoT Device SDKs on Windows35Monitor
Remediation
Which version to upgrade to
Fix versions compiled from the vendor, package registries and Microsoft. Verify the vendor's note before upgrading.
| Product / package | Fixed version | Source |
|---|---|---|
| Maven:software.amazon.awssdk.iotdevicesdk:aws-iot-device-sdk | 1.5.0 | Package registry (OSV) |
| npm:aws-iot-device-sdk-v2 | 1.6.0 | Package registry (OSV) |
| PyPI:awsiotsdk | 1.7.0 | Package 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.
Credits
All researchersFinders, 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
Weakness class (CWE)
CWE-295 · Improper Certificate ValidationCVSS 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.
The bug in code
The whole CWE-295 classA representative example of this vulnerability class. Not the vendor's source code; it shows the faulty pattern and its fix.
Vulnerable
override fun checkServerTrusted(chain: Array<X509Certificate>, type: String) {
// Left empty for the test environment
}Fixed
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.
Attack patterns (CAPEC)
ATT&CK techniques
—
Change log (1)
- Fix✗ → ✓
For records you follow, these changes also arrive as notifications. →
References
Show all references (4 more)Show less
Vendor advisories and official records. Exploit/PoC links are deliberately left out.