Denial of Service Vulnerability in Protobuf Package: CVE-2025-4565

protobuf Updated 02 Oct 2025

Summary

16/06/2025
N/A
No i
Medium
5.3

CVE-2025-4565: Any project that uses Protobuf Pure-Python backend to parse untrusted Protocol Buffers data containing an arbitrary number of recursive groups, recursive messages or a series of SGROUP tags can be corrupted by exceeding... Affects protobuf versions < 17838beda2943d08b8a9d4df5b68f5f04f26d901. 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

The Protobuf package, widely used for serializing structured data, is essential in various applications for efficient data interchange. It supports multiple programming languages and is known for its performance and flexibility. However, the Pure-Python backend of Protobuf is susceptible to a vulnerability that can lead to denial of service under specific conditions.

Vulnerability Detail

CVE-2025-4565 arises from the Protobuf Pure-Python backend's inability to handle untrusted Protocol Buffers data containing recursive groups or messages. When such data is processed, it can exceed Python's recursion limit, resulting in a RecursionError that crashes the application. This vulnerability can be exploited by attackers to disrupt service availability, making it critical for developers to address.

How To Fix

No fixed version is published for this vulnerability.

To rectify this vulnerability, upgrade the Protobuf package to version 6.31.1 or later. You can do this by running the following command in your terminal: 'pip install --upgrade protobuf'. Ensure that your application is tested after the upgrade to confirm that the vulnerability has been resolved.

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 can limit the depth of recursion in your application by adjusting the recursion limit in Python. Use the following code snippet to set a lower recursion limit: 'import sys; sys.setrecursionlimit(1000)'. However, this is not a permanent solution and upgrading the package is recommended.

Conclusion

CVE-2025-4565 poses a significant risk to applications using the Protobuf package, particularly those relying on the Pure-Python backend. It is crucial for developers to upgrade to the patched version to mitigate the risk of denial of service. Utilizing tools like Vulert can help monitor and alert for such vulnerabilities in real-time.

See every vulnerability recorded for protobuf →

Share this vulnerability

FAQ

CVE-2025-4565 is a vulnerability in the Protobuf package that can lead to denial of service by crashing applications when processing untrusted Protocol Buffers data.

You can check if your application is affected by using Vulert, which monitors open-source vulnerabilities in real-time. Visit Vulert Scanner to analyze your manifest file.

Exploiting this vulnerability can lead to application crashes, resulting in service disruption and potential downtime for users.

Yes, upgrading to Protobuf version 6.31.1 or later will patch the vulnerability.

If an immediate upgrade is not possible, consider implementing the temporary workaround by limiting the recursion depth in your application.

Related vulnerabilities

Recent vulnerabilities recorded for protobuf.

How To Fix

No fixed version is published for this vulnerability.

To rectify this vulnerability, upgrade the Protobuf package to version 6.31.1 or later. You can do this by running the following command in your terminal: 'pip install --upgrade protobuf'. Ensure that your application is tested after the upgrade to confirm that the vulnerability has been resolved.

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

Follow Vulert in Google

Get more Vulert vulnerability and dependency-security updates in Google Search and AI results.