CVE-2021-4190

HIGH7.5/ 10.0
Share:
Published: December 30, 2021 at 10:15 PM
Modified: November 3, 2025 at 10:15 PM
Source: cve@gitlab.com

Vulnerability Description

Large loop in the Kafka dissector in Wireshark 3.6.0 allows denial of service via packet injection or crafted capture file

CVSS Metrics

Base Score
7.5
Severity
HIGH
Vector String
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

Weaknesses (CWE)

Source: nvd@nist.gov

AI Security Analysis

01 // Technical Summary

Wireshark, a widely used network protocol analyzer, is vulnerable to a denial-of-service (DoS) attack. A flaw in the Kafka dissector allows attackers to crash Wireshark by injecting malicious packets or loading a crafted capture file, rendering the application unusable. This vulnerability can disrupt network analysis and incident response efforts.

02 // Vulnerability Mechanism

Step 1: Payload Delivery: An attacker crafts a malicious Kafka packet or creates a capture file (.pcap or .pcapng) containing a malicious Kafka packet.

Step 2: Packet Injection/File Loading: The attacker either injects the malicious packet directly onto a network monitored by Wireshark or provides a crafted capture file to a user.

Step 3: Dissector Trigger: The victim opens the capture file in Wireshark or Wireshark captures the malicious packet.

Step 4: Loop Execution: The Kafka dissector is invoked to parse the Kafka packet. The crafted packet triggers the vulnerable loop.

Step 5: Resource Exhaustion: The loop consumes excessive CPU resources as it iterates repeatedly.

Step 6: Denial of Service: Wireshark becomes unresponsive, crashes, or is otherwise unable to function, resulting in a denial-of-service condition.

03 // Deep Technical Analysis

The vulnerability lies within the Kafka dissector in Wireshark version 3.6.0. The dissector, responsible for parsing and interpreting Kafka protocol traffic, contains a large loop that is triggered by specific crafted packets or capture files. The root cause is a lack of input validation or improper bounds checking within the loop's processing logic. When the dissector encounters a malicious packet, the loop iterates excessively, consuming significant CPU resources and eventually leading to a denial-of-service condition. This is not a memory corruption vulnerability, but rather a resource exhaustion attack. The specific function or logic flaw is within the parsing of Kafka message headers or payloads, where the dissector fails to properly handle malformed or excessively large data structures, causing the loop to run indefinitely.

References & Intelligence

https://gitlab.com/gitlab-org/cves/-/blob/master/2021/CVE-2021-4190.json
Source: cve@gitlab.com
Third Party Advisory
https://gitlab.com/wireshark/wireshark/-/issues/17811
Source: cve@gitlab.com
ExploitIssue TrackingPatchThird Party Advisory
https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/Q6XGBKWSQFCVYUN4ZK3O3NJIFP3OAFVT/
Source: cve@gitlab.com
https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/R5AEK3XTOIOGCGUILUFISMGX54YJXWGJ/
Source: cve@gitlab.com
https://security.gentoo.org/glsa/202210-04
Source: cve@gitlab.com
Third Party Advisory
https://www.wireshark.org/security/wnpa-sec-2021-22.html
Source: cve@gitlab.com
Vendor Advisory
https://gitlab.com/gitlab-org/cves/-/blob/master/2021/CVE-2021-4190.json
Source: af854a3a-2127-422b-91ae-364da2661108
Third Party Advisory
https://gitlab.com/wireshark/wireshark/-/issues/17811
Source: af854a3a-2127-422b-91ae-364da2661108
ExploitIssue TrackingPatchThird Party Advisory
https://lists.debian.org/debian-lts-announce/2024/09/msg00049.html
Source: af854a3a-2127-422b-91ae-364da2661108
https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/Q6XGBKWSQFCVYUN4ZK3O3NJIFP3OAFVT/
Source: af854a3a-2127-422b-91ae-364da2661108
https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/R5AEK3XTOIOGCGUILUFISMGX54YJXWGJ/
Source: af854a3a-2127-422b-91ae-364da2661108
https://security.gentoo.org/glsa/202210-04
Source: af854a3a-2127-422b-91ae-364da2661108
Third Party Advisory
https://www.wireshark.org/security/wnpa-sec-2021-22.html
Source: af854a3a-2127-422b-91ae-364da2661108
Vendor Advisory
CVE-2021-4190 - HIGH Severity (7.5) | Free CVE Database | 4nuxd