CVE-2024-51746: Github.com/sigstore/gitsign Gitsign May Use Incorrect Rekor Vulnerability

LOW
Advisory Identifier: GHSA-8pmp-678w-c8xx
CWE-287 CWE-706
Published
Advisory Summary

CVE-2024-51746 is a LOW gitsign may use incorrect rekor vulnerability (CWE-287: Improper Authentication) affecting Github.com/sigstore/gitsign libraries in the Go ecosystem. The issue involves gitsign may use incorrect rekor entries during verification. Remediation is available by upgrading affected packages to version 0.11.0.

CVE-2024-51746 at a Glance

CVE Identifier CVE-2024-51746
GHSA Identifier GHSA-8pmp-678w-c8xx
Severity LOW
CVSS v3.1 Base Score N/A
CWE Classification CWE-287: Improper Authentication
Affected Product Github.com/sigstore/gitsign
Package Ecosystem Go
Published Date
Last Updated

How to Fix CVE-2024-51746

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

github.com/sigstore/gitsign fixed: 0.11.0
Upgrade github.com/sigstore/gitsign to 0.11.0
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 github.com/sigstore/gitsign

How to Check if You Are Affected

To determine whether your application is affected by CVE-2024-51746, inspect your project dependencies for Github.com/sigstore/gitsign:

inspect dependencies for github.com/sigstore/gitsign

Analyze the terminal output to locate any version of Github.com/sigstore/gitsign in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.11.0), 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-287: Improper Authentication, where when an actor claims to have a given identity, the product does not prove or insufficiently proves that the claim is correct. In Github.com/sigstore/gitsign, 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 gitsign may select the wrong Rekor entry to use during online verification when multiple entries are returned by the log. ### Details gitsign uses Rekor's search API to fetch entries that apply to a signature being verified. The parameters used for the search are the public key and the payload. The search API returns entries that match _either_ condition rather than _both_. When gitsign's credential cache is used, there can be multiple entries that use the same ephemeral keypair / signing certificate. As gitsign assumes both conditions are matched by Rekor, there is no additional validation that the entry's hash matches the payload being verified, meaning that the wrong entry can be used to successfully pass verification. ### PoC Enable the credential cache and create commit signatures using the cached signing certificate. `gitsign verify` or `git log --show-signature` will demonstrate the use of the wrong entry index for the corresponding commit. Note that this depends on the order of matching entries in the response from the Rekor search API, so it may take a few attempts to trigger this. ### Impact Minimal. While gitsign does not match the payload against the entry, it does ensure that the certificate matches. This would need to be exploited during the certificate validity window (10 minutes) by the key holder.

CVE-2024-51746 Affected Github.com/sigstore/gitsign Versions

1 component(s)
Fixed Versions:
0.11.0
Product / Package Ecosystem Affected Versions Fixed Version
github.com/sigstore/gitsign
Go
< 0.11.0
0.11.0

References

Frequently Asked Questions

What is CVE-2024-51746?
CVE-2024-51746 is a security vulnerability in Github.com/sigstore/gitsign involving gitsign may use incorrect Rekor entries during verification under CWE-287: Improper Authentication.
Which Github.com/sigstore/gitsign versions are affected?
Affected versions include releases prior to 0.11.0 across affected packages: github.com/sigstore/gitsign.
What version fixes CVE-2024-51746?
Upgrading to 0.11.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is github.com/sigstore/gitsign affected?
Yes, github.com/sigstore/gitsign is affected in releases prior to 0.11.0. Upgrade your dependency to 0.11.0 or later.
What CWE is associated with CVE-2024-51746?
CVE-2024-51746 is classified under CWE-287: Improper Authentication (When an actor claims to have a given identity, the product does not prove or insufficiently proves that the claim is correct.).
How can I check Go dependencies for CVE-2024-51746?
Run the dependency tree command: 'inspect dependencies for github.com/sigstore/gitsign'. 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-8pmp-678w-c8xx",
  "modified" : "2024-11-06T19:55:44Z",
  "published" : "2024-11-05T15:26:57Z",
  "aliases" : [ "CVE-2024-51746" ],
  "summary" : "gitsign may use incorrect Rekor entries during verification",
  "details" : "### Summary\n\ngitsign may select the wrong Rekor entry to use during online verification when multiple entries are returned by the log.\n\n### Details\n\ngitsign uses Rekor's search API to fetch entries that apply to a signature being verified. The parameters used for the search are the public key and the payload. The search API returns entries that match _either_ condition rather than _both_. When gitsign's credential cache is used, there can be multiple entries that use the same ephemeral keypair / signing certificate. As gitsign assumes both conditions are matched by Rekor, there is no additional validation that the entry's hash matches the payload being verified, meaning that the wrong entry can be used to successfully pass verification.\n\n### PoC\n\nEnable the credential cache and create commit signatures using the cached signing certificate. `gitsign verify` or `git log --show-signature` will demonstrate the use of the wrong entry index for the corresponding commit. Note that this depends on the order of matching entries in the response from the Rekor search API, so it may take a few attempts to trigger this.\n\n### Impact\n\nMinimal. While gitsign does not match the payload against the entry, it does ensure that the certificate matches. This would need to be exploited during the certificate validity window (10 minutes) by the key holder.",
  "severity" : [ {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:L/AC:H/AT:P/PR:N/UI:A/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/sigstore/gitsign"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "0.11.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/sigstore/gitsign/security/advisories/GHSA-8pmp-678w-c8xx"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-51746"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/sigstore/gitsign"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-287", "CWE-706" ],
    "severity" : "LOW",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-11-05T15:26:57Z",
    "nvd_published_at" : "2024-11-05T19:15:08Z"
  }
}