{"id":"CVE-2024-54140","aliases":["GHSA-jp26-88mw-89qr"],"url":"https://o3.security/vulnerability/CVE-2024-54140","summary":"sigstore-java has a vulnerability with bundle verification","details":"### Summary\nsigstore-java has insufficient verification for a situation where a bundle provides a invalid signature for a checkpoint.\n\n### Impact\nThis bug impacts clients using any variation of KeylessVerifier.verify()\n\nCurrently 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.\n\nThere 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.\n\nAll 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.\n\nsigstore-gradle-plugin and sigstore-maven-plugin are not affected by this as they only provide signing functionality.\n\n### Steps To Reproduce\nBuild the java sigstore-cli at v1.1.0\n```shell\ngit clone --branch v1.1.0 git@github.com:sigstore/sigstore-java\ncd sigstore-java\n./gradlew :sigstore-cli:build\ntar -xf sigstore-cli/build/distributions/sigstore-cli-1.1.0-SNAPSHOT.tar --strip-components 1\n```\n\nCreate some random blob and sign it\n```shell\ndd bs=1 count=50 </dev/urandom > blob\n./bin/sigstore-cli sign --bundle=blob.sigstore.json blob\n```\n\nModify 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.\n```diff\n\"checkpoint\": {\n+    \"envelope\": \"rekor.sigstore.dev - 1193050959916656506\\n29874050\\nhnEOPEa6SDzqJDydU+J96TQyfYfqEpsGg0aVbmfjWDw\\u003d\\n\\n— rekor.sigstore.dev wNI9ajBFAiEA4M7t/9b42FzeArRhC6oRvs7UvKwklaFLYfDDGTi2R4kCIBNc2d0VCyUbs3hd+bI7+0RHhvLOdAqYg7j/3xPe2ZPb\\n\"\n-    \"envelope\": \"rekor.sigstore.dev - 1193050959916656506\\n29874050\\nhnEOPEa6SDzqJDydU+J96TQyfYfqEpsGg0aVbmfjWDw\\u003d\\n\\n— rekor.sigstore.dev wNI9ajBFAiEA4M7t/9b42FzeArRhC6oRvs7UvKwklaFLYfDDGTi2R4kCIBNc2d0VCyUbs3hd+bI7+0RHhvLOdAqYg7j/3xPe2aaa\\n\"\n}\n```\n\n```shell\n./bin/sigstore-cli verify --bundle=blob.sigstore.json blob\n# no errors???!\n```\n### Patches\nPatched in v1.2.0 release (patch: https://github.com/sigstore/sigstore-java/commit/23fb4885e6704a5df4977f7acf253a745349edf9)\nConformance tests added https://github.com/sigstore/sigstore-conformance/pull/139\n\n### Workarounds\nVerifiers may chose to verify the checkpoint manually after running `KeylessVerifier.verify()`\n```java\nvar bundle = Bundle.from(bundleFile, StandardCharsets.UTF_8);\nvar entry = bundle.getEntries().get(0);\nvar checkpoint = entry.getVerification().getInclusionProof().parsedCheckpoint();\nvar signedData = Splitter.on(\"\\n\\n\").splitToList(entry.getVerification().getInclusionProof().getCheckpoint()).get(0) + \"\\n\";\n\nvar tufClient = SigstoreTufClient.builder().usePublicGoodInstance().build();\ntufClient.update();\nvar trustedRoot = tufClient.getSigstoreTrustedRoot();\nvar tlog =  TransparencyLog.find(trustedRoot.getTLogs(), Hex.decode(entry.getLogID()), entry.getIntegratedTimeInstant());\n\nif (!Verifiers.newVerifier(tlog.get().getPublicKey().toJavaPublicKey()).verify(signedData.getBytes(StandardCharsets.UTF_8), checkpoint.getSignatures().get(0).getSignature())) {\n  throw new Exception(\"Checkpoint signature was invalid\");\n}\n```\n","published":"2024-12-05T22:08:37.195Z","modified":"2026-08-12T03:51:21.424010951Z","cvss":null,"epss":null,"cisaKev":null,"exploitsKnown":0,"affectedPackages":[{"ecosystem":"Maven","name":"dev.sigstore:sigstore-java","fixedVersion":"1.2.0"}],"fix":{"url":"https://github.com/sigstore/sigstore-conformance/pull/139","label":"sigstore/sigstore-conformance#139"},"references":[{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/54xxx/CVE-2024-54140.json"},{"type":"ADVISORY","url":"https://github.com/sigstore/sigstore-java/security/advisories/GHSA-jp26-88mw-89qr"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-54140"},{"type":"FIX","url":"https://github.com/sigstore/sigstore-conformance/pull/139"},{"type":"FIX","url":"https://github.com/sigstore/sigstore-java/commit/23fb4885e6704a5df4977f7acf253a745349edf9"},{"type":"PACKAGE","url":"https://github.com/sigstore/sigstore-java"}],"provenance":{"sources":["OSV.dev","FIRST.org (EPSS)"],"lastVerified":"2026-08-12T03:51:21.424010951Z"}}