Skip to main content

CVE-2025-4565: CWE-674 Uncontrolled Recursion in protocolbuffers Python-Protobuf

High
VulnerabilityCVE-2025-4565cvecve-2025-4565cwe-674
Published: Mon Jun 16 2025 (06/16/2025, 14:50:40 UTC)
Source: CVE Database V5
Vendor/Project: protocolbuffers
Product: Python-Protobuf

Description

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 the Python recursion limit. This can result in a Denial of service by crashing the application with a RecursionError. We recommend upgrading to version =>6.31.1 or beyond commit 17838beda2943d08b8a9d4df5b68f5f04f26d901

AI-Powered Analysis

AILast updated: 06/16/2025, 15:19:32 UTC

Technical Analysis

CVE-2025-4565 is a high-severity vulnerability affecting the Python-Protobuf library, specifically its Pure-Python backend used for parsing Protocol Buffers data. The vulnerability arises from uncontrolled recursion when parsing untrusted Protocol Buffers data that contains an arbitrary number of recursive groups, recursive messages, or a series of SGROUP tags. This recursive parsing can exceed Python's recursion limit, leading to a RecursionError and causing the application to crash. The root cause is identified as CWE-674 (Uncontrolled Recursion), where the parser does not impose sufficient limits on the depth or number of recursive elements it processes. This flaw can be exploited remotely without authentication or user interaction by sending crafted Protocol Buffers data to an application using the vulnerable Python-Protobuf versions prior to 6.31.1. The CVSS 4.0 base score of 8.2 reflects the network attack vector, low attack complexity, no privileges required, no user interaction, and a high impact on availability due to denial of service (DoS). No known exploits are currently reported in the wild, but the vulnerability is publicly disclosed and patched in version 6.31.1 and later. The vulnerability affects any project that relies on the Pure-Python backend for Protocol Buffers parsing, which is common in Python applications handling serialized data for inter-service communication, data storage, or configuration. The issue does not impact confidentiality or integrity directly but can cause service outages and application crashes, disrupting normal operations.

Potential Impact

For European organizations, the primary impact of CVE-2025-4565 is the risk of denial of service through application crashes when processing maliciously crafted Protocol Buffers data. Organizations using Python applications that rely on the Pure-Python backend of Python-Protobuf for data serialization and deserialization are vulnerable. This includes sectors such as finance, telecommunications, healthcare, and critical infrastructure where Protocol Buffers are used for efficient data interchange. A successful exploitation can lead to service interruptions, affecting availability and potentially causing operational downtime, loss of productivity, and reputational damage. Since the vulnerability does not require authentication or user interaction, exposed network-facing services parsing Protocol Buffers data are at risk. The impact is particularly significant for microservices architectures and cloud-native applications prevalent in European enterprises, where Protocol Buffers are widely adopted for inter-service communication. Additionally, organizations subject to stringent regulatory requirements around service availability (e.g., financial institutions under PSD2 or healthcare providers under GDPR mandates) may face compliance risks if service disruptions occur.

Mitigation Recommendations

1. Upgrade Python-Protobuf to version 6.31.1 or later, which contains the fix for this uncontrolled recursion vulnerability. 2. Audit all Python applications and services that use the Pure-Python backend of Python-Protobuf to identify and prioritize patching. 3. Implement input validation and filtering on Protocol Buffers data received from untrusted sources to limit recursion depth or reject suspiciously nested data structures before parsing. 4. Employ runtime monitoring and alerting for RecursionError exceptions or abnormal application crashes related to Protocol Buffers parsing. 5. Where feasible, switch from the Pure-Python backend to the C++ backend of Python-Protobuf, which is less likely to be affected by this recursion issue due to different parsing implementations. 6. Use network-level protections such as Web Application Firewalls (WAFs) or Intrusion Detection Systems (IDS) to detect and block anomalous Protocol Buffers payloads exhibiting recursive patterns. 7. Conduct regular security testing including fuzzing of Protocol Buffers inputs to identify similar parsing vulnerabilities proactively.

Need more detailed analysis?Get Pro

Technical Details

Data Version
5.1
Assigner Short Name
Google
Date Reserved
2025-05-12T05:48:12.941Z
Cvss Version
4.0
State
PUBLISHED

Threat ID: 6850327da8c9212743843f4b

Added to database: 6/16/2025, 3:04:29 PM

Last enriched: 6/16/2025, 3:19:32 PM

Last updated: 8/14/2025, 9:26:31 PM

Views: 35

Actions

PRO

Updates to AI analysis are available only with a Pro account. Contact root@offseq.com for access.

Please log in to the Console to use AI analysis features.

Need enhanced features?

Contact root@offseq.com for Pro access with improved analysis and higher rate limits.

Latest Threats