Protobuf Maven Plugin protocDigest is ignored when using protoc from PATHGHSA-j2pc-v64r-mv4f
Fix: ascopes/protobuf-maven-plugin@d3330e7GHSA-j2pc-v64r-mv4f is a security vulnerability in io.github.ascopes:protobuf-maven-plugin. A fix is available for io.github.ascopes:protobuf-maven-plugin — see the affected versions and patch details below.
Real-World Exposure
io.github.ascopes:protobuf-maven-plugin☕io.github.ascopes:protobuf-maven-pluginReal-time download stats are indexed for npm and PyPI packages. This vulnerability affects Maven packages — download data is not available via public APIs for these ecosystems.
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:
<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.
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| ☕Maven | io.github.ascopes:protobuf-maven-plugin | ≥ 4.0.0&&< 4.0.2 | 4.0.2io.github.ascopes:protobuf-maven-plugin:4.0.2 |
| ☕Maven | io.github.ascopes:protobuf-maven-plugin | all versions | 3.10.2io.github.ascopes:protobuf-maven-plugin:3.10.2 |
Detection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for io.github.ascopes:protobuf-maven-plugin, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update io.github.ascopes:protobuf-maven-plugin to 4.0.2 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-j2pc-v64r-mv4f is resolved across your whole dependency graph.
Workarounds
If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.
Frequently Asked Questions
Is GHSA-j2pc-v64r-mv4f in your dependencies?
Find it across Maven, including transitive dependencies.