Heap Buffer Overflow Vulnerability in PcapPlusPlus: ArpLayer toString Function

pcapplusplus Updated 09 Dec 2025

Summary

10/09/2025
MEDIUM
No i
Medium
Not published

OSV-2025-718: Heap-buffer-overflow in pcpp::ArpLayer::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 Mobile apps built by Devnack Design, build and launch iOS and Android apps with a senior product team. From idea to store release Start a project

Background

PcapPlusPlus is an open-source C++ library designed for packet capture and network analysis. It provides a high-level API for working with various network protocols, making it easier for developers to create applications that require packet manipulation and analysis. The library is widely used in network security tools, traffic analysis applications, and educational projects. However, it has recently been identified to have a heap buffer overflow vulnerability in the ArpLayer::toString function, which could lead to potential exploitation if not addressed.

Vulnerability Detail

The vulnerability arises from a heap buffer overflow in the pcpp::ArpLayer::toString function. This issue was reported through OSS-Fuzz, indicating that the function can read beyond the allocated memory, leading to crashes or potential exploitation. The specific crash type is a 'Heap-buffer-overflow READ 2', which means that the application attempts to read data from an invalid memory location. If exploited, this vulnerability could allow an attacker to execute arbitrary code or cause a denial of service, impacting the stability and security of applications relying on 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 →

Workaround

As a temporary workaround, you may consider avoiding the use of the ArpLayer::toString function in your application until the vulnerability is patched. Additionally, implementing input validation and sanitization can help mitigate the risk of exploitation.

Conclusion

The heap buffer overflow vulnerability in the PcapPlusPlus library's ArpLayer::toString function poses a significant risk to applications utilizing this library. It is crucial for developers to update to the latest patched version and consider implementing workarounds to mitigate potential exploitation. Regular monitoring for vulnerabilities using tools like Vulert can enhance security and maintain application integrity.

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, potentially overwriting adjacent memory and leading to unpredictable behavior.

You can use Vulert, which monitors and alerts for open-source vulnerabilities in your software. By utilizing the Vulert playground, you can check if your application is affected by this vulnerability without any signup.

If exploited, this vulnerability could allow attackers to execute arbitrary code, leading to unauthorized access, data breaches, or denial of service.

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

OSS-Fuzz is a service that provides continuous fuzzing for open-source software, helping to identify vulnerabilities and improve software security.

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