HighGHSA-8qvm-5x2c-j2w7CVE-2025-4565PYSEC-2026-1806

protobuf-python has a potential Denial of Service issue

Published 16 Jun 2025 · Updated 10 Sept 2026

Is your project on an affected protobuf?

Private repo? Upload its lockfile instead, or connect GitHub to check every repo.

Look after several Python apps? Indie watches up to 15 repos, private ones too, for $5 a month. See Indie

Affected packages

Affected
<4.25.8
Fixed in
4.25.8
Update to the fixed version for your release line, for example:pip install 'protobuf>=4.25.8'
Affected
>=5.26.0rc1 <5.29.5
Fixed in
5.29.5
Update to the fixed version for your release line, for example:pip install 'protobuf>=5.29.5'
Affected
>=6.30.0rc1 <6.31.1
Fixed in
6.31.1
Update to the fixed version for your release line, for example:pip install 'protobuf>=6.31.1'

Details

Summary

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.

Reporter: Alexis Challande, Trail of Bits Ecosystem Security Team [ecosystem@trailofbits.com](mailto:ecosystem@trailofbits.com)

Affected versions: This issue only affects the pure-Python implementation of protobuf-python backend. This is the implementation when PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python environment variable is set or the default when protobuf is used from Bazel or pure-Python PyPi wheels. CPython PyPi wheels do not use pure-Python by default.

This is a Python variant of a previous issue affecting protobuf-java.

Severity

This is a potential Denial of Service. Parsing nested protobuf data creates unbounded recursions that can be abused by an attacker.

Proof of Concept

For reproduction details, please refer to the unit tests decoder_test.py and message_test

Remediation and Mitigation

A mitigation is available now. Please update to the latest available versions of the following packages:

  • protobuf-python(4.25.8, 5.29.5, 6.31.1)

Is GHSA-8qvm-5x2c-j2w7 in any of your client repos?

Checking one package by hand is fine. Checking it across forty client projects is not. NPMscan reads the lockfiles in every GitHub repo you pick, finds each project with an affected protobuf, and gives you the command that fixes it.

More advisories for protobuf

  • HighCVE-2026-0994protobuf affected by a JSON recursion depth bypass · 23 Jan 2026
  • HighCVE-2022-1941protobuf-cpp and protobuf-python have potential Denial of Service issue · 23 Sept 2022
  • HighCVE-2015-5237protobuf susceptible to buffer overflow · 13 May 2022
  • LowCVE-2021-22570No summary published · 26 Jan 2022
protobuf security overview

References

Advisory data from OSV.dev (opens OSV.dev in a new tab), refreshed daily.