Vulnerabilities in pkg:golang/github.com/proglottis/gpgme

PACKAGE
Advisory Identifier: GHSA-m6wg-2mwg-4rfq
Advisory Summary

CVE-2020-8945 is a HIGH (CVSS 7.5) gpgme go wrapper contains use vulnerability (CWE-416: Use After Free) affecting Github.com/proglottis/gpgme libraries in the Go ecosystem. The issue involves gpgme go wrapper contains use after free. Remediation is available by upgrading affected packages to version 0.1.1.

1 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:golang/github.com/proglottis/gpgme

1 Known Advisory Record(s)

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

Advisory ID CVE / NVD Severity Summary
GHSA-m6wg-2mwg-4rfq CVE-2020-8945 HIGH GPGME Go wrapper contains Use After Free

CVE-2020-8945 at a Glance

CVE Identifier CVE-2020-8945
GHSA Identifier GHSA-m6wg-2mwg-4rfq
Severity HIGH
CVSS v3.1 Base Score 7.5
CWE Classification CWE-416: Use After Free
Affected Product Github.com/proglottis/gpgme
Package Ecosystem Go
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:H/PR:N/UI:R/S:U/C:H/I:H/A:H).

Attack Vector Network (AV:N)
Attack Complexity High (AC:H)
Privileges Required None (PR:N)
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-2020-8945

To remediate this vulnerability, upgrade all affected Github.com/proglottis/gpgme 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/proglottis/gpgme fixed: 0.1.1
Upgrade github.com/proglottis/gpgme to 0.1.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/proglottis/gpgme

How to Check if You Are Affected

To determine whether your application is affected by CVE-2020-8945, inspect your project dependencies for Github.com/proglottis/gpgme:

inspect dependencies for github.com/proglottis/gpgme

Analyze the terminal output to locate any version of Github.com/proglottis/gpgme in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.1.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-416: Use After Free, where the product reuses or references memory after it has been freed. at some point afterward, the memory may be allocated again and saved in another pointer, while the original pointer references a location somewhere within the new allocation. any operations using the original pointer are no longer valid because the memory "belongs" to the code that operates on the new pointer. In Github.com/proglottis/gpgme, 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

The proglottis Go wrapper before 0.1.1 for the GPGME library has a use-after-free, as demonstrated by use for container image pulls by Docker or CRI-O. This leads to a crash or potential code execution during GPG signature verification.

CVE-2020-8945 Affected Github.com/proglottis/gpgme Versions

1 component(s)
Fixed Versions:
0.1.1
Product / Package Ecosystem Affected Versions Fixed Version
github.com/proglottis/gpgme
Go
< 0.1.1
0.1.1

References

NVD — CVE-2020-8945 NVD
https://nvd.nist.gov/vuln/detail/CVE-2020-8945
Github.com/proglottis/gpgme Source Repository REPOSITORY
https://github.com/proglottis/gpgme/pull/23
Security Fix Commit FIX COMMIT
https://github.com/containers/image/commit/4c7a23f82ef09127b0ff28366d1cf31316dd6cc1
Security Fix Commit FIX COMMIT
https://github.com/proglottis/gpgme/commit/92153bcb59bd2f511e502262c46c7bd660e21733
access.redhat.com/errata/rhsa-2020:06... WEB
https://access.redhat.com/errata/RHSA-2020:0679
access.redhat.com/errata/rhsa-2020:06... WEB
https://access.redhat.com/errata/RHSA-2020:0689
access.redhat.com/errata/rhsa-2020:06... WEB
https://access.redhat.com/errata/RHSA-2020:0697
bugzilla.redhat.com/show_bug.cgi WEB
https://bugzilla.redhat.com/show_bug.cgi?id=1795838
Github.com/proglottis/gpgme Source Repository REPOSITORY
https://github.com/proglottis/gpgme
pkg.go.dev/vuln/go-2021-0096 WEB
https://pkg.go.dev/vuln/GO-2021-0096
Github.com/proglottis/gpgme Source Repository REPOSITORY
https://github.com/proglottis/gpgme/compare/v0.1.0...v0.1.1
lists.fedoraproject.org/archives/list/packa... WEB
https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/3SOCLOPTSYABTE4CLTSPDIFE6ZZZR4LX
lists.fedoraproject.org/archives/list/packa... WEB
https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/H6P6SSNKN4H6GSEVROHBDXA64PX7EOED
lists.fedoraproject.org/archives/list/packa... WEB
https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/KDBT77KV3U7BESJX3P4S4MPVDGRTAQA2
lists.fedoraproject.org/archives/list/packa... WEB
https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/WXV7NZELYWRRCXATXU3FYD3G3WJT3WYM

Frequently Asked Questions

What is CVE-2020-8945?
CVE-2020-8945 is a security vulnerability in Github.com/proglottis/gpgme involving GPGME Go wrapper contains Use After Free under CWE-416: Use After Free.
Which Github.com/proglottis/gpgme versions are affected?
Affected versions include releases prior to 0.1.1 across affected packages: github.com/proglottis/gpgme.
What version fixes CVE-2020-8945?
Upgrading to 0.1.1 (or the latest patched release for your respective branch) resolves the vulnerability.
Is github.com/proglottis/gpgme affected?
Yes, github.com/proglottis/gpgme is affected in releases prior to 0.1.1. Upgrade your dependency to 0.1.1 or later.
What is the CVSS score of CVE-2020-8945?
CVE-2020-8945 has a CVSS v3.1 base score of 7.5 (HIGH) with vector string CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H.
What CWE is associated with CVE-2020-8945?
CVE-2020-8945 is classified under CWE-416: Use After Free (The product reuses or references memory after it has been freed. At some point afterward, the memory may be allocated again and saved in another pointer, while the original pointer references a location somewhere within the new allocation. Any operations using the original pointer are no longer valid because the memory "belongs" to the code that operates on the new pointer.).
How can I check Go dependencies for CVE-2020-8945?
Run the dependency tree command: 'inspect dependencies for github.com/proglottis/gpgme'. 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-m6wg-2mwg-4rfq",
  "modified" : "2023-02-14T00:12:15Z",
  "published" : "2021-05-18T15:29:42Z",
  "aliases" : [ "CVE-2020-8945" ],
  "summary" : "GPGME Go wrapper contains Use After Free",
  "details" : "The proglottis Go wrapper before 0.1.1 for the GPGME library has a use-after-free, as demonstrated by use for container image pulls by Docker or CRI-O. This leads to a crash or potential code execution during GPG signature verification.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/proglottis/gpgme"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "0.1.1"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2020-8945"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/proglottis/gpgme/pull/23"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/containers/image/commit/4c7a23f82ef09127b0ff28366d1cf31316dd6cc1"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/proglottis/gpgme/commit/92153bcb59bd2f511e502262c46c7bd660e21733"
  }, {
    "type" : "WEB",
    "url" : "https://access.redhat.com/errata/RHSA-2020:0679"
  }, {
    "type" : "WEB",
    "url" : "https://access.redhat.com/errata/RHSA-2020:0689"
  }, {
    "type" : "WEB",
    "url" : "https://access.redhat.com/errata/RHSA-2020:0697"
  }, {
    "type" : "WEB",
    "url" : "https://bugzilla.redhat.com/show_bug.cgi?id=1795838"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/proglottis/gpgme"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/proglottis/gpgme/compare/v0.1.0...v0.1.1"
  }, {
    "type" : "WEB",
    "url" : "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/3SOCLOPTSYABTE4CLTSPDIFE6ZZZR4LX"
  }, {
    "type" : "WEB",
    "url" : "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/H6P6SSNKN4H6GSEVROHBDXA64PX7EOED"
  }, {
    "type" : "WEB",
    "url" : "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/KDBT77KV3U7BESJX3P4S4MPVDGRTAQA2"
  }, {
    "type" : "WEB",
    "url" : "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/WXV7NZELYWRRCXATXU3FYD3G3WJT3WYM"
  }, {
    "type" : "WEB",
    "url" : "https://pkg.go.dev/vuln/GO-2021-0096"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-416" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2021-05-17T22:00:21Z",
    "nvd_published_at" : "2020-02-12T18:15:00Z"
  }
}