|
| 1 | +--- |
| 2 | +gem: sigstore |
| 3 | +cve: 2026-31830 |
| 4 | +ghsa: mhg6-2q2v-9h2c |
| 5 | +url: https://github.com/sigstore/sigstore-ruby/security/advisories/GHSA-mhg6-2q2v-9h2c |
| 6 | +title: sigstore-ruby verifier returns success for DSSE bundles |
| 7 | + with mismatched in-toto subject digest |
| 8 | +date: 2026-03-11 |
| 9 | +description: | |
| 10 | + ### Summary |
| 11 | +
|
| 12 | + `Sigstore::Verifier#verify` does not propagate the `VerificationFailure` |
| 13 | + returned by `verify_in_toto` when the artifact digest does not match |
| 14 | + the digest in the in-toto attestation subject. As a result, verification |
| 15 | + of DSSE bundles containing in-toto statements returns `VerificationSuccess` |
| 16 | + regardless of whether the artifact matches the attested subject. |
| 17 | +
|
| 18 | + ### Details |
| 19 | +
|
| 20 | + In `lib/sigstore/verifier.rb`, the verify method calls `verify_in_toto` |
| 21 | + (line 176) without capturing or checking its return value: |
| 22 | +
|
| 23 | + `verify_in_toto(input, in_toto)` |
| 24 | +
|
| 25 | + When `verify_in_toto` detects a digest mismatch, it returns a |
| 26 | + `VerificationFailure` object. Because the caller discards this |
| 27 | + return value, execution unconditionally falls through to return |
| 28 | + `VerificationSuccess`. This is the only verification sub-check in |
| 29 | + the method (out of 12) whose failure is not propagated. |
| 30 | +
|
| 31 | + The message_signature code path is not affected. |
| 32 | +
|
| 33 | + ### Impact |
| 34 | +
|
| 35 | + An attacker who possesses a valid signed DSSE bundle containing an |
| 36 | + in-toto attestation for artifact A can present it as a valid attestation |
| 37 | + for a different artifact B. All other verification checks (DSSE envelope |
| 38 | + signature, certificate chain, Rekor inclusion, SCTs, policy) pass because |
| 39 | + they are independent of the artifact content. Only the in-toto subject |
| 40 | + digest check detects the mismatch, and its result is discarded. |
| 41 | +
|
| 42 | + This allows an attacker to bypass artifact-to-attestation binding for |
| 43 | + any consumer that relies on `Sigstore::Verifier#verify` to validate |
| 44 | + DSSE/in-toto bundles. |
| 45 | +
|
| 46 | + ### Workarounds |
| 47 | +
|
| 48 | + None. Consumers cannot work around this without patching the library. |
| 49 | +cvss_v3: 7.5 |
| 50 | +patched_versions: |
| 51 | + - ">= 0.2.3" |
| 52 | +related: |
| 53 | + url: |
| 54 | + - https://nvd.nist.gov/vuln/detail/CVE-2026-31830 |
| 55 | + - https://github.com/sigstore/sigstore-ruby/security/advisories/GHSA-mhg6-2q2v-9h2c |
| 56 | + - https://github.com/advisories/GHSA-mhg6-2q2v-9h2c |
0 commit comments