VAITP Dataset

← Back to the dataset

CVE-2026-92943

MQTT client skips hostname verification, allowing MITM with mismatched certs.

  • CVSS 9.2
  • 297
  • Cryptographic
  • Remote

Improper validation of certificate with host mismatch in the MQTT client TLS connection layer in AWS IoT Device SDK for Python 1.5.3 through 1.6.0 on Python 3.7 and later might allow an adversary-in-the-middle actor to impersonate the AWS IoT Core endpoint, read device telemetry, and inject arbitrary MQTT messages that the device processes as authentic, via a certificate issued for an unrelated hostname by a certificate authority present in the device trust store. To remediate this issue, users should upgrade to version 1.6.1.

CWE
297
CVSS base score
9.2
Published
2026-09-17
OWASP
A02 Cryptographic Failures
Orthogonal defect classification
Checking
Code defect classification
Missing Check
Category
Cryptographic
Subcategory
Improper SSL/TLS Certificate Validation
Accessibility scope
Remote
Impact
Unauthorized Access
Affected component
AWS IoT Device SDK for Python
Fixed by upgrading
Yes

Solution

Upgrade the AWS IoT Device SDK for Python to version 1.6.1.

Vulnerable code sample

from AWSIoTPythonSDK.MQTTLib import AWSIoTMQTTClient

def connect_iot():
    client = AWSIoTMQTTClient("myDevice")
    client.configureEndpoint("a3q7example.iot.us-west-2.amazonaws.com", 8883)
    client.configureCredentials("/path/to/ca.pem", "/path/to/private.key", "/path/to/certificate.pem")
    # VULNERABLE: hostname not validated
    client.tls_insecure_set(True)
    client.connect()
    return client

Patched code sample

from AWSIoTPythonSDK.MQTTLib import AWSIoTMQTTClient

def connect_iot():
    client = AWSIoTMQTTClient("myDevice")
    client.configureEndpoint("a3q7example.iot.us-west-2.amazonaws.com", 8883)
    client.configureCredentials("/path/to/ca.pem", "/path/to/private.key", "/path/to/certificate.pem")
    # FIX: enforce hostname validation
    client.tls_insecure_set(False)
    client.connect()
    return client

Cite this entry

@misc{vaitp:cve202692943,
  title        = {{MQTT client skips hostname verification, allowing MITM with mismatched certs.}},
  author       = {Bogaerts, Fr\'ed\'eric and Ivaki, Naghmeh and Fonseca, Jos\'e},
  year         = {2026},
  note         = {VAITP Python Vulnerability Dataset, entry CVE-2026-92943},
  howpublished = {\url{https://netpack.pt/vaitp/vulnerability/CVE-2026-92943/}}
}
Introducing the "VAITP dataset": a specialized repository of Python vulnerabilities and patches, meticulously compiled for the use of the security research community. As Python's prominence grows, understanding and addressing potential security vulnerabilities become crucial. Crafted by and for the cybersecurity community, this dataset offers a valuable resource for researchers, analysts, and developers to analyze and mitigate the security risks associated with Python. Through the comprehensive exploration of vulnerabilities and corresponding patches, the VAITP dataset fosters a safer and more resilient Python ecosystem, encouraging collaborative advancements in programming security.

The supreme art of war is to subdue the enemy without fighting.

Sun Tzu – “The Art of War”

:: Shaping the future through research and ingenuity ::