Skip to content

Conversation

renovate-bot
Copy link
Contributor

@renovate-bot renovate-bot commented Oct 1, 2025

This PR contains the following updates:

Package Change Age Confidence
protobuf ==5.28.3 -> ==5.29.5 age confidence
protobuf ==6.30.0 -> ==6.31.1 age confidence
protobuf ==5.27.2 -> ==5.29.5 age confidence

GitHub Vulnerability Alerts

CVE-2025-4565

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
[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)

Configuration

📅 Schedule: Branch creation - "" (UTC), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.

👻 Immortal: This PR will be recreated if closed unmerged. Get config help if that's undesired.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@dpebot
Copy link
Collaborator

dpebot commented Oct 1, 2025

/gcbrun

Copy link
Contributor

Summary of Changes

Hello @renovate-bot, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request updates the protobuf dependency across several project examples to patch a critical security vulnerability, CVE-2025-4565. The vulnerability, which affects the pure-Python implementation of Protobuf, could lead to a Denial of Service by exploiting unbounded recursion when processing maliciously crafted Protocol Buffers data. The update ensures that the project components are protected against this potential attack vector.

Highlights

  • Security Update: This pull request addresses CVE-2025-4565, a Denial of Service vulnerability found in the pure-Python backend of the protobuf library.
  • Dependency Upgrade: The protobuf dependency has been updated across various requirements.txt files to versions 5.29.5 and 6.31.1.
  • Vulnerability Details: The vulnerability could be exploited by parsing untrusted Protocol Buffers data containing an arbitrary number of recursive groups, recursive messages, or SGROUP tags, leading to unbounded recursion and a potential Denial of Service.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request correctly updates the protobuf dependency across multiple requirements.txt files to address the security vulnerability CVE-2025-4565. The version bumps to 5.29.5 and 6.31.1 are appropriate remediations.

However, there are inconsistencies in how the updates have been applied. In some cases, the source files for dependency management (like requirements.in or uv.lock) have not been updated along with the generated requirements.txt files. This could lead to the security patch being accidentally reverted in the future. I've added specific comments on the affected files with suggestions on how to resolve this.

Comment on lines +119 to +130
protobuf==5.29.5 \
--hash=sha256:3f1c6468a2cfd102ff4703976138844f78ebd1fb45f49011afc5139e9e283079 \
--hash=sha256:3f76e3a3675b4a4d867b52e4a5f5b78a2ef9565549d4037e06cf7b0942b1d3fc \
--hash=sha256:470f3af547ef17847a28e1f47200a1cbf0ba3ff57b7de50d22776607cd2ea353 \
--hash=sha256:63848923da3325e1bf7e9003d680ce6e14b07e55d0473253a690c3a8b8fd6e61 \
--hash=sha256:6cf42630262c59b2d8de33954443d94b746c952b01434fc58a417fdbd2e84bd5 \
--hash=sha256:6f642dc9a61782fa72b90878af134c5afe1917c89a568cd3476d758d3c3a0736 \
--hash=sha256:7318608d56b6402d2ea7704ff1e1e4597bee46d760e7e4dd42a3d45e24b87f2e \
--hash=sha256:bc1463bafd4b0929216c35f437a8e28731a2b7fe3d98bb77a600efced5a15c84 \
--hash=sha256:e38c5add5a311f2a6eb0340716ef9b039c1dfa428b28f25a7838ac329204a671 \
--hash=sha256:ef91363ad4faba7b25d844ef1ada59ff1604184c0bcd8b39b8a6bef15e1af238 \
--hash=sha256:fa18533a299d7ab6c55a238bf8629311439995f2e7eca5caaff08663606e9015
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

critical

While updating protobuf to 5.29.5 is correct for patching the security vulnerability, the source file examples/high-throughput-compute-standalone/american-option/requirements.in still specifies protobuf==5.27.2. Since this requirements.txt file is auto-generated from requirements.in (as noted in the file header), this change will be overwritten the next time dependencies are compiled. To fix this permanently, requirements.in should be updated to protobuf==5.29.5 and this requirements.txt file should be regenerated.

pillow==10.4.0
proto-plus==1.25.0
protobuf==5.28.3
protobuf==5.29.5
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

critical

While updating protobuf to 5.29.5 here is correct for patching the security vulnerability, the lock file examples/high-throughput-compute-standalone/ui/uv.lock still specifies protobuf==5.28.3. If requirements.txt is generated from uv.lock, this change may be overwritten. To ensure consistency and make the fix permanent, please update the uv.lock file (e.g., by running uv pip compile pyproject.toml --upgrade-package protobuf) and then regenerate this requirements.txt file from the updated lock file.

@renovate-bot renovate-bot force-pushed the renovate/pypi-protobuf-vulnerability branch from ea9c6f4 to c71af90 Compare October 8, 2025 00:54
@dpebot
Copy link
Collaborator

dpebot commented Oct 8, 2025

/gcbrun

@renovate-bot renovate-bot force-pushed the renovate/pypi-protobuf-vulnerability branch from c71af90 to 8b490db Compare October 10, 2025 02:08
@dpebot
Copy link
Collaborator

dpebot commented Oct 10, 2025

/gcbrun

@renovate-bot renovate-bot force-pushed the renovate/pypi-protobuf-vulnerability branch from 8b490db to 01854ec Compare October 10, 2025 18:09
@dpebot
Copy link
Collaborator

dpebot commented Oct 10, 2025

/gcbrun

@renovate-bot renovate-bot force-pushed the renovate/pypi-protobuf-vulnerability branch from 01854ec to 4549602 Compare October 15, 2025 01:12
@dpebot
Copy link
Collaborator

dpebot commented Oct 15, 2025

/gcbrun

@renovate-bot renovate-bot force-pushed the renovate/pypi-protobuf-vulnerability branch from 4549602 to 953b365 Compare October 15, 2025 17:12
@dpebot
Copy link
Collaborator

dpebot commented Oct 15, 2025

/gcbrun

@renovate-bot renovate-bot force-pushed the renovate/pypi-protobuf-vulnerability branch from 953b365 to 1d840ea Compare October 16, 2025 23:29
@dpebot
Copy link
Collaborator

dpebot commented Oct 16, 2025

/gcbrun

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants