7.5high
sigstore-ruby verifier returns success for DSSE bundles with mismatched in-toto subject digest
- Severity
- 7.5high CVSS:3.1 by GitHub_M
- Exploit likelihood
- 0.28% (higher than 21% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- GHSA-mhg6-2q2v-9h2c
Description
sigstore-ruby is a pure Ruby implementation of the sigstore verify command from the sigstore/cosign project. Prior to 0.2.3, Sigstore::Verifier#verify does not propagate the VerificationFailure returned by verify_in_toto when the artifact digest does not match the digest in the in-toto attestation subject. As a result, verification of DSSE bundles containing in-toto statements returns VerificationSuccess regardless of whether the artifact matches the attested subject. This vulnerability is fixed in 0.2.3.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| sigstore sigstore-ruby | < 0.2.3 | CVE List |
| sigstore (RubyGems) | before 0.2.3 | GitHub Advisory Database |
| sigstore sigstore | before 0.2.3 | NVD |
All scores
| GitHub_M | 7.5high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N |
| GitHub | 7.5high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N |
Classification
SSVC (CISA-ADP): exploitation none, automatable yes, technical impact partial.
What each source says
CVE List
sigstore-ruby is a pure Ruby implementation of the sigstore verify command from the sigstore/cosign project. Prior to 0.2.3, Sigstore::Verifier#verify does not propagate the VerificationFailure returned by verify_in_toto when the artifact digest does not match the digest in the in-toto attestation subject. As a result, verification of DSSE bundles containing in-toto statements returns VerificationSuccess regardless of whether the artifact matches the attested subject. This vulnerability is fixed in 0.2.3.
GitHub Advisory Database
Summary
Sigstore::Verifier#verify does not propagate the VerificationFailure returned by verify_in_toto when the artifact digest does not match the digest in the in-toto attestation subject. As a result, verification of DSSE bundles containing in-toto statements returns VerificationSuccess regardless of whether the artifact matches the attested subject.
Details
In lib/sigstore/verifier.rb, the verify method calls verify_in_toto (line 176) without capturing or checking its return value:
verify_in_toto(input, in_toto)
When verify_in_toto detects a digest mismatch, it returns a VerificationFailure object. Because the caller discards this return value, execution unconditionally falls through to return VerificationSuccess. This is the only verification sub-check in the method (out of 12) whose failure is not propagated.
The message_signature code path is not affected.
Impact
An attacker who possesses a valid signed DSSE bundle containing an in-toto attestation for artifact A can present it as a valid attestation for a different artifact B. All other verification checks (DSSE envelope signature, certificate chain, Rekor inclusion, SCTs, policy) pass because they are independent of the artifact content. Only the in-toto subject digest check detects the mismatch, and its result is discarded.
This allows an attacker to bypass artifact-to-attestation binding for any consumer that relies on Sigstore::Verifier#verify to validate DSSE/in-toto bundles.
Workarounds
None. Consumers cannot work around this without patching the library.
NVD (es)
sigstore-ruby es una implementación pura de Ruby del comando sigstore verify del proyecto sigstore/cosign. Antes de 0.2.3, Sigstore::Verifier#verify no propaga el VerificationFailure devuelto por verify_in_toto cuando el *digest* del artefacto no coincide con el *digest* en el sujeto de la atestación in-toto. Como resultado, la verificación de paquetes DSSE que contienen declaraciones in-toto devuelve VerificationSuccess independientemente de si el artefacto coincide con el sujeto atestiguado. Esta vulnerabilidad está corregida en 0.2.3.
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2026-31830 changed 2026-03-11 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-mhg6-2q2v-9h2c changed 2026-03-19 | CC-BY-4.0 |
| NVD | CVE-2026-31830 changed 2026-06-17 | Public domain |