Heap Buffer Overflow Vulnerability in PcapPlusPlus Package

pcapplusplus Updated 02 Oct 2025

Summary

19/04/2025
MEDIUM
No i
Medium
Not published

OSV-2025-290: Heap-buffer-overflow in pcpp::TelnetLayer::toString. Affects pcapplusplus versions >= 813f15b87f5e76a62d64360f8cbdf449c21316e4. No fix is published. 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 Penetration testing for web, API and mobile Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

PcapPlusPlus is an open-source C++ library designed for packet processing and network analysis. It provides a high-level interface for working with various network protocols, making it easier for developers to create applications that require packet manipulation. The library is widely used in network security, monitoring, and analysis tools. However, it has been identified to have a heap buffer overflow vulnerability that can lead to potential crashes and security risks.

Vulnerability Detail

The vulnerability is a heap-buffer-overflow that occurs in the 'pcpp::TelnetLayer::toString' function. This issue can lead to a crash when the function is called, as it attempts to read beyond the allocated memory buffer. The vulnerability was introduced in the commit '813f15b87f5e76a62d64360f8cbdf449c21316e4' and has been reported in the OSS-Fuzz issue tracker. If exploited, this vulnerability could allow an attacker to cause a denial of service or potentially execute arbitrary code.

How To Fix

No fixed version is published for this vulnerability.

Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →

Workaround

As a temporary workaround, avoid using the 'pcpp::TelnetLayer::toString' function until the package is updated. You can implement checks in your code to prevent calls to this function until the vulnerability is resolved.

Conclusion

The heap buffer overflow vulnerability in the PcapPlusPlus package poses significant risks to applications using this library. It is crucial to update to the latest version to mitigate these risks and ensure the security and stability of your applications. Utilizing tools like Vulert can help monitor and manage vulnerabilities effectively.

See every vulnerability recorded for pcapplusplus →

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, leading to memory corruption and potential security vulnerabilities.

Exploiting this vulnerability can lead to application crashes, denial of service, or even arbitrary code execution, compromising the security of your application.

Yes, a patch is available. It is recommended to update to the latest version of the PcapPlusPlus package to mitigate this vulnerability.

You can use Vulert, which monitors and alerts in real-time for open-source vulnerabilities in your software by analyzing a manifest file like package-lock.json.

You can use the Vulert playground at Vulert Scanner to check if your application is affected by this vulnerability without requiring any signup.

Related vulnerabilities

Recent vulnerabilities recorded for pcapplusplus.

How To Fix

No fixed version is published for this vulnerability.

Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. 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