CVE-2026-15911
Improper TLS cert validation in Kafka Python Vault KMS lets remote attackers steal data.
- CVSS 7.4
- CWE-295
- Authentication, Authorization, and Session Management
- Remote
Confluent Kafka Python client's HashiCorp Vault KMS integration could allow a remote attacker to obtain sensitive information due to improper TLS certificate validation.
- CWE
- CWE-295
- CVSS base score
- 7.4
- Published
- 2026-10-01
- OWASP
- A02 Cryptographic Failures
- Orthogonal defect classification
- Interface
- Code defect classification
- Incorrect Interface
- Category
- Authentication, Authorization, and Session Management
- Subcategory
- Insecure Authentication Mechanisms
- Accessibility scope
- Remote
- Impact
- Information Disclosure
- Affected component
- confluent-kafka-python
- Fixed by upgrading
- Yes
Solution
Upgrade the confluent‑kafka Python client to v2.2.0 (or newer), which includes proper TLS certificate validation for the Vault KMS integration.
Vulnerable code sample
import ssl
from confluent_kafka import Consumer, KafkaException
from confluent_kafka.kafka import KafkaError
from confluent_kafka.serde import Serializer
def create_consumer(broker, vault_addr, token):
# VULNERABLE: disables TLS certificate verification
ssl_ctx = ssl.create_default_context()
ssl_ctx.check_hostname = False
ssl_ctx.verify_mode = ssl.CERT_NONE
conf = {
'bootstrap.servers': broker,
'group.id': 'example-group',
'security.protocol': 'ssl',
'ssl.context': ssl_ctx,
'ssl.key.password': '',
'ssl.key.location': '/path/to/key',
'ssl.certificate.location': '/path/to/cert',
'ssl.ca.location': '/path/to/ca',
'ssl.keymanager.type': 'vault',
'ssl.keymanager.vault.addr': vault_addr,
'ssl.keymanager.vault.token': token,
'ssl.keymanager.vault.kms_key_name': 'my-kms-key'
}
return Consumer(conf)
def consume_messages(consumer):
try:
consumer.subscribe(['my-topic'])
while True:
msg = consumer.poll(1.0)
if msg is None:
continue
if msg.error():
if msg.error().code() == KafkaError._PARTITION_EOF:
continue
else:
raise KafkaException(msg.error())
# process msg.value()
finally:
consumer.close()Patched code sample
import ssl
from confluent_kafka import Consumer, KafkaException
from confluent_kafka.kafka import KafkaError
from confluent_kafka.serde import Serializer
def create_consumer(broker, vault_addr, token):
# FIX: enforce proper TLS certificate validation
ssl_ctx = ssl.create_default_context()
conf = {
'bootstrap.servers': broker,
'group.id': 'example-group',
'security.protocol': 'ssl',
'ssl.context': ssl_ctx,
'ssl.key.password': '',
'ssl.key.location': '/path/to/key',
'ssl.certificate.location': '/path/to/cert',
'ssl.ca.location': '/path/to/ca',
'ssl.keymanager.type': 'vault',
'ssl.keymanager.vault.addr': vault_addr,
'ssl.keymanager.vault.token': token,
'ssl.keymanager.vault.kms_key_name': 'my-kms-key'
}
return Consumer(conf)
def consume_messages(consumer):
try:
consumer.subscribe(['my-topic'])
while True:
msg = consumer.poll(1.0)
if msg is None:
continue
if msg.error():
if msg.error().code() == KafkaError._PARTITION_EOF:
continue
else:
raise KafkaException(msg.error())
# process msg.value()
finally:
consumer.close()Cite this entry
@misc{vaitp:cve202615911,
title = {{Improper TLS cert validation in Kafka Python Vault KMS lets remote attackers steal data.}},
author = {Bogaerts, Fr\'ed\'eric and Ivaki, Naghmeh and Fonseca, Jos\'e},
year = {2026},
note = {VAITP Python Vulnerability Dataset, entry CVE-2026-15911},
howpublished = {\url{https://netpack.pt/vaitp/vulnerability/CVE-2026-15911/}}
}
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 ::
