Skip to content

fix: Generate Java protos with protoc matching protobuf runtime - #390

Merged
piket merged 2 commits into
masterfrom
fix/java-protoc-version
Nov 12, 2026
Merged

piket merged 2 commits into
masterfrom
fix/java-protoc-version

Conversation

@piket

@piket piket commented Nov 10, 2026

Copy link
Copy Markdown
Collaborator

What

Change protoc.version in java/pom.xml from 3.12.2 to ${protobuf.version} (3.25.5).

Why

Services that use the Feast Java artifacts log Vulnerable protobuf generated type in use for ValueProto (and other generated types).

protoc older than 21.7 puts makeExtensionsImmutable() calls in generated code. The protobuf-java 3.25.5 runtime detects those calls and logs this warning, because the old generated code is open to a denial-of-service issue. The generator (protoc 3.12.2) and the runtime (3.25.5) were set to different versions. Tying the generator to the runtime version fixes this now and keeps the two from drifting apart again.

Testing

  • mvn clean test-compile passes for all modules (datatypes, serving, serving-client).
  • Before the change, 34 generated files contained makeExtensionsImmutable; after regenerating, none do.
  • Generated ValueProto.java now says it was generated by Protobuf Java Version: 3.25.5.
  • mvn verify has not been run.

Related

eg-feast's package_protos/pom.xml (the eg-feast-protos artifact) has the same pin, fixed in eg-ai-platform/eg-feast#110. Services that use these jars need to move to the newly published version for the warning to stop.

piket and others added 2 commits November 10, 2026 08:20
protoc.version was pinned to 3.12.2 while protobuf-java runtime is 3.25.5.
protoc < 21.7 emits makeExtensionsImmutable() in generated code, which the
3.25.5 runtime flags with "Vulnerable protobuf generated type in use" (and
is vulnerable to a DoS). Tie protoc.version to protobuf.version.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Comment thread java/pom.xml
<protoc.version>3.12.2</protoc.version>
<protobuf.version>3.25.5</protobuf.version>
<protoc.version>${protobuf.version}</protoc.version>
<protobuf.version>3.25.8</protobuf.version>

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

The PR description still says 3.25.5 throughout, but this bumps the runtime (and now protoc) to 3.25.8. Could you update the description to match?

@piket
piket merged commit a3031e3 into master Nov 12, 2026
26 of 29 checks passed
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.

3 participants