CVE-2025-4565

CVE-2025-4565 is a high-severity security vulnerability in protobuf (pip), affecting versions < 4.25.8. It is fixed in 4.25.8, 5.29.5, 6.31.1.

Does this CVE actually affect you?

Kodem shows which CVEs are reachable and running in your applications, so you fix what's exploitable, not just what's listed.

Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.

Runtime intelligence, not another scanner.

Summary

protobuf-python has a potential Denial of Service issue

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
[email protected]

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)

Impact

Affected versions

protobuf (< 4.25.8) protobuf (>= 5.26.0rc1, < 5.29.5) protobuf (>= 6.30.0rc1, < 6.31.1)

Security releases

protobuf → 4.25.8 (pip) protobuf → 5.29.5 (pip) protobuf → 6.31.1 (pip)

Kodem intelligence

Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.

Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter. Kodem's runtime-powered SCA identifies whether this CVE is reachable in your applications.

Already deployed Kodem?

See it in your environmentNew to Kodem? Get a demo →

Remediation advice

Upgrade the following packages to resolve this vulnerability:

protobuf to 4.25.8 or later; protobuf to 5.29.5 or later; protobuf to 6.31.1 or later

Kodem Kai can prioritize this vulnerability in your dependency tree and generate a fix recommendation.

Frequently Asked Questions

  1. What is CVE-2025-4565? CVE-2025-4565 is a high-severity security vulnerability in protobuf (pip), affecting versions < 4.25.8. It is fixed in 4.25.8, 5.29.5, 6.31.1.
  2. Which versions of protobuf are affected by CVE-2025-4565? protobuf (pip) versions < 4.25.8 is affected.
  3. Is there a fix for CVE-2025-4565? Yes. CVE-2025-4565 is fixed in 4.25.8, 5.29.5, 6.31.1. Upgrade to this version or later.
  4. Is CVE-2025-4565 exploitable, and should I be worried? Whether CVE-2025-4565 is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
  5. What actually determines whether CVE-2025-4565 is exploitable, and how bad it is? Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.
  6. How do I fix CVE-2025-4565?
    • Upgrade protobuf to 4.25.8 or later
    • Upgrade protobuf to 5.29.5 or later
    • Upgrade protobuf to 6.31.1 or later

Other vulnerabilities in protobuf

Stop the waste.
Protect your environment with Kodem.