Vulnerabilities in pkg:golang/github.com/containers/psgo

PACKAGE
Advisory Identifier: GHSA-66vw-v2x9-hw75
Advisory Summary

CVE-2022-1227 is a HIGH (CVSS 8.8) podman publishes a malicious image vulnerability (CWE-269: Improper Privilege Management) affecting Github.com/containers/podman/v3 libraries in the Go ecosystem. The issue involves podman publishes a malicious image to public registries. Remediation is available by upgrading affected packages to version 3.4, 1.7.2.

1 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:golang/github.com/containers/psgo

1 Known Advisory Record(s)

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

Advisory ID CVE / NVD Severity Summary
GHSA-66vw-v2x9-hw75 CVE-2022-1227 HIGH Podman publishes a malicious image to public registries

CVE-2022-1227 at a Glance

CVE Identifier CVE-2022-1227
GHSA Identifier GHSA-66vw-v2x9-hw75
Severity HIGH
CVSS v3.1 Base Score 8.8
CWE Classification CWE-269: Improper Privilege Management
Affected Product Github.com/containers/podman/v3
Package Ecosystem Go
Published Date
Last Updated

Security Impact

CVSS: 8.8

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:H/I:H/A:H).

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 High (C:H)
Integrity High (I:H)
Availability High (A:H)

How to Fix CVE-2022-1227

To remediate this vulnerability, upgrade all affected Github.com/containers/podman/v3 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/containers/podman/v3 fixed: 3.4
Upgrade github.com/containers/podman/v3 to 3.4
github.com/containers/psgo fixed: 1.7.2
Upgrade github.com/containers/psgo to 1.7.2
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/containers/podman/v3

How to Check if You Are Affected

To determine whether your application is affected by CVE-2022-1227, inspect your project dependencies for Github.com/containers/podman/v3:

inspect dependencies for github.com/containers/podman/v3

Analyze the terminal output to locate any version of Github.com/containers/podman/v3 in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 3.4), 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-269: Improper Privilege Management, where the product does not properly assign, modify, track, or check privileges for an actor, creating an unintended sphere of control for that actor. In Github.com/containers/podman/v3, 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

Podman is a tool for managing OCI containers and pods. A privilege escalation flaw was found in Podman. This flaw allows an attacker to publish a malicious image to a public registry. Once this image is downloaded by a potential victim, the vulnerability is triggered after a user runs the 'podman top' command. This action gives the attacker access to the host filesystem, leading to information disclosure or denial of service.

CVE-2022-1227 Affected Github.com/containers/podman/v3 Versions

2 component(s)
Fixed Versions:
3.41.7.2
Product / Package Ecosystem Affected Versions Fixed Version
github.com/containers/podman/v3
Go
< 3.4
3.4
github.com/containers/psgo
Go
< 1.7.2
1.7.2

References

Frequently Asked Questions

What is CVE-2022-1227?
CVE-2022-1227 is a security vulnerability in Github.com/containers/podman/v3 involving Podman publishes a malicious image to public registries under CWE-269: Improper Privilege Management.
Which Github.com/containers/podman/v3 versions are affected?
Affected versions include releases prior to 3.4, 1.7.2 across affected packages: github.com/containers/podman/v3, github.com/containers/psgo.
What version fixes CVE-2022-1227?
Upgrading to 3.4, 1.7.2 (or the latest patched release for your respective branch) resolves the vulnerability.
Is github.com/containers/podman/v3 affected?
Yes, github.com/containers/podman/v3 is affected in releases prior to 3.4. Upgrade your dependency to 3.4 or later.
Is github.com/containers/psgo affected?
Yes, github.com/containers/psgo is affected in releases prior to 1.7.2. Upgrade your dependency to 1.7.2 or later.
What is the CVSS score of CVE-2022-1227?
CVE-2022-1227 has a CVSS v3.1 base score of 8.8 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H.
What CWE is associated with CVE-2022-1227?
CVE-2022-1227 is classified under CWE-269: Improper Privilege Management (The product does not properly assign, modify, track, or check privileges for an actor, creating an unintended sphere of control for that actor.).
How can I check Go dependencies for CVE-2022-1227?
Run the dependency tree command: 'inspect dependencies for github.com/containers/podman/v3'. 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-66vw-v2x9-hw75",
  "modified" : "2024-09-16T17:22:51Z",
  "published" : "2022-04-30T00:00:35Z",
  "aliases" : [ "CVE-2022-1227" ],
  "summary" : "Podman publishes a malicious image to public registries",
  "details" : "Podman is a tool for managing OCI containers and pods. A privilege escalation flaw was found in Podman. This flaw allows an attacker to publish a malicious image to a public registry. Once this image is downloaded by a potential victim, the vulnerability is triggered after a user runs the 'podman top' command. This action gives the attacker access to the host filesystem, leading to information disclosure or denial of service.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H"
  }, {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/containers/podman/v3"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "3.4"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/containers/psgo"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.7.2"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2022-1227"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/containers/podman/issues/10941"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/containers/podman/pull/13862"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/containers/podman/pull/13862/commits/79a3e149c10f74db4cebff624287385c90179d09"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/containers/psgo/pull/92"
  }, {
    "type" : "WEB",
    "url" : "https://bugzilla.redhat.com/show_bug.cgi?id=2070368"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/containers/podman"
  }, {
    "type" : "WEB",
    "url" : "https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/DLUJZV3HBP56ADXU6QH2V7RNYUPMVBXQ"
  }, {
    "type" : "WEB",
    "url" : "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/DLUJZV3HBP56ADXU6QH2V7RNYUPMVBXQ"
  }, {
    "type" : "WEB",
    "url" : "https://pkg.go.dev/vuln/GO-2022-0558"
  }, {
    "type" : "WEB",
    "url" : "https://security.netapp.com/advisory/ntap-20240628-0001"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-269", "CWE-281" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2022-05-03T06:15:16Z",
    "nvd_published_at" : "2022-04-29T16:15:00Z"
  }
}