ghsa-j2pc-v64r-mv4f
Vulnerability from github
Published
2025-11-04 15:48
Modified
2025-11-04 15:48
Summary
Protobuf Maven Plugin protocDigest is ignored when using protoc from PATH
Details

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.

Show details on source website


{
  "affected": [
    {
      "database_specific": {
        "last_known_affected_version_range": "\u003c= 4.0.1"
      },
      "package": {
        "ecosystem": "Maven",
        "name": "io.github.ascopes:protobuf-maven-plugin"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "4.0.0"
            },
            {
              "fixed": "4.0.2"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    },
    {
      "package": {
        "ecosystem": "Maven",
        "name": "io.github.ascopes:protobuf-maven-plugin"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "3.10.2"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    }
  ],
  "aliases": [],
  "database_specific": {
    "cwe_ids": [
      "CWE-354",
      "CWE-693"
    ],
    "github_reviewed": true,
    "github_reviewed_at": "2025-11-04T15:48:09Z",
    "nvd_published_at": null,
    "severity": "LOW"
  },
  "details": "### Summary\nThe expected `protocDigest` is ignored when protoc is taken from the `PATH`.\n\n### Details\nThe documentation for the `protocDigest` parameter says:\n\u003e ... Users may wish to specify this if using a `PATH`-based binary ...\n\nHowever, when specifying `\u003cprotoc\u003ePATH\u003c/protoc\u003e` the `protocDigest` is not actually checked because the code returns here already\nhttps://github.com/ascopes/protobuf-maven-plugin/blob/59097aae8062c461129a13dcda2f4116b90a8765/protobuf-maven-plugin/src/main/java/io/github/ascopes/protobufmavenplugin/protoc/ProtocResolver.java#L91-L93\n\nbefore the digest check:\nhttps://github.com/ascopes/protobuf-maven-plugin/blob/59097aae8062c461129a13dcda2f4116b90a8765/protobuf-maven-plugin/src/main/java/io/github/ascopes/protobufmavenplugin/protoc/ProtocResolver.java#L106\n\n### PoC\nSpecify:\n```xml\n\u003cprotoc\u003ePATH\u003c/protoc\u003e\n\u003cprotocDigest\u003esha256:0000000000000000000000000000000000000000000000000000000000000000\u003c/protocDigest\u003e\n```\n\nAnd notice how the `protoc` on the `PATH` is not rejected, despite a digest mismatch.\n\n### Impact\nUsers who have an untrusted `protoc` executable on their `PATH` and rely `\u003cprotocDigest\u003e` as protection are affected.",
  "id": "GHSA-j2pc-v64r-mv4f",
  "modified": "2025-11-04T15:48:09Z",
  "published": "2025-11-04T15:48:09Z",
  "references": [
    {
      "type": "WEB",
      "url": "https://github.com/ascopes/protobuf-maven-plugin/security/advisories/GHSA-j2pc-v64r-mv4f"
    },
    {
      "type": "WEB",
      "url": "https://github.com/ascopes/protobuf-maven-plugin/commit/d3330e7038a296fe595c5470a22019eb70e35b07"
    },
    {
      "type": "PACKAGE",
      "url": "https://github.com/ascopes/protobuf-maven-plugin"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:4.0/AV:L/AC:H/AT:P/PR:L/UI:A/VC:N/VI:L/VA:N/SC:N/SI:L/SA:N",
      "type": "CVSS_V4"
    }
  ],
  "summary": "Protobuf Maven Plugin protocDigest is ignored when using protoc from PATH"
}


Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Sightings

Author Source Type Date

Nomenclature

  • Seen: The vulnerability was mentioned, discussed, or seen somewhere by the user.
  • Confirmed: The vulnerability is confirmed from an analyst perspective.
  • Published Proof of Concept: A public proof of concept is available for this vulnerability.
  • Exploited: This vulnerability was exploited and seen by the user reporting the sighting.
  • Patched: This vulnerability was successfully patched by the user reporting the sighting.
  • Not exploited: This vulnerability was not exploited or seen by the user reporting the sighting.
  • Not confirmed: The user expresses doubt about the veracity of the vulnerability.
  • Not patched: This vulnerability was not successfully patched by the user reporting the sighting.


Loading…

Loading…