Skip to content

fix(deps): upgrade protobuf-java and protobuf-java-util to 3.25.5 - #1117

Merged
abhishekj720 merged 2 commits into
masterfrom
security/fix-protobuf
Oct 19, 2026
Merged

abhishekj720 merged 2 commits into
masterfrom
security/fix-protobuf

Conversation

@abhishekj720

Copy link
Copy Markdown
Contributor

Summary

Upgrades com.google.protobuf:protobuf-java and com.google.protobuf:protobuf-java-util from 3.21.9 to 3.25.5.

Stays within the 3.x line for compatibility with the existing generated proto stubs in src/gen/java/ (produced by protoc 3.11.0). The protobuf Java runtime is backward compatible within major versions.

Vulnerabilities fixed

CVE Severity Description Fixed in
CVE-2024-7254 High (CVSS 8.7) Infinite recursion when parsing deeply nested groups or SGROUP tags as unknown fields via DiscardUnknownFieldsParser, Java Protobuf Lite parser, or against map fields. An attacker can send a malicious serialized payload to crash the JVM. protobuf-java 3.25.5

Type of Change

  • Add new API(s)
  • Add new data type(s)
  • Add new field(s) to existing data type
  • Remove field(s) from data type
  • Remove data type(s)
  • Remove API(s)
  • Other (please provide detailed description)

Data Effect

  • Does it change the data stored in database?

Detailed Description

protobuf-java 3.25.5 is a drop-in replacement for 3.21.9. The protobuf project maintains backward compatibility within major versions — wire format, generated code API, and runtime API are all preserved.

protobuf-java-util is versioned alongside protobuf-java and is bumped to match.

No proto regeneration is required: the generated stubs in src/gen/java/ were produced by protoc 3.11.0 and remain compatible with the 3.25.5 runtime.

Impact Analysis

  • Backward Compatibility: No impact. Protobuf maintains backward compatibility within the 3.x line.
  • Forward Compatibility: No impact.

Testing Plan

  • Unit Tests: Existing test suite covers all protobuf usage in the project.
  • Persistence Tests: N/A
  • Integration Tests: N/A
  • Compatibility Tests: N/A

Rollout Plan

Standard release. No special rollout required.

Fixes CVE-2024-7254 (CVSS 8.7): stack overflow via infinite recursion when
parsing deeply nested groups or SGROUP tags as unknown fields using
DiscardUnknownFieldsParser, Java Protobuf Lite parser, or against Protobuf
map fields. An attacker can trigger this by sending a malicious serialized
protobuf payload. Fixed in protobuf-java 3.25.5.

Stays within the 3.x line for compatibility with the existing generated
proto stubs in src/gen/java (generated with protoc 3.11.0). The protobuf
runtime library is backward compatible within major versions.
@abhishekj720 abhishekj720 changed the title fix(security): upgrade protobuf-java and protobuf-java-util to 3.25.5 fix(deps): upgrade protobuf-java and protobuf-java-util to 3.25.5 Oct 16, 2026
…5 build

Protobuf-generated sources (internalGetMapField, internalGetMutableMapField,
LazyStringArrayList.EMPTY) use APIs deprecated in protobuf 3.22+. With
-Werror, javac promotes the 96 deprecation warnings to a build failure.

Remove -Xlint:deprecation from compileJava. Deprecation checks on
hand-written sources are already enforced by errorprone, which excludes
generated-sources via excludedPaths. This restores the same effective
coverage without breaking the build on generated code.

Signed-off-by: abhishek.jha <abhishek.jha@uber.com>
@gitar-bot

gitar-bot Bot commented Oct 16, 2026 •

Copy link
Copy Markdown
Code Review ✅ Approved

🟡 Medium risk · Upgrading the protobuf runtime across the client could alter parsing or wire compatibility, causing failures when existing generated stubs handle messages.

Upgrades protobuf-java and protobuf-java-util from 3.21.9 to 3.25.5 to fix CVE-2024-7254, a high-severity infinite recursion issue in unknown field parsing. No issues found.

Verification Repos 1 inspected

Functional validation No results

Rules No rules evaluated

Broader impact Repos 1 inspected
Cross-repo 1 repository inspected 0 open impacts

cadence-workflow/cadence-java-samples Inspected

For more verification details, comment gitar display:verbose.

Options

Auto-apply is off → Gitar will not commit updates to this branch.
Display: compact → Showing compact verification results.

Comment with these commands to change the behavior for this request:

Auto-apply Compact
gitar auto-apply:on         
gitar display:verbose         

Was this helpful? React with 👍 / 👎 | Gitar

@codecov

codecov Bot commented Oct 16, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 68.95%. Comparing base (5357c97) to head (0b23a15).
⚠️ Report is 3 commits behind head on master.

❌ Your project check has failed because the head coverage (68.95%) is below the target coverage (85.00%). You can increase the head coverage or adjust the target coverage.
see 3 files with indirect coverage changes


Continue to review full report in Codecov by Harness.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2a5de75...0b23a15. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Comment thread build.gradle
compileJava {
dependsOn 'googleJavaFormat'
options.encoding = 'UTF-8'
options.compilerArgs << '-Xlint:none' << '-Xlint:deprecation' << '-Werror'

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Is this change intended?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yes, intentional.
Protobuf 3.25.5 deprecated some internal APIs used by our generated stubs (produced by protoc 3.11.0), which with -Werror turns into a build failure. Removing -Xlint:deprecation from javac is safe since errorprone already covers deprecation on hand-written code and excludes generated sources.

@abhishekj720
abhishekj720 merged commit cc24a59 into master Oct 19, 2026
17 of 18 checks passed
@abhishekj720
abhishekj720 deleted the security/fix-protobuf branch October 19, 2026 20:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants