{"answers":{"affected":"7 open source packages ship an affected version, including software.amazon.awssdk.iotdevicesdk:aws-iot-device-sdk, awsiotsdk and aws-iot-device-sdk-v2. It affects 2 products.","exploited":"There is no known exploitation of CVE-2021-40830 in the wild and no public exploit code.","fix":"Upgrade software.amazon.awssdk.iotdevicesdk:aws-iot-device-sdk to 1.5.0 or later.","what":"CVE-2021-40830 is a medium-severity vulnerability in Amazon Web Services AWS IoT Device SDK v2 for C++, published on 22 Nov 2021. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link."},"fix_prompt":"Check this codebase for CVE-2021-40830 and fix it if it is affected.\n\nWhat it is: CVE-2021-40830 is a medium-severity vulnerability in Amazon Web Services AWS IoT Device SDK v2 for C++, published on 22 Nov 2021. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.\nExploitation: There is no known exploitation of CVE-2021-40830 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- software.amazon.awssdk.iotdevicesdk:aws-iot-device-sdk (Maven): affected all versions; fixed in 1.5.0\n- software.amazon.awssdk.iotdevicesdk:aws-iot-device-sdk (Maven): affected all versions; fixed in 1.5.0\n- awsiotsdk (PyPI): affected all versions; fixed in 1.6.1\n- awsiotsdk (PyPI): affected all versions; fixed in 1.6.1\n- awsiotsdk (PyPI): affected all versions; fixed in 1.6.1\n- aws-iot-device-sdk-v2 (npm): affected all versions; fixed in 1.5.3\n- aws-iot-device-sdk-v2 (npm): affected all versions; fixed in 1.5.3\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2021-40830/ (Markdown: https://insights.sbomify.com/CVE-2021-40830/index.md)","id":"CVE-2021-40830","markdown":"https://insights.sbomify.com/CVE-2021-40830/index.md","name":"CVE-2021-40830","record":{"aliases":["GHSA-c4rh-4376-gff4","PYSEC-2021-863"],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["security_bypass","data_modify"],"network_reachable":"adjacent_or_local","non_default_config":false,"product_category":"AWS IoT Device SDK","requires_auth":"high_privilege","summary":"Attackers can bypass CA pinning in AWS IoT SDKs on Unix by spoofing DNS and compromising trust stores, allowing MQTT broker spoofing and data manipulation.","user_interaction":"required","vuln_class":"security_feature_bypass"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"F-SecureUS","cpe":[{"product":"amazon_web_services_aws-c-io","vendor":"amazon"},{"product":"amazon_web_services_internet_of_things_device_software_development_kit_v2","vendor":"amazon"}],"cvss":{"score":6.3,"severity":"medium","source":"cna","vector":"CVSS:3.1/AV:A/AC:H/PR:H/UI:R/S:U/C:H/I:H/A:H","version":"3.1"},"cwes":[{"id":"CWE-295","name":"Improper Certificate Validation"}],"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 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.","ecosystems":["Maven","PyPI","npm"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"none_known"},"has_fix":true,"headline":"Inconsistent CA override function behavior within AWS IoT Device SDKs on Unix systems","id":"CVE-2021-40830","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"Maven","product":null,"products":[],"type":"security_feature_bypass","year":"2021"},"n_packages":7,"n_references":5,"next":{"headline":"Missing SNI validation and inconsistent CA override function behavior within AWS IoT Device SDKs on Apple devices","id":"CVE-2021-40831"},"packages":[{"ecosystem":"Maven","fixed":["1.5.0"],"introduced":["0"],"last_affected":[],"package":"software.amazon.awssdk.iotdevicesdk:aws-iot-device-sdk","purl":null,"source":"GHSA-c4rh-4376-gff4"},{"ecosystem":"Maven","fixed":["1.5.0"],"introduced":["0"],"last_affected":[],"package":"software.amazon.awssdk.iotdevicesdk:aws-iot-device-sdk","purl":"pkg:maven/software.amazon.awssdk.iotdevicesdk/aws-iot-device-sdk","source":"GHSA-c4rh-4376-gff4"},{"ecosystem":"PyPI","fixed":["1.6.1"],"introduced":["0"],"last_affected":[],"package":"awsiotsdk","purl":null,"source":"GHSA-c4rh-4376-gff4"},{"ecosystem":"PyPI","fixed":["1.6.1"],"introduced":["0"],"last_affected":[],"package":"awsiotsdk","purl":"pkg:pypi/awsiotsdk","source":"GHSA-c4rh-4376-gff4"},{"ecosystem":"PyPI","fixed":["1.6.1"],"introduced":["0"],"last_affected":[],"package":"awsiotsdk","purl":"pkg:pypi/awsiotsdk","source":"PYSEC-2021-863"},{"ecosystem":"npm","fixed":["1.5.3"],"introduced":["0"],"last_affected":[],"package":"aws-iot-device-sdk-v2","purl":null,"source":"GHSA-c4rh-4376-gff4"},{"ecosystem":"npm","fixed":["1.5.3"],"introduced":["0"],"last_affected":[],"package":"aws-iot-device-sdk-v2","purl":"pkg:npm/aws-iot-device-sdk-v2","source":"GHSA-c4rh-4376-gff4"}],"prev":{"headline":"TLS hostname validation issues within AWS IoT Device SDKs on macOS","id":"CVE-2021-40829"},"products":["AWS IoT Device SDK v2 for C++","AWS IoT Device SDK v2 for Java","AWS IoT Device SDK v2 for Node.js","AWS IoT Device SDK v2 for Python","AWS-C-IO"],"published":"2021-11-22","related":[{"cvss_score":6.3,"headline":"TLS hostname validation issues within AWS IoT Device SDKs on Windows","id":"CVE-2021-40828","kev_date_added":null,"published":"2021-11-22"},{"cvss_score":6.3,"headline":"Missing SNI validation and inconsistent CA override function behavior within AWS IoT Device SDKs on Apple devices","id":"CVE-2021-40831","kev_date_added":null,"published":"2021-11-22"}],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"attribution","licence":"CC BY 4.0","name":"PyPA Advisory Database","prefix":"PYSEC"},{"class":"attribution","licence":"US public information, NVD API terms","name":"NVD"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"}],"ssvc":{"automatable":null,"exploitation":null,"technical_impact":null},"state":"PUBLISHED","updated":"2024-08-04","vendors":["Amazon Web Services"]},"summary":"Attackers can bypass CA pinning in AWS IoT SDKs on Unix by spoofing DNS and compromising trust stores, allowing MQTT broker spoofing and data manipulation.","url":"https://insights.sbomify.com/CVE-2021-40830/"}