CVE-2023-5371 Overview
CVE-2023-5371 is a memory leak vulnerability in the RTPS (Real-Time Publish-Subscribe) protocol dissector within Wireshark, the widely-used network protocol analyzer. The vulnerability affects Wireshark versions 4.0.0 to 4.0.8 and 3.6.0 to 3.6.16, allowing attackers to cause denial of service conditions through packet injection or crafted capture files.
Critical Impact
An attacker can exhaust system memory by sending specially crafted RTPS packets or tricking users into opening malicious capture files, resulting in denial of service and potential system instability.
Affected Products
- Wireshark versions 4.0.0 through 4.0.8
- Wireshark versions 3.6.0 through 3.6.16
Discovery Timeline
- 2023-10-04 - CVE-2023-5371 published to NVD
- 2024-11-21 - Last updated in NVD database
Technical Details for CVE-2023-5371
Vulnerability Analysis
The vulnerability resides in Wireshark's RTPS dissector, a component responsible for parsing Real-Time Publish-Subscribe protocol traffic commonly used in DDS (Data Distribution Service) implementations. The flaw is classified under CWE-789 (Memory Allocation with Excessive Size Value) and CWE-770 (Allocation of Resources Without Limits or Throttling).
When processing RTPS protocol data, the dissector fails to properly manage memory allocations, resulting in a memory leak. Each time malicious packets are processed, memory is allocated but never freed, causing progressive memory exhaustion. This vulnerability requires user interaction, as the victim must either capture network traffic containing malicious packets or open a crafted capture file.
The attack is network-based and requires no authentication or special privileges. The impact is limited to availability—there is no compromise of confidentiality or integrity. However, the denial of service can be significant, particularly in environments where Wireshark is used for continuous network monitoring or security analysis.
Root Cause
The root cause of CVE-2023-5371 is improper memory management within the RTPS dissector code. The dissector allocates memory during packet parsing operations but fails to implement proper cleanup routines, causing allocated memory blocks to persist indefinitely. This represents a classic resource exhaustion vulnerability where unbounded memory allocation eventually depletes available system resources.
Attack Vector
The vulnerability can be exploited through two primary attack vectors:
Packet Injection: An attacker on the same network segment can inject specially crafted RTPS packets that trigger the memory leak when Wireshark captures and dissects them.
Malicious Capture Files: An attacker can distribute crafted .pcap or .pcapng capture files containing malicious RTPS packets. When a user opens these files in Wireshark for analysis, the memory leak is triggered.
The attack complexity is low, but exploitation requires user interaction—either active network capture or manual file opening. Sustained exploitation leads to memory exhaustion, causing Wireshark to become unresponsive or crash, and potentially affecting overall system stability.
Detection Methods for CVE-2023-5371
Indicators of Compromise
- Unusual memory consumption growth in Wireshark processes during RTPS traffic analysis
- Wireshark crashes or hangs when processing capture files containing RTPS protocol data
- System memory exhaustion events correlated with network capture activities
- Abnormally large or malformed RTPS packets in network traffic
Detection Strategies
- Monitor Wireshark process memory usage for anomalous growth patterns during packet capture sessions
- Implement file integrity monitoring on capture files before analysis in sensitive environments
- Deploy network intrusion detection signatures for malformed RTPS protocol packets
- Use sandboxed environments when analyzing untrusted capture files
Monitoring Recommendations
- Configure system-level memory monitoring alerts for Wireshark processes exceeding normal thresholds
- Review network traffic logs for unusual RTPS protocol activity from untrusted sources
- Maintain audit logs of capture file sources and analysis sessions
- Implement endpoint monitoring for application crashes related to Wireshark
How to Mitigate CVE-2023-5371
Immediate Actions Required
- Upgrade Wireshark to version 4.0.9 or later for the 4.x branch
- Upgrade Wireshark to version 3.6.17 or later for the 3.6.x branch
- Avoid analyzing capture files from untrusted sources until patched
- Consider disabling the RTPS dissector if RTPS protocol analysis is not required
Patch Information
Wireshark has released security patches addressing this vulnerability. The fix is included in Wireshark 4.0.9 and 3.6.17. Users should upgrade to these versions or later to remediate the vulnerability. Additional details are available in the Wireshark Security Advisory wnpa-sec-2023-27 and the GitLab Issue Report.
Linux distribution users should also check for patched packages through their respective package managers. Fedora and Gentoo have released security updates addressing this vulnerability.
Workarounds
- Disable the RTPS dissector by navigating to Analyze → Enabled Protocols and unchecking RTPS
- Run Wireshark in isolated environments with memory limits configured
- Use capture filters to exclude RTPS traffic if not required for analysis
- Process untrusted capture files in sandboxed virtual machines
# Disable RTPS dissector via command line
wireshark -o "rtps.enabled:FALSE" capture_file.pcap
# Alternative: Use tshark with disabled dissector for batch processing
tshark -o "rtps.enabled:FALSE" -r untrusted_capture.pcap
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.


