-
Notifications
You must be signed in to change notification settings - Fork 16k
Fix Any recursion depth bypass in Python json_format.ParseDict #25239
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix Any recursion depth bypass in Python json_format.ParseDict #25239
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider:
-
Add a comment clarifying how you count depth and whether max_recursion_depth is inclusive/exclusive.
-
Adding a test that explicitly asserts that depth==max_recursion_depth-1 succeeds and depth==max_recursion_depth fails, so the boundary behavior is documented.
f5f10f2 to
3cbbcbe
Compare
|
I understand this this is failing CI/CD and all... but we are stuck with our packages failing on vulnerabilities with this fix. What is the ETA for getting this merged? |
ankitsinha-cmyk
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@aviralgarg05 thanks for incorporating the changes. Looks fine to me now.
A new vulnerability (CVE-2026-0994) was reported and is not yet fixed. It affects protobuf libraries used by the livekit-api Python package. A fix is in progress upstream, but the related PR has not yet been merged or released. Since a release is required tonight, the Trivy scan step is temporarily disabled to allow the build to proceed. This should be re-enabled once a patched version is available. protocolbuffers/protobuf#25239
A new vulnerability (CVE-2026-0994) was reported and is not yet fixed. It affects protobuf libraries used by the livekit-api Python package. A fix is in progress upstream, but the related PR has not yet been merged or released. Since a release is required tonight, the Trivy scan step is temporarily disabled to allow the build to proceed. This should be re-enabled once a patched version is available. protocolbuffers/protobuf#25239
A new vulnerability (CVE-2026-0994) was reported and is not yet fixed. It affects protobuf libraries used by the livekit-api Python package. A fix is in progress upstream, but the related PR has not yet been merged or released. Since a release is required tonight, the Trivy scan step is temporarily disabled to allow the build to proceed. This should be re-enabled once a patched version is available. protocolbuffers/protobuf#25239
A new vulnerability (CVE-2026-0994) was reported and is not yet fixed. It affects protobuf libraries used by the livekit-api Python package. A fix is in progress upstream, but the related PR has not yet been merged or released. Since a release is required tonight, the Trivy scan step is temporarily disabled to allow the build to proceed. This should be re-enabled once a patched version is available. protocolbuffers/protobuf#25239
This will enable running the CI and its checks. There is a fix upstream waiting to be merged and released: protocolbuffers/protobuf#25239
This will enable running the CI and its checks. There is a fix upstream waiting to be merged and released: protocolbuffers/protobuf#25239
This will enable running the CI and its checks. There is a fix upstream waiting to be merged and released: protocolbuffers/protobuf#25239
This fixes a security vulnerability where nested google.protobuf.Any messages could bypass the max_recursion_depth limit, potentially leading to denial of service via stack overflow. The root cause was that _ConvertAnyMessage() was calling itself recursively via methodcaller() for nested well-known types, bypassing the recursion depth tracking in ConvertMessage(). The fix routes well-known type parsing through ConvertMessage() to ensure proper recursion depth accounting for all message types including nested Any. Fixes protocolbuffers#25070
3cbbcbe to
b210265
Compare
In the case of quotes and backslashes (which are the most common things that need escaping) we can avoid going into Utf8 bytes for most cases this way, while also only doing 1 pass over the string when it doesn't need escaping at all. COPYBARA_INTEGRATE_REVIEW=#25239 from aviralgarg05:fix-any-recursion-depth-bypass 3cbbcbe FUTURE_COPYBARA_INTEGRATE_REVIEW=#25239 from aviralgarg05:fix-any-recursion-depth-bypass 3cbbcbe PiperOrigin-RevId: 862311595
This fixes a security vulnerability where nested google.protobuf.Any messages could bypass the max_recursion_depth limit, potentially leading to denial of service via stack overflow. The root cause was that _ConvertAnyMessage() was calling itself recursively via methodcaller() for nested well-known types, bypassing the recursion depth tracking in ConvertMessage(). The fix routes well-known type parsing through ConvertMessage() to ensure proper recursion depth accounting for all message types including nested Any. Fixes #25070 Closes #25239 COPYBARA_INTEGRATE_REVIEW=#25239 from aviralgarg05:fix-any-recursion-depth-bypass 3cbbcbe PiperOrigin-RevId: 862740421
This fixes a security vulnerability where nested google.protobuf.Any messages could bypass the max_recursion_depth limit, potentially leading to denial of service via stack overflow. The root cause was that _ConvertAnyMessage() was calling itself recursively via methodcaller() for nested well-known types, bypassing the recursion depth tracking in ConvertMessage(). The fix routes well-known type parsing through ConvertMessage() to ensure proper recursion depth accounting for all message types including nested Any. Fixes #25070 Closes #25239 COPYBARA_INTEGRATE_REVIEW=#25239 from aviralgarg05:fix-any-recursion-depth-bypass 3cbbcbe PiperOrigin-RevId: 862740421
… (#25586) This fixes a security vulnerability where nested google.protobuf.Any messages could bypass the max_recursion_depth limit, potentially leading to denial of service via stack overflow. The root cause was that _ConvertAnyMessage() was calling itself recursively via methodcaller() for nested well-known types, bypassing the recursion depth tracking in ConvertMessage(). The fix routes well-known type parsing through ConvertMessage() to ensure proper recursion depth accounting for all message types including nested Any. Fixes #25070 Closes #25239 COPYBARA_INTEGRATE_REVIEW=#25239 from aviralgarg05:fix-any-recursion-depth-bypass 3cbbcbe PiperOrigin-RevId: 862740421 Co-authored-by: Aviral Garg <[email protected]>
… (#25587) This fixes a security vulnerability where nested google.protobuf.Any messages could bypass the max_recursion_depth limit, potentially leading to denial of service via stack overflow. The root cause was that _ConvertAnyMessage() was calling itself recursively via methodcaller() for nested well-known types, bypassing the recursion depth tracking in ConvertMessage(). The fix routes well-known type parsing through ConvertMessage() to ensure proper recursion depth accounting for all message types including nested Any. Fixes #25070 Closes #25239 COPYBARA_INTEGRATE_REVIEW=#25239 from aviralgarg05:fix-any-recursion-depth-bypass 3cbbcbe PiperOrigin-RevId: 862740421 Co-authored-by: Aviral Garg <[email protected]>
|
Thanks @paulhodson , that is a useful tip for future |
This fixes a security vulnerability where nested google.protobuf.Any messages could bypass the max_recursion_depth limit, potentially leading to denial of service via stack overflow.
The root cause was that _ConvertAnyMessage() was calling itself recursively via methodcaller() for nested well-known types, bypassing the recursion depth tracking in ConvertMessage().
The fix routes well-known type parsing through ConvertMessage() to ensure proper recursion depth accounting for all message types including nested Any.
Fixes #25070