CVE-2022-35929: Github.com/sigstore/cosign Cosign's `cosign Verify-attestaton --type` Can Vulnerability

HIGH
Advisory Identifier: GHSA-vjxv-45g9-9296
CVSS 7.1
CWE-347
Published
Advisory Summary

CVE-2022-35929 is a HIGH (CVSS 7.1) cosign's `cosign verify-attestaton --type` can vulnerability (CWE-347: Improper Verification of Cryptographic Signature) affecting Github.com/sigstore/cosign libraries in the Go ecosystem. The issue involves cosign's `cosign verify-attestaton --type` can report a false positive if any attestation exists. Remediation is available by upgrading affected packages to version 1.10.1.

CVE-2022-35929 at a Glance

CVE Identifier CVE-2022-35929
GHSA Identifier GHSA-vjxv-45g9-9296
Severity HIGH
CVSS v3.1 Base Score 7.1
CWE Classification CWE-347: Improper Verification of Cryptographic Signature
Affected Product Github.com/sigstore/cosign
Package Ecosystem Go
Published Date
Last Updated

Security Impact

CVSS: 7.1

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

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

How to Fix CVE-2022-35929

To remediate this vulnerability, upgrade all affected Github.com/sigstore/cosign 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/cosign fixed: 1.10.1
Upgrade github.com/sigstore/cosign to 1.10.1
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/cosign

How to Check if You Are Affected

To determine whether your application is affected by CVE-2022-35929, inspect your project dependencies for Github.com/sigstore/cosign:

inspect dependencies for github.com/sigstore/cosign

Analyze the terminal output to locate any version of Github.com/sigstore/cosign in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.10.1), 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-347: Improper Verification of Cryptographic Signature, where the product does not verify, or incorrectly verifies, the cryptographic signature for data. In Github.com/sigstore/cosign, 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

`cosign verify-attestation` used with the `--type` flag will report a false positive verification when: - There is at least one attestation with a valid signature - There are NO attestations of the type being verified (--type defaults to "custom") This can happen when signing with a standard keypair and with "keyless" signing with Fulcio. Users should upgrade to cosign version 1.10.1 or greater for a patch. Currently the only workaround is to upgrade.

CVE-2022-35929 Affected Github.com/sigstore/cosign Versions

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

References

Frequently Asked Questions

What is CVE-2022-35929?
CVE-2022-35929 is a security vulnerability in Github.com/sigstore/cosign involving cosign's `cosign verify-attestaton --type` can report a false positive if any attestation exists under CWE-347: Improper Verification of Cryptographic Signature.
Which Github.com/sigstore/cosign versions are affected?
Affected versions include releases prior to 1.10.1 across affected packages: github.com/sigstore/cosign.
What version fixes CVE-2022-35929?
Upgrading to 1.10.1 (or the latest patched release for your respective branch) resolves the vulnerability.
Is github.com/sigstore/cosign affected?
Yes, github.com/sigstore/cosign is affected in releases prior to 1.10.1. Upgrade your dependency to 1.10.1 or later.
What is the CVSS score of CVE-2022-35929?
CVE-2022-35929 has a CVSS v3.1 base score of 7.1 (HIGH) with vector string CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:U/C:H/I:H/A:H.
What CWE is associated with CVE-2022-35929?
CVE-2022-35929 is classified under CWE-347: Improper Verification of Cryptographic Signature (The product does not verify, or incorrectly verifies, the cryptographic signature for data.).
How can I check Go dependencies for CVE-2022-35929?
Run the dependency tree command: 'inspect dependencies for github.com/sigstore/cosign'. 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-vjxv-45g9-9296",
  "modified" : "2022-08-10T18:40:38Z",
  "published" : "2022-08-10T18:40:38Z",
  "aliases" : [ "CVE-2022-35929" ],
  "summary" : "cosign's `cosign verify-attestaton  --type` can report a false positive if any attestation exists",
  "details" : "`cosign verify-attestation` used with the `--type` flag will report a false positive verification when:\n\n- There is at least one attestation with a valid signature\n- There are NO attestations of the type being verified (--type defaults to \"custom\")\n\nThis can happen when signing with a standard keypair and with \"keyless\" signing with Fulcio. Users should upgrade to cosign version 1.10.1 or greater for a patch. Currently the only workaround is to upgrade.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:U/C:H/I:H/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/sigstore/cosign"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.10.1"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/sigstore/cosign/security/advisories/GHSA-vjxv-45g9-9296"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2022-35929"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/sigstore/cosign/commit/c5fda01a8ff33ca981f45a9f13e7fb6bd2080b94"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/sigstore/cosign"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-347" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2022-08-10T18:40:38Z",
    "nvd_published_at" : "2022-08-04T19:15:00Z"
  }
}