Denial of Service Vulnerability in Protobuf Package: CVE-2025-4565
Summary
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 ↓
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.
No signup required · Results in about 60 seconds
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 →
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.
References
Related vulnerabilities
Recent vulnerabilities recorded for protobuf.
Follow Vulert in Google
Get more Vulert vulnerability and dependency-security updates in Google Search and AI results.