# GHSA-J2PC-V64R-MV4F: Protobuf Maven Plugin protocDigest is ignored when using protoc from PATH

- Database: GitHub
- Severity: low (stated by ghsa, no CVSS score)
- Published: 2025-11-04
- Modified: 2025-11-15

## Affected versions

- io.github.ascopes:protobuf-maven-plugin (Maven): from 4.0.0, fixed in 4.0.2
- io.github.ascopes:protobuf-maven-plugin (Maven): fixed in 3.10.2

## Description

### Summary
The expected `protocDigest` is ignored when protoc is taken from the `PATH`.

### Details
The documentation for the `protocDigest` parameter says:
> ... Users may wish to specify this if using a `PATH`-based binary ...

However, when specifying `<protoc>PATH</protoc>` the `protocDigest` is not actually checked because the code returns here already
https://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:
```xml
<protoc>PATH</protoc>
<protocDigest>sha256:0000000000000000000000000000000000000000000000000000000000000000</protocDigest>
```

And notice how the `protoc` on the `PATH` is not rejected, despite a digest mismatch.

### Impact
Users who have an untrusted `protoc` executable on their `PATH` and rely `<protocDigest>` as protection are affected.

## References

- https://github.com/ascopes/protobuf-maven-plugin/security/advisories/GHSA-j2pc-v64r-mv4f
- https://github.com/ascopes/protobuf-maven-plugin/commit/d3330e7038a296fe595c5470a22019eb70e35b07
- https://github.com/ascopes/protobuf-maven-plugin

Page: https://cve.now/GHSA-J2PC-V64R-MV4F

Wrong or missing data? Send feedback: POST https://cve.now/api/v1/feedback (see https://cve.now/agents#feedback).
