Stack-buffer-overflow in pcapplusplus: std::__1::basic_string<char>
Summary
OSV-2023-1174: Stack-buffer-overflow in std::__1::basic_string. Affects pcapplusplus versions >= 6a67cab6914074841ed81116ac72219ca070a44d, < 5f1895a7b496fa78a2927bd5fe610ab619a3f49b. Fixed in 5f1895a7b496fa78a2927bd5fe610ab619a3f49b. How to fix ↓
Check if this vulnerability affects your application
Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.
No signup required · Results in about 60 seconds
Background
pcapplusplus is an open-source library that provides a high-level interface for capturing, parsing, and analyzing network packets. It is commonly used for network traffic analysis and packet manipulation. The library is written in C++ and offers a range of features and utilities for working with network packets. However, a vulnerability has been identified in pcapplusplus that can lead to a stack-buffer-overflow.
Vulnerability Detail
The vulnerability in pcapplusplus is a stack-buffer-overflow in the std::__1::basic_string<char> class. This vulnerability can be triggered when parsing a network packet, specifically in the pcpp::NtpLayer::getReferenceIdentifierString function. An attacker can exploit this vulnerability by crafting a malicious network packet that triggers the stack-buffer-overflow, potentially leading to arbitrary code execution or a denial-of-service condition. The vulnerability has a medium severity rating.
How To Fix
Minimum fixed version
5f1895a7b496fa78a2927bd5fe610ab619a3f49b
This is the first release that contains the fix.
Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →
Workaround
There is currently no known workaround for this vulnerability. It is recommended to update pcapplusplus to the latest version as soon as possible.
Conclusion
pcapplusplus is vulnerable to a stack-buffer-overflow in the std::__1::basic_string<char> class. This vulnerability can be mitigated by updating to the latest version of pcapplusplus. For further support on vulnerability remediation, please contact DevNack.com.
See every vulnerability recorded for pcapplusplus →
FAQ
pcapplusplus is an open-source library for capturing, parsing, and analyzing network packets.
This vulnerability can potentially lead to arbitrary code execution or a denial-of-service condition.
Update pcapplusplus to the latest version, specifically commit 5f1895a7b496fa78a2927bd5fe610ab619a3f49b or later.
No, there is currently no known workaround. Updating to the latest version is the recommended solution.
The vulnerability has a medium severity rating.
References
Related vulnerabilities
Recent vulnerabilities recorded for pcapplusplus.