Vulnerabilities in pkg:golang/github.com/sylabs/sif/v2

PACKAGE
Advisory Identifier: GHSA-m5m3-46gj-wch8
Advisory Summary

CVE-2022-39237 is a MODERATE (CVSS 6.3) sif's digital signature hash algorithms vulnerability (CWE-327: Use of a Broken or Risky Cryptographic Algorithm) affecting Github.com/sylabs/sif/v2 libraries in the Go ecosystem. The issue involves sif's digital signature hash algorithms not validated. Remediation is available by upgrading affected packages to version 2.8.1.

1 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:golang/github.com/sylabs/sif/v2

1 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:golang/github.com/sylabs/sif/v2. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-m5m3-46gj-wch8 CVE-2022-39237 MODERATE SIF's Digital Signature Hash Algorithms Not Validated

CVE-2022-39237 at a Glance

CVE Identifier CVE-2022-39237
GHSA Identifier GHSA-m5m3-46gj-wch8
Severity MODERATE
CVSS v3.1 Base Score 6.3
CWE Classification CWE-327: Use of a Broken or Risky Cryptographic Algorithm
Affected Product Github.com/sylabs/sif/v2
Package Ecosystem Go
Published Date
Last Updated

Security Impact

CVSS: 6.3

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:R/S:U/C:L/I:L/A:L).

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

How to Fix CVE-2022-39237

To remediate this vulnerability, upgrade all affected Github.com/sylabs/sif/v2 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/sylabs/sif/v2 fixed: 2.8.1
Upgrade github.com/sylabs/sif/v2 to 2.8.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/sylabs/sif/v2

How to Check if You Are Affected

To determine whether your application is affected by CVE-2022-39237, inspect your project dependencies for Github.com/sylabs/sif/v2:

inspect dependencies for github.com/sylabs/sif/v2

Analyze the terminal output to locate any version of Github.com/sylabs/sif/v2 in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.8.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-327: Use of a Broken or Risky Cryptographic Algorithm, where the product uses a broken or risky cryptographic algorithm or protocol. In Github.com/sylabs/sif/v2, 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

### Impact The `github.com/sylabs/sif/v2/pkg/integrity` package does not verify that the hash algorithm(s) used are cryptographically secure when verifying digital signatures. ### Patches A patch is available in version >= v2.8.1 of the module. Users are encouraged to upgrade. The patch is commit https://github.com/sylabs/sif/commit/07fb86029a12e3210f6131e065570124605daeaa ### Workarounds Users may independently validate that the hash algorithm(s) used for metadata digest(s) and signature hash are cryptographically secure. ### References * [CVE-2004-2761](https://nvd.nist.gov/vuln/detail/cve-2004-2761) * [CVE-2005-4900](https://nvd.nist.gov/vuln/detail/cve-2005-4900) ### For more information If you have any questions or comments about this advisory: * Open an issue in [github.com/sylabs/sif](https://github.com/sylabs/sif/issues/new) * Email us at [security@sylabs.io](mailto:security@sylabs.io)

CVE-2022-39237 Affected Github.com/sylabs/sif/v2 Versions

1 component(s)
Fixed Versions:
2.8.1
Product / Package Ecosystem Affected Versions Fixed Version
github.com/sylabs/sif/v2
Go
< 2.8.1
2.8.1

References

Frequently Asked Questions

What is CVE-2022-39237?
CVE-2022-39237 is a security vulnerability in Github.com/sylabs/sif/v2 involving SIF's Digital Signature Hash Algorithms Not Validated under CWE-327: Use of a Broken or Risky Cryptographic Algorithm.
Which Github.com/sylabs/sif/v2 versions are affected?
Affected versions include releases prior to 2.8.1 across affected packages: github.com/sylabs/sif/v2.
What version fixes CVE-2022-39237?
Upgrading to 2.8.1 (or the latest patched release for your respective branch) resolves the vulnerability.
Is github.com/sylabs/sif/v2 affected?
Yes, github.com/sylabs/sif/v2 is affected in releases prior to 2.8.1. Upgrade your dependency to 2.8.1 or later.
What is the CVSS score of CVE-2022-39237?
CVE-2022-39237 has a CVSS v3.1 base score of 6.3 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:L.
What CWE is associated with CVE-2022-39237?
CVE-2022-39237 is classified under CWE-327: Use of a Broken or Risky Cryptographic Algorithm (The product uses a broken or risky cryptographic algorithm or protocol.).
How can I check Go dependencies for CVE-2022-39237?
Run the dependency tree command: 'inspect dependencies for github.com/sylabs/sif/v2'. 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-m5m3-46gj-wch8",
  "modified" : "2023-01-10T16:09:12Z",
  "published" : "2022-10-06T19:54:55Z",
  "aliases" : [ "CVE-2022-39237" ],
  "summary" : "SIF's Digital Signature Hash Algorithms Not Validated",
  "details" : "### Impact\n\nThe `github.com/sylabs/sif/v2/pkg/integrity` package does not verify that the hash algorithm(s) used are cryptographically secure when verifying digital signatures.\n\n### Patches\n\nA patch is available in version >= v2.8.1 of the module. Users are encouraged to upgrade.\n\nThe patch is commit https://github.com/sylabs/sif/commit/07fb86029a12e3210f6131e065570124605daeaa\n\n### Workarounds\n\nUsers may independently validate that the hash algorithm(s) used for metadata digest(s) and signature hash are cryptographically secure.\n\n### References\n\n* [CVE-2004-2761](https://nvd.nist.gov/vuln/detail/cve-2004-2761)\n* [CVE-2005-4900](https://nvd.nist.gov/vuln/detail/cve-2005-4900)\n\n### For more information\n\nIf you have any questions or comments about this advisory:\n\n* Open an issue in [github.com/sylabs/sif](https://github.com/sylabs/sif/issues/new)\n* Email us at [security@sylabs.io](mailto:security@sylabs.io)",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:L"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/sylabs/sif/v2"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "2.8.1"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/sylabs/sif/security/advisories/GHSA-m5m3-46gj-wch8"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2022-39237"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/sylabs/sif/commit/07fb86029a12e3210f6131e065570124605daeaa"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/sylabs/sif"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/sylabs/sif/releases/tag/v2.8.1"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/cve-2004-2761"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/cve-2005-4900"
  }, {
    "type" : "WEB",
    "url" : "https://pkg.go.dev/vuln/GO-2022-1045"
  }, {
    "type" : "WEB",
    "url" : "https://security.gentoo.org/glsa/202210-19"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-327", "CWE-347" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2022-10-06T19:54:55Z",
    "nvd_published_at" : "2022-10-06T18:16:00Z"
  }
}