Protobuf Maven Plugin protocDigest is ignored when using protoc from PATH
Low severity
GitHub Reviewed
Published
Nov 3, 2025
in
ascopes/protobuf-maven-plugin
•
Updated Nov 4, 2025
Package
Affected versions
>= 4.0.0, <= 4.0.1
< 3.10.2
Patched versions
4.0.2
3.10.2
Description
Published to the GitHub Advisory Database
Nov 4, 2025
Reviewed
Nov 4, 2025
Last updated
Nov 4, 2025
Summary
The expected
protocDigestis ignored when protoc is taken from thePATH.Details
The documentation for the
protocDigestparameter says:However, when specifying
<protoc>PATH</protoc>theprotocDigestis not actually checked because the code returns here alreadyhttps://github.com/ascopes/protobuf-maven-plugin/blob/59097aae8062c461129a13dcda2f4116b90a8765/protobuf-maven-plugin/src/main/java/io/github/ascopes/protobufmavenplugin/protoc/ProtocResolver.java#L91-L93
before the digest check:
https://github.com/ascopes/protobuf-maven-plugin/blob/59097aae8062c461129a13dcda2f4116b90a8765/protobuf-maven-plugin/src/main/java/io/github/ascopes/protobufmavenplugin/protoc/ProtocResolver.java#L106
PoC
Specify:
And notice how the
protocon thePATHis not rejected, despite a digest mismatch.Impact
Users who have an untrusted
protocexecutable on theirPATHand rely<protocDigest>as protection are affected.References