# CVE-2025-4565: Unbounded recursion in Python Protobuf

> Attackers can cause a denial of service by sending crafted Protocol Buffers data that triggers unbounded recursion in the Python backend.

- **Severity:** High 8.2 (`CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 16 Jun 2025
- **Updated:** 16 Jun 2025
- **Also known as:** AZL-64116, AZL-64145, CLEANSTART-2026-AJ37514, CLEANSTART-2026-OD41490, CLSA-2025-1762301642, DEBIAN-CVE-2025-4565, ECHO-869d-3ec4-efd0, GHSA-8qvm-5x2c-j2w7, MINI-27vf-p2x7-jcp5, MINI-j88c-cqx4-f484, OESA-2025-1713, OESA-2025-1714, OESA-2025-1798, OESA-2025-1799, OESA-2025-1800, OESA-2025-1801, PYSEC-2026-1806, ROOT-APP-PYPI-CVE-2025-4565, SUSE-SU-2025:02309-1, SUSE-SU-2025:02310-1, SUSE-SU-2025:02311-1, SUSE-SU-2025:20514-1, SUSE-SU-2025:3722-1, UBUNTU-CVE-2025-4565, openSUSE-SU-2025:15265-1

## What is CVE-2025-4565?

CVE-2025-4565 is a high-severity denial of service vulnerability in protocolbuffers Python-Protobuf, published on 16 Jun 2025. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official 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

Weakness: CWE-674 (Uncontrolled Recursion)

## Which versions are affected by CVE-2025-4565?

7 open source packages ship an affected version, including protobuf. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `protobuf` | PyPI | All versions | 4.25.8, 5.29.5, 6.31.1 |
| `protobuf` | PyPI | All versions | 4.25.8 |
| `protobuf` | PyPI | All versions | 4.25.8 |
| `protobuf` | PyPI | From 5.26.0rc1 | 5.29.5 |
| `protobuf` | PyPI | From 5.26.0rc1 | 5.29.5 |
| `protobuf` | PyPI | From 6.30.0rc1 | 6.31.1 |
| `protobuf` | PyPI | From 6.30.0rc1 | 6.31.1 |
| `protobuf` | SUSE:Linux Enterprise Micro 5.1 | All versions | 3.9.2-150200.4.27.1 |
| `protobuf` | SUSE:Linux Enterprise Micro 5.2 | All versions | 3.9.2-150200.4.27.1 |
| `protobuf` | SUSE:Linux Enterprise Micro 5.3 | All versions | 25.1-150400.9.16.1 |
| `protobuf` | SUSE:Linux Enterprise Micro 5.3 | All versions | 3.9.2-150200.4.27.1 |
| `protobuf` | SUSE:Linux Enterprise Micro 5.4 | All versions | 25.1-150400.9.16.1 |
| `protobuf` | SUSE:Linux Enterprise Micro 5.4 | All versions | 3.9.2-150200.4.27.1 |
| `protobuf` | SUSE:Linux Enterprise Micro 5.5 | All versions | 25.1-150500.12.11.1 |
| `protobuf` | SUSE:Linux Enterprise Micro 5.5 | All versions | 3.9.2-150200.4.27.1 |
| `protobuf` | SUSE:Linux Enterprise Module for Basesystem 15 SP6 | All versions | 25.1-150600.16.13.1 |
| `protobuf` | SUSE:Linux Enterprise Module for Basesystem 15 SP6 | All versions | 3.9.2-150200.4.27.1 |
| `protobuf` | SUSE:Linux Enterprise Module for Basesystem 15 SP7 | All versions | 25.1-150600.16.13.1 |
| `protobuf` | SUSE:Linux Enterprise Module for Basesystem 15 SP7 | All versions | 3.9.2-150200.4.27.1 |
| `protobuf` | SUSE:Linux Enterprise Module for Development Tools 15 SP6 | All versions | 25.1-150600.16.13.1 |
| `protobuf` | SUSE:Linux Enterprise Module for Development Tools 15 SP7 | All versions | 25.1-150600.16.13.1 |
| `protobuf` | SUSE:Linux Enterprise Module for Package Hub 15 SP6 | All versions | 25.1-150600.16.13.1 |
| `protobuf` | SUSE:Linux Enterprise Module for Package Hub 15 SP6 | All versions | 3.9.2-150200.4.27.1 |
| `protobuf` | SUSE:Linux Enterprise Module for Package Hub 15 SP7 | All versions | 3.9.2-150200.4.27.1 |
| `protobuf` | SUSE:Linux Enterprise Module for Public Cloud 15 SP3 | All versions | 3.9.2-150200.4.27.1 |
| `protobuf` | SUSE:Linux Enterprise Module for Public Cloud 15 SP4 | All versions | 25.1-150400.9.16.1 |
| `protobuf` | SUSE:Linux Enterprise Module for Public Cloud 15 SP4 | All versions | 3.9.2-150200.4.27.1 |
| `protobuf` | SUSE:Linux Enterprise Module for Public Cloud 15 SP5 | All versions | 25.1-150500.12.11.1 |
| `protobuf` | SUSE:Linux Enterprise Module for Public Cloud 15 SP5 | All versions | 3.9.2-150200.4.27.1 |
| `protobuf` | SUSE:Linux Enterprise Module for Public Cloud 15 SP6 | All versions | 3.9.2-150200.4.27.1 |
| `protobuf` | SUSE:Linux Enterprise Module for Public Cloud 15 SP7 | All versions | 3.9.2-150200.4.27.1 |
| `protobuf` | SUSE:Linux Enterprise Module for Python 3 15 SP6 | All versions | 25.1-150600.16.13.1 |
| `protobuf` | SUSE:Linux Enterprise Module for Python 3 15 SP7 | All versions | 25.1-150600.16.13.1 |
| `protobuf` | SUSE:Linux Micro 6.0 | All versions | 23.4-10.1 |
| `protobuf` | SUSE:Manager Server Module 4.3 | All versions | 25.1-150400.9.16.1 |
| `protobuf` | openSUSE:Leap 15.6 | All versions | 25.1-150600.16.13.1 |
| `protobuf` | openSUSE:Tumbleweed | All versions | 31.1-1.1 |

Products: Google Protobuf-Python.

## How do I fix CVE-2025-4565?

Upgrade protobuf to a fixed version for your release line: 4.25.8, 5.29.5 or 6.31.1.

## Is CVE-2025-4565 being exploited?

There is no known exploitation of CVE-2025-4565 in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2025-4565 and fix it if it is affected.

What it is: CVE-2025-4565 is a high-severity denial of service vulnerability in protocolbuffers Python-Protobuf, published on 16 Jun 2025. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2025-4565 in the wild and no public exploit code.

Affected packages and fixed versions:
- protobuf (PyPI): affected all versions; fixed in 4.25.8, 5.29.5, 6.31.1
- protobuf (PyPI): affected all versions; fixed in 4.25.8
- protobuf (PyPI): affected all versions; fixed in 4.25.8
- protobuf (PyPI): affected from 5.26.0rc1; fixed in 5.29.5
- protobuf (PyPI): affected from 5.26.0rc1; fixed in 5.29.5
- protobuf (PyPI): affected from 6.30.0rc1; fixed in 6.31.1
- protobuf (PyPI): affected from 6.30.0rc1; fixed in 6.31.1

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2025-4565/ (Markdown: https://insights.sbomify.com/CVE-2025-4565/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2025-4565
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2025-4565
- OSV: https://osv.dev/vulnerability/CVE-2025-4565

---
From sbomify Insights: https://insights.sbomify.com/CVE-2025-4565/
Summaries are generated and may contain mistakes; the official description above is the record.
