Skip to content

GHSA-7gcm-g887-7qv7 CVE-2026-0994 PYSEC-2026-1805

protobuf affected by a JSON recursion depth bypass

High PyPI
Severity
8.2 / 10
High · CVSS 4.0
Exploit chance (EPSS)
0.71%
Chance of exploitation in the next 30 days. Higher than 53.61% of scored vulnerabilities.
Known exploited
No
Not in CISA's catalog
Weakness
CWE-674 Uncontrolled Recursion
Fix
5.29.6
Upgrade protobuf to this version or later

Description

A denial-of-service (DoS) vulnerability exists in google.protobuf.json_format.ParseDict() in Python, where the max_recursion_depth limit can be bypassed when parsing nested google.protobuf.Any messages.

Due to missing recursion depth accounting inside the internal Any-handling logic, an attacker can supply deeply nested Any structures that bypass the intended recursion limit, eventually exhausting Python’s recursion stack and causing a RecursionError.

Affected versions

PyPI

PackageVulnerableFixed in
protobuf
>= 6.30.0rc1, <= 6.33.4
No fix yet
protobuf
< 5.29.6
5.29.6
protobuf
>= 6.30.0rc1, < 6.33.5
6.33.5
protobuf
< 5.29.6
5.29.6
protobuf
< 5.29.6
>= 6.30.0rc1, < 6.33.5
5.29.6
6.33.5

How to fix

Move to the fixed version or later with your package manager, update the lockfile, and run your tests. If the package only arrives through another dependency, upgrade that dependency first. If none of its releases pulls a fixed version yet, force the version with your package manager's override.

protobuf PyPI → 5.29.6

pip
pip install --upgrade "protobuf>=5.29.6"
poetry
poetry add "protobuf>=5.29.6"
uv
uv add "protobuf>=5.29.6"

Severity breakdown

CVSS 4.0 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:L

Attack vector
Network
Attack complexity
Low
Attack requirements
Present
Privileges required
None
User interaction
None
Confidentiality (vulnerable system)
None
Integrity (vulnerable system)
None
Availability (vulnerable system)
High
Confidentiality (subsequent systems)
None
Integrity (subsequent systems)
None
Availability (subsequent systems)
Low

CVSS 3.1 7.5

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

Attack vector
Network
Attack complexity
Low
Privileges required
None
User interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
None
Availability
High

Weakness

CWE-674: Uncontrolled Recursion

The product does not properly control the amount of recursion that takes place, consuming excessive resources, such as allocated memory or the program stack.

How to prevent it
  • Implementation: Ensure that an end condition will be reached under all logic conditions. The end condition may include checking against the depth of recursion and exiting with an error if the recursion goes too deep. The complexity of the end condition contributes to the effectiveness of this action.
  • Implementation: Increase the stack size.

References

Timeline

  1. Published
  2. Last updated by the source
  3. Latest EPSS score
AdvisorySeverityWhy it's related
GHSA-8qvm-5x2c-j2w7
protobuf-python has a potential Denial of Service issue
High Also affects protobuf
GHSA-8gq9-2x98-w8hf
protobuf-cpp and protobuf-python have potential Denial of Service issue
High Also affects protobuf
PYSEC-2022-48
Withdrawn Advisory: NULL Pointer Dereference in Protocol Buffers
High Also affects protobuf
GHSA-jwvw-v7c5-m82h
protobuf susceptible to buffer overflow
High Also affects protobuf
GHSA-hqq3-7jhf-c5jx
Forge: Denial of service in TLS record processing via call stack exhaustion
High Same weakness, CWE-674
GHSA-wwpr-jff3-395c
Crass: A large number of adjacent CSS comments can trigger a SystemStackError
Medium Same weakness, CWE-674
GHSA-6jxj-px6v-747w
Crass: Deeply nested CSS blocks and functions can trigger a SystemStackError or excessive memory usage
Medium Same weakness, CWE-674
GHSA-vvm8-gf78-28g4
Go JOSE: Panics in JSON parsing
Medium Same weakness, CWE-674

Credits: hwong557, lucas42, micahcassel, mula2812

Is this in your code?

MergeHarbor checks every repository's dependencies against this database, ranks what matters by exploitability and reachability, routes it to the owning team and opens the fix pull request.

Check your repos with MergeHarbor