Niska

sigstore-java has a vulnerability with bundle verification

  • Ujawniono: 05.12.2024
  • Aktualizacja: 11.10.2026 12:21

Summary

sigstore-java has insufficient verification for a situation where a bundle provides a invalid signature for a checkpoint.

Impact

This bug impacts clients using any variation of KeylessVerifier.verify()

Currently checkpoints are only used to ensure the root hash of an inclusion proof was provided by the log in question. Failing to validate that means a bundle may provide an inclusion proof that doesn't actually correspond to the log in question. This may eventually lead a monitor/witness being unable to detect when a compromised logs are providing different views of themselves to different clients.

There are other mechanisms right now that mitigate this, such as the signed entry timestamp. Sigstore-java currently requires a valid signed entry timestamp. By correctly verifying the signed entry timestamp we can make certain assertions about the log signing the log entry (like the log was aware of the artifact signing event and signed it). Therefore the impact on clients that are not monitors/witnesses is very low.

All cryptographic materials and identity information in the bundle must still be verified for the verification to pass. A valid signed entry timestamp is still required for verification 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.1.0

bash
git clone --branch v1.1.0 git@github.com:sigstore/sigstore-java
cd sigstore-java
./gradlew :sigstore-cli:build
tar -xf sigstore-cli/build/distributions/sigstore-cli-1.1.0-SNAPSHOT.tar --strip-components 1

Create some random blob and sign it

bash
dd bs=1 count=50 </dev/urandom > blob
./bin/sigstore-cli sign --bundle=blob.sigstore.json blob

Modify the checkpoint signature on the bundle, this is the last base64 section in the checkpoint, the following diff just swaps changes the last 3 base64 characters to aaa.

diff
"checkpoint": {
+    "envelope": "rekor.sigstore.dev - 1193050959916656506\n29874050\nhnEOPEa6SDzqJDydU+J96TQyfYfqEpsGg0aVbmfjWDw\u003d\n\n— rekor.sigstore.dev wNI9ajBFAiEA4M7t/9b42FzeArRhC6oRvs7UvKwklaFLYfDDGTi2R4kCIBNc2d0VCyUbs3hd+bI7+0RHhvLOdAqYg7j/3xPe2ZPb\n"
-    "envelope": "rekor.sigstore.dev - 1193050959916656506\n29874050\nhnEOPEa6SDzqJDydU+J96TQyfYfqEpsGg0aVbmfjWDw\u003d\n\n— rekor.sigstore.dev wNI9ajBFAiEA4M7t/9b42FzeArRhC6oRvs7UvKwklaFLYfDDGTi2R4kCIBNc2d0VCyUbs3hd+bI7+0RHhvLOdAqYg7j/3xPe2aaa\n"
}
bash
./bin/sigstore-cli verify --bundle=blob.sigstore.json blob
# no errors???!

Patches

Patched in v1.2.0 release (patch: https://github.com/sigstore/sigstore-java/commit/23fb4885e6704a5df4977f7acf253a745349edf9) Conformance tests added https://github.com/sigstore/sigstore-conformance/pull/139

Workarounds

Verifiers may chose to verify the checkpoint manually after running KeylessVerifier.verify()

java
var bundle = Bundle.from(bundleFile, StandardCharsets.UTF_8);
var entry = bundle.getEntries().get(0);
var checkpoint = entry.getVerification().getInclusionProof().parsedCheckpoint();
var signedData = Splitter.on("\n\n").splitToList(entry.getVerification().getInclusionProof().getCheckpoint()).get(0) + "\n";

var tufClient = SigstoreTufClient.builder().usePublicGoodInstance().build();
tufClient.update();
var trustedRoot = tufClient.getSigstoreTrustedRoot();
var tlog =  TransparencyLog.find(trustedRoot.getTLogs(), Hex.decode(entry.getLogID()), entry.getIntegratedTimeInstant());

if (!Verifiers.newVerifier(tlog.get().getPublicKey().toJavaPublicKey()).verify(signedData.getBytes(StandardCharsets.UTF_8), checkpoint.getSignatures().get(0).getSignature())) {
  throw new Exception("Checkpoint signature was invalid");
}

Czego dotyczy

Kliknij technologię, aby zobaczyć wszystkie dotyczące jej podatności.

PlatformaPaczkaPodatne wersjePoprawka w wersji
Java / Kotlin (Maven) dev.sigstore:sigstore-java < 1.2.0 1.2.0

Odnośniki

Ocena CVSS -
Wektor CVSS
CVSS:4.0/AV:L/AC:L/AT:P/PR:N/UI:N/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N
Słabość (CWE)
CWE-20
Platforma
Java / Kotlin (Maven)
Paczka
dev.sigstore:sigstore-java
Ujawniono
05.12.2024
Aktualizacja
11.10.2026 12:21

Źródła i licencje

OSV / GitHub Advisory Database - GHSA-jp26-88mw-89qr - CC BY 4.0

Historia podatności: dev.sigstore:sigstore-java

Wszystkie opisane podatności tej paczki (Java / Kotlin (Maven)), od najnowszej. Widać, czy to jednorazowa wpadka, czy paczka, której trzeba pilnować.

Wszystkich wpisów
3
Pierwsza → ostatnia
11.2024 06.2026
Bez poprawki
0
Wykorzystywana w atakach
0

Rozkład istotności

  • Średnia 1
  • Niska 2

Ujawnienia w latach

  1. 2024: 2
  2. 2025: 0
  3. 2026: 1
  1. Niska · 2.0 CVE-2026-48791 >= 2.0.0, < 2.1.0 2.1.0
  2. sigstore-java has a vulnerability with bundle verification ten wpis
    Niska CVE-2024-54140 < 1.2.0 1.2.0
  3. Średnia · 5.5 CVE-2024-53267 >= 1.0.0, < 1.1.0 1.1.0

Dowiedz się, które podatności dotyczą Twojej aplikacji

Po podłączeniu integracji DockRay i włączeniu raportowania oprogramowania DockRay porównuje zgłoszone wersje komponentów ze znanymi podatnościami i powiadamia o potwierdzonych dopasowaniach. Zakres zależy od obsługiwanej technologii i dostępnych biuletynów.

Podłącz swoją aplikację
Newsletter DockRay

Bezpieczeństwo aplikacji w Twojej skrzynce

Najważniejsze podatności, konkretne zalecenia i praktyczne wskazówki dla Twoich aplikacji. Wybierz technologie i śledź to, co ma znaczenie dla Twojego projektu.

  • Codzienne zestawienie nowych podatności, także krytycznych.
  • Powiadomienia o ważnych aktualizacjach.
  • Praktyczne porady o bezpieczeństwie i monitoringu aplikacji.

Pozostaw puste, aby otrzymywać informacje o wszystkich technologiach.

Zapis jest bezpłatny. Wypiszesz się jednym kliknięciem w wiadomości.