Heap-buffer-overflow in ndpi_snprintf

ndpi Updated 02 Oct 2025

Summary

12/10/2023
HIGH
Yes i
High
Not published

OSV-2023-1004: Heap-buffer-overflow in ndpi_snprintf. Affects ndpi versions >= a76b9d151f58e000980abffc29b0192b08c5bb4e, < 30fc89e556e5c09bf62b9548862cc3d924b9ec81. Fixed in 30fc89e556e5c09bf62b9548862cc3d924b9ec81. How to fix ↓

Free scan

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.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Your last release was probably never penetration tested Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

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 →

Share this vulnerability

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.

Related vulnerabilities

Recent vulnerabilities recorded for ndpi.

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 →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback