Heap-buffer-overflow in ndpi_snprintf
Summary
OSV-2023-1004: Heap-buffer-overflow in ndpi_snprintf. Affects ndpi versions >= a76b9d151f58e000980abffc29b0192b08c5bb4e, < 30fc89e556e5c09bf62b9548862cc3d924b9ec81. Fixed in 30fc89e556e5c09bf62b9548862cc3d924b9ec81. 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
The ndpi package is an open-source library used for deep packet inspection. It provides functionality to analyze network traffic and identify protocols. The package is widely used in various applications and systems that require network monitoring and analysis. However, a vulnerability has been discovered in the ndpi_snprintf function, which can lead to a heap-buffer-overflow.
Vulnerability Detail
The vulnerability in ndpi_snprintf function allows a heap-buffer-overflow write of 11 bytes. This can be triggered during the serialization process, specifically in the ndpi_serialize_string_int32 function in the fuzz_serialization.cpp file. An attacker could exploit this vulnerability to execute arbitrary code or cause a denial-of-service condition. The vulnerability has been assigned a severity rating of HIGH.
How To Fix
Minimum fixed version
30fc89e556e5c09bf62b9548862cc3d924b9ec81
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 no known workaround for this vulnerability. It is essential to update the ndpi package to the patched version to mitigate the risk.
Conclusion
The ndpi package is vulnerable to a heap-buffer-overflow in the ndpi_snprintf function. This can be exploited to execute arbitrary code or cause a denial-of-service condition. It is crucial to update the package to the latest version that includes the fix to mitigate the risk. For further support on vulnerability remediation, please contact DevNack.com.
See every vulnerability recorded for ndpi →
FAQ
ndpi is an open-source library used for deep packet inspection. It allows the analysis of network traffic and identification of protocols.
The vulnerability can be exploited by an attacker to execute arbitrary code or cause a denial-of-service condition.
To fix this vulnerability, update the ndpi package to the latest version that includes the fix for this issue.
No, there is no known workaround. Updating to the patched version is the recommended solution.
You can find more information about this vulnerability in the OSS-Fuzz report linked in the vulnerability details.
References
Related vulnerabilities
Recent vulnerabilities recorded for ndpi.