Heap Buffer Overflow Vulnerability in nDPI Package

ndpi Updated 02 Oct 2025

Summary

21/07/2025
HIGH
Yes i
High
Not published

OSV-2025-564: Heap-buffer-overflow in ndpi_match_host_subprotocol. Affects ndpi versions >= 61d152778d6329350ccf5acb063d6ffc3fd1b366, < ae48c8df7a7b01e67838572621b758e4b2d966ec. Fixed in ae48c8df7a7b01e67838572621b758e4b2d966ec. 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 MarkAI Find prospects already talking about the problem you solve AI watches the communities your customers use to find qualified prospects, then alerts you when a conversation is worth joining. See MarkAI

Background

nDPI (ntop Deep Packet Inspection) is an open-source software library designed for deep packet inspection and network traffic analysis. It enables applications to identify and classify network protocols, providing insights into network usage and security. However, like many software libraries, nDPI is susceptible to vulnerabilities that can be exploited if not properly addressed.

Vulnerability Detail

The vulnerability identified as OSV-2025-564 is a heap-buffer-overflow that occurs in the function ndpi_match_host_subprotocol. This issue can lead to a crash of the application, potentially allowing an attacker to exploit the overflow to execute arbitrary code or cause denial of service. The vulnerability was introduced in the codebase and has been assigned a high severity rating due to its potential impact on system stability and security.

How To Fix

Minimum fixed version

ae48c8df7a7b01e67838572621b758e4b2d966ec

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

As a temporary workaround, you may consider limiting the input size to the ndpi_match_host_subprotocol function to prevent the overflow from occurring. However, this is not a permanent solution and should only be used until the package can be updated.

Conclusion

The heap buffer overflow vulnerability in the nDPI package poses significant risks to applications utilizing this library. It is crucial to update to the patched version to ensure the security and stability of your software. Additionally, using tools like Vulert can help monitor and manage vulnerabilities effectively.

See every vulnerability recorded for ndpi →

Share this vulnerability

FAQ

A heap buffer overflow occurs when a program writes more data to a buffer located on the heap than it can hold, potentially overwriting adjacent memory and leading to unpredictable behavior.

Exploiting this vulnerability could allow an attacker to crash your application or execute arbitrary code, compromising the security and stability of your system.

Yes, a patch is available in the fixed version ae48c8df7a7b01e67838572621b758e4b2d966ec. It is recommended to update to this version to mitigate the risk.

You can use Vulert, which monitors and alerts for open-source vulnerabilities in your software. By using the Vulert playground, you can check if your application is affected by this vulnerability without needing to sign up.

If you cannot update the package immediately, consider implementing input size limitations as a temporary workaround until you can apply the patch.

Related vulnerabilities

Recent vulnerabilities recorded for ndpi.

How To Fix

Minimum fixed version

ae48c8df7a7b01e67838572621b758e4b2d966ec

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