Skip to content

fabric-chaincode-shim vulnerabilities #311

@benjsmi

Description

@benjsmi
Name Found in Code CVEs Due Date Status
bcprov-jdk15on-1.62.jar https://github.com/hyperledger/fabric-chaincode-java/blob/main/fabric-chaincode-shim/build.gradle#L46 https://nvd.nist.gov/vuln/detail/CVE-2019-17359, https://nvd.nist.gov/vuln/detail/CVE-2020-26939, https://nvd.nist.gov/vuln/detail/CVE-2023-33201, https://nvd.nist.gov/vuln/detail/CVE-2020-15522 Aug 21, 2023 Addressed by #310
json-20220320.jar Transitive dependency from fabric-chaincode-shim, which is imported here: https://github.com/hyperledger/fabric-chaincode-java/blob/main/fabric-chaincode-integration-test/build.gradle#L4, and then json-20220320.jar is imported here: https://github.com/hyperledger/fabric-chaincode-java/blob/main/fabric-chaincode-shim/build.gradle#L49 https://nvd.nist.gov/vuln/detail/CVE-2022-45688 Aug 21, 2023 Addressed by #310
guava-26.0-android.jar, guava-31.0.1-jre.jar Transitive dependency, in fabric-chaincode-integration-test (https://github.com/hyperledger/fabric-chaincode-java/blob/main/fabric-chaincode-integration-test/build.gradle#L4) this time the dependency is on fabric-chaincode-shim: https://github.com/hyperledger/fabric-chaincode-java/blob/main/fabric-chaincode-shim/build.gradle#L44C5-L44C5. Shim is dependent on org.hyperledger.fabric.fabric-protos v0.2.0, which is dependent on a vulnerable version of Guava: https://central.sonatype.com/artifact/org.hyperledger.fabric/fabric-protos/0.2.0/overview. https://nvd.nist.gov/vuln/detail/CVE-2023-2976, https://nvd.nist.gov/vuln/detail/CVE-2020-8908 Oct 10, 2023 Fixed in user-facing code in #314; examples still point to old shim
json-20180813.jar Direct dependency here: https://github.com/hyperledger/fabric-chaincode-java/blob/main/fabric-chaincode-integration-test/build.gradle#L4 https://nvd.nist.gov/vuln/detail/CVE-2022-45688 Aug 21, 2023 Fixed in https://github.com/hyperledger/fabric-chaincode-java/pull/314/files
protobuf-java-3.20.1.jar Direct dependency here:
implementation group: 'com.google.protobuf', name: 'protobuf-java-util', version: '3.20.1'
, but ALSO,
implementation "io.opentelemetry:opentelemetry-proto:1.6.0-alpha"
includes io.opentelemetry:opentelemetry-protoat 1.6.0-alpha, which includes protobuf-java at 3.20.1 as shown here: https://mvnrepository.com/artifact/io.opentelemetry/opentelemetry-proto/1.6.0-alpha. and ALSO, shim includes grpc-protobuf at v1.46, as seen here
implementation 'io.grpc:grpc-protobuf:1.46.0'
which includes protobuf-java at v3.20.1 as shown here: https://mvnrepository.com/artifact/io.grpc/grpc-protobuf/1.46.0, and also includes fabric-protos at v0.2.0 as shown here:
implementation group: 'org.hyperledger.fabric', name:'fabric-protos', version:'0.2.0'
and fabric-protos at v0.2.0 includes protobuf-java at v3.20.1 as shown here: https://mvnrepository.com/artifact/org.hyperledger.fabric/fabric-protos/0.2.0 ... AND ALSO I also see a link from fabric-chaincode-java in several examples that go to fabric-protos v0.1.3, which includes protobuf-java at v3.19.4 -- example
<artifactId>fabric-protos</artifactId>
and second example and also
https://nvd.nist.gov/vuln/detail/CVE-2022-3509, https://nvd.nist.gov/vuln/detail/CVE-2022-3510, https://nvd.nist.gov/vuln/detail/CVE-2022-3171 Oct 20, 2023 #310 definitely helps. Moved the direct dependency to v3.19.6, which is not vulnerable. It also moved io.grpc.grpc-protobuf to v1.45.4, which uses protobuf-java v3.19.6. However, this change does not address the dependency on io.opentelemetry:opentelemetry-protoat 1.6.0-alpha, or the dependency on fabric-protos at v0.2.0.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions