Vulnerabilities in pkg:gem/sigstore

PACKAGE
Advisory Identifier: GHSA-mhg6-2q2v-9h2c
Advisory Summary

CVE-2026-31830 is a HIGH (CVSS 7.5) sigstore-ruby verifier returns success for vulnerability (CWE-252: Unchecked Return Value) affecting Sigstore libraries in the RubyGems ecosystem. The issue involves sigstore-ruby verifier returns success for dsse bundles with mismatched in-toto subject digest. Remediation is available by upgrading affected packages to version 0.2.3.

1 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:gem/sigstore

1 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:gem/sigstore. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-mhg6-2q2v-9h2c CVE-2026-31830 HIGH sigstore-ruby verifier returns success for DSSE bundles with mismatched in-toto subject digest

CVE-2026-31830 at a Glance

CVE Identifier CVE-2026-31830
GHSA Identifier GHSA-mhg6-2q2v-9h2c
Severity HIGH
CVSS v3.1 Base Score 7.5
CWE Classification CWE-252: Unchecked Return Value
Affected Product Sigstore
Package Ecosystem RubyGems
Published Date
Last Updated

Security Impact

CVSS: 7.5

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality None (C:N)
Integrity High (I:H)
Availability None (A:N)

How to Fix CVE-2026-31830

To remediate this vulnerability, upgrade all affected Sigstore dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

sigstore fixed: 0.2.3
Upgrade sigstore to 0.2.3
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for sigstore

How to Check if You Are Affected

To determine whether your application is affected by CVE-2026-31830, inspect your project dependencies for Sigstore:

inspect dependencies for sigstore

Analyze the terminal output to locate any version of Sigstore in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.2.3), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-252: Unchecked Return Value, where the product does not check the return value from a method or function, which can prevent it from detecting unexpected states and conditions. In Sigstore, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### 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.

CVE-2026-31830 Affected Sigstore Versions

1 component(s)
Fixed Versions:
0.2.3
Product / Package Ecosystem Affected Versions Fixed Version
sigstore
RubyGems
< 0.2.3
0.2.3

References

Frequently Asked Questions

What is CVE-2026-31830?
CVE-2026-31830 is a security vulnerability in Sigstore involving sigstore-ruby verifier returns success for DSSE bundles with mismatched in-toto subject digest under CWE-252: Unchecked Return Value.
Which Sigstore versions are affected?
Affected versions include releases prior to 0.2.3 across affected packages: sigstore.
What version fixes CVE-2026-31830?
Upgrading to 0.2.3 (or the latest patched release for your respective branch) resolves the vulnerability.
Is sigstore affected?
Yes, sigstore is affected in releases prior to 0.2.3. Upgrade your dependency to 0.2.3 or later.
What is the CVSS score of CVE-2026-31830?
CVE-2026-31830 has a CVSS v3.1 base score of 7.5 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N.
What CWE is associated with CVE-2026-31830?
CVE-2026-31830 is classified under CWE-252: Unchecked Return Value (The product does not check the return value from a method or function, which can prevent it from detecting unexpected states and conditions.).
How can I check RubyGems dependencies for CVE-2026-31830?
Run the dependency tree command: 'inspect dependencies for sigstore'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-mhg6-2q2v-9h2c",
  "modified" : "2026-03-19T21:02:46Z",
  "published" : "2026-03-11T00:24:42Z",
  "aliases" : [ "CVE-2026-31830" ],
  "summary" : "sigstore-ruby verifier returns success for DSSE bundles with mismatched in-toto subject digest",
  "details" : "### Summary\n\n`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.\n\n### Details\n\nIn `lib/sigstore/verifier.rb`, the verify method calls `verify_in_toto` (line 176) without capturing or checking its return value:\n\n`verify_in_toto(input, in_toto)`\n\nWhen `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.\n\nThe message_signature code path is not affected.\n\n### Impact\n\nAn 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.\n\nThis allows an attacker to bypass artifact-to-attestation binding for any consumer that relies on `Sigstore::Verifier#verify` to validate DSSE/in-toto bundles.\n\n### Workarounds\n\nNone. Consumers cannot work around this without patching the library.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "RubyGems",
      "name" : "sigstore"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "0.2.3"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/sigstore/sigstore-ruby/security/advisories/GHSA-mhg6-2q2v-9h2c"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-31830"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/rubysec/ruby-advisory-db/blob/master/gems/sigstore/CVE-2026-31830.yml"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/sigstore/sigstore-ruby"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-252" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-03-11T00:24:42Z",
    "nvd_published_at" : "2026-03-10T22:16:21Z"
  }
}