# GHSA-j2pc-v64r-mv4f: Protobuf Maven Plugin protocDigest is ignored when using protoc from PATH

> The Protobuf Maven Plugin ignores protocDigest when using protoc from PATH, allowing execution of untrusted binaries despite integrity checks.

- **Severity:** Not scored
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Local or same network only
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 4 Nov 2025

## What is GHSA-j2pc-v64r-mv4f?

GHSA-j2pc-v64r-mv4f is a vulnerability in io.github.ascopes:protobuf-maven-plugin, published on 4 Nov 2025. It can only be exploited from the same machine or local network, with no action from the victim.

### Official 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.

## Which versions are affected by GHSA-j2pc-v64r-mv4f?

4 open source packages ship an affected version, including io.github.ascopes:protobuf-maven-plugin.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `io.github.ascopes:protobuf-maven-plugin` | Maven | All versions | 3.10.2 |
| `io.github.ascopes:protobuf-maven-plugin` | Maven | All versions | 3.10.2 |
| `io.github.ascopes:protobuf-maven-plugin` | Maven | From 4.0.0 | 4.0.2 |
| `io.github.ascopes:protobuf-maven-plugin` | Maven | From 4.0.0 | 4.0.2 |

## How do I fix GHSA-j2pc-v64r-mv4f?

Upgrade io.github.ascopes:protobuf-maven-plugin to a fixed version for your release line: 3.10.2 or 4.0.2.

## Is GHSA-j2pc-v64r-mv4f being exploited?

There is no known exploitation of GHSA-j2pc-v64r-mv4f in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for GHSA-j2pc-v64r-mv4f and fix it if it is affected.

What it is: GHSA-j2pc-v64r-mv4f is a vulnerability in io.github.ascopes:protobuf-maven-plugin, published on 4 Nov 2025. It can only be exploited from the same machine or local network, with no action from the victim.
Exploitation: There is no known exploitation of GHSA-j2pc-v64r-mv4f in the wild and no public exploit code.

Affected packages and fixed versions:
- io.github.ascopes:protobuf-maven-plugin (Maven): affected all versions; fixed in 3.10.2
- io.github.ascopes:protobuf-maven-plugin (Maven): affected all versions; fixed in 3.10.2
- io.github.ascopes:protobuf-maven-plugin (Maven): affected from 4.0.0; fixed in 4.0.2
- io.github.ascopes:protobuf-maven-plugin (Maven): affected from 4.0.0; fixed in 4.0.2

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/GHSA-j2pc-v64r-mv4f/ (Markdown: https://insights.sbomify.com/GHSA-j2pc-v64r-mv4f/index.md)
```

## Sources

- OSV: https://osv.dev/vulnerability/GHSA-j2pc-v64r-mv4f

---
From sbomify Insights: https://insights.sbomify.com/GHSA-j2pc-v64r-mv4f/
Summaries are generated and may contain mistakes; the official description above is the record.
