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

PACKAGE
Advisory Identifier: GHSA-mc76-5925-c5p6
Advisory Summary

CVE-2024-9341 is a MODERATE (CVSS 5.4) link following vulnerability (CWE-59: Improper Link Resolution Before File Access ('Link Following')) affecting Github.com/containers/common libraries in the Go ecosystem. The issue involves link following in github.com/containers/common. Remediation is available by upgrading affected packages to version 0.60.4.

1 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:golang/github.com/containers/common

1 Known Advisory Record(s)

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

Advisory ID CVE / NVD Severity Summary
GHSA-mc76-5925-c5p6 CVE-2024-9341 MODERATE Link Following in github.com/containers/common

CVE-2024-9341 at a Glance

CVE Identifier CVE-2024-9341
GHSA Identifier GHSA-mc76-5925-c5p6
Severity MODERATE
CVSS v3.1 Base Score 5.4
CWE Classification CWE-59: Improper Link Resolution Before File Access ('Link Following')
Affected Product Github.com/containers/common
Package Ecosystem Go
Published Date
Last Updated

Security Impact

CVSS: 5.4

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:L/A:N).

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 Low (I:L)
Availability None (A:N)

How to Fix CVE-2024-9341

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

How to Check if You Are Affected

To determine whether your application is affected by CVE-2024-9341, inspect your project dependencies for Github.com/containers/common:

inspect dependencies for github.com/containers/common

Analyze the terminal output to locate any version of Github.com/containers/common in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.60.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-59: Improper Link Resolution Before File Access ('Link Following'), where the product attempts to access a file based on the filename, but it does not properly prevent that filename from identifying a link or shortcut that resolves to an unintended resource. In Github.com/containers/common, 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

A flaw was found in Go. When FIPS mode is enabled on a system, container runtimes may incorrectly handle certain file paths due to improper validation in the containers/common Go library. This flaw allows an attacker to exploit symbolic links and trick the system into mounting sensitive host directories inside a container. This issue also allows attackers to access critical host files, bypassing the intended isolation between containers and the host system.

CVE-2024-9341 Affected Github.com/containers/common Versions

1 component(s)
Fixed Versions:
0.60.4
Product / Package Ecosystem Affected Versions Fixed Version
github.com/containers/common
Go
< 0.60.4
0.60.4

References

NVD — CVE-2024-9341 NVD
https://nvd.nist.gov/vuln/detail/CVE-2024-9341
Security Fix Commit FIX COMMIT
https://github.com/containers/common/commit/e7db06585c32e1a782c1d9aa3b71ccd708f5e23f
Github.com/containers/common Source Repository REPOSITORY
https://github.com/containers/common/blob/384f77532f67afc8a73d8e0c4adb0d195df57714/pkg/subscriptions/subscriptions.go#L349
Github.com/containers/common Source Repository REPOSITORY
https://github.com/containers/common/blob/384f77532f67afc8a73d8e0c4adb0d195df57714/pkg/subscriptions/subscriptions.go#L169
Github.com/containers/common Source Repository REPOSITORY
https://github.com/containers/common
bugzilla.redhat.com/show_bug.cgi WEB
https://bugzilla.redhat.com/show_bug.cgi?id=2315691
Github.com/containers/common Security Information SECURITY
https://access.redhat.com/security/cve/CVE-2024-9341
access.redhat.com/errata/rhsa-2024:94... WEB
https://access.redhat.com/errata/RHSA-2024:9459
access.redhat.com/errata/rhsa-2024:94... WEB
https://access.redhat.com/errata/RHSA-2024:9454
access.redhat.com/errata/rhsa-2024:88... WEB
https://access.redhat.com/errata/RHSA-2024:8846
access.redhat.com/errata/rhsa-2024:86... WEB
https://access.redhat.com/errata/RHSA-2024:8694
access.redhat.com/errata/rhsa-2024:86... WEB
https://access.redhat.com/errata/RHSA-2024:8690
access.redhat.com/errata/rhsa-2024:84... WEB
https://access.redhat.com/errata/RHSA-2024:8428
access.redhat.com/errata/rhsa-2024:82... WEB
https://access.redhat.com/errata/RHSA-2024:8263
access.redhat.com/errata/rhsa-2024:82... WEB
https://access.redhat.com/errata/RHSA-2024:8238
access.redhat.com/errata/rhsa-2024:81... WEB
https://access.redhat.com/errata/RHSA-2024:8112
access.redhat.com/errata/rhsa-2024:80... WEB
https://access.redhat.com/errata/RHSA-2024:8039
access.redhat.com/errata/rhsa-2024:79... WEB
https://access.redhat.com/errata/RHSA-2024:7925
access.redhat.com/errata/rhsa-2024:10... WEB
https://access.redhat.com/errata/RHSA-2024:10818
access.redhat.com/errata/rhsa-2024:10... WEB
https://access.redhat.com/errata/RHSA-2024:10147

Frequently Asked Questions

What is CVE-2024-9341?
CVE-2024-9341 is a security vulnerability in Github.com/containers/common involving Link Following in github.com/containers/common under CWE-59: Improper Link Resolution Before File Access ('Link Following').
Which Github.com/containers/common versions are affected?
Affected versions include releases prior to 0.60.4 across affected packages: github.com/containers/common.
What version fixes CVE-2024-9341?
Upgrading to 0.60.4 (or the latest patched release for your respective branch) resolves the vulnerability.
Is github.com/containers/common affected?
Yes, github.com/containers/common is affected in releases prior to 0.60.4. Upgrade your dependency to 0.60.4 or later.
What is the CVSS score of CVE-2024-9341?
CVE-2024-9341 has a CVSS v3.1 base score of 5.4 (MODERATE) with vector string CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:U/C:H/I:L/A:N.
What CWE is associated with CVE-2024-9341?
CVE-2024-9341 is classified under CWE-59: Improper Link Resolution Before File Access ('Link Following') (The product attempts to access a file based on the filename, but it does not properly prevent that filename from identifying a link or shortcut that resolves to an unintended resource.).
How can I check Go dependencies for CVE-2024-9341?
Run the dependency tree command: 'inspect dependencies for github.com/containers/common'. 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-mc76-5925-c5p6",
  "modified" : "2024-12-11T06:30:24Z",
  "published" : "2024-10-01T21:31:34Z",
  "aliases" : [ "CVE-2024-9341" ],
  "summary" : "Link Following in github.com/containers/common",
  "details" : "A flaw was found in Go. When FIPS mode is enabled on a system, container runtimes may incorrectly handle certain file paths due to improper validation in the containers/common Go library. This flaw allows an attacker to exploit symbolic links and trick the system into mounting sensitive host directories inside a container. This issue also allows attackers to access critical host files, bypassing the intended isolation between containers and the host system.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:U/C:H/I:L/A:N"
  }, {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:A/VC:H/VI:L/VA:N/SC:N/SI:N/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/containers/common"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "0.60.4"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-9341"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/containers/common/commit/e7db06585c32e1a782c1d9aa3b71ccd708f5e23f"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/containers/common/blob/384f77532f67afc8a73d8e0c4adb0d195df57714/pkg/subscriptions/subscriptions.go#L349"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/containers/common/blob/384f77532f67afc8a73d8e0c4adb0d195df57714/pkg/subscriptions/subscriptions.go#L169"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/containers/common"
  }, {
    "type" : "WEB",
    "url" : "https://bugzilla.redhat.com/show_bug.cgi?id=2315691"
  }, {
    "type" : "WEB",
    "url" : "https://access.redhat.com/security/cve/CVE-2024-9341"
  }, {
    "type" : "WEB",
    "url" : "https://access.redhat.com/errata/RHSA-2024:9459"
  }, {
    "type" : "WEB",
    "url" : "https://access.redhat.com/errata/RHSA-2024:9454"
  }, {
    "type" : "WEB",
    "url" : "https://access.redhat.com/errata/RHSA-2024:8846"
  }, {
    "type" : "WEB",
    "url" : "https://access.redhat.com/errata/RHSA-2024:8694"
  }, {
    "type" : "WEB",
    "url" : "https://access.redhat.com/errata/RHSA-2024:8690"
  }, {
    "type" : "WEB",
    "url" : "https://access.redhat.com/errata/RHSA-2024:8428"
  }, {
    "type" : "WEB",
    "url" : "https://access.redhat.com/errata/RHSA-2024:8263"
  }, {
    "type" : "WEB",
    "url" : "https://access.redhat.com/errata/RHSA-2024:8238"
  }, {
    "type" : "WEB",
    "url" : "https://access.redhat.com/errata/RHSA-2024:8112"
  }, {
    "type" : "WEB",
    "url" : "https://access.redhat.com/errata/RHSA-2024:8039"
  }, {
    "type" : "WEB",
    "url" : "https://access.redhat.com/errata/RHSA-2024:7925"
  }, {
    "type" : "WEB",
    "url" : "https://access.redhat.com/errata/RHSA-2024:10818"
  }, {
    "type" : "WEB",
    "url" : "https://access.redhat.com/errata/RHSA-2024:10147"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-59" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-10-01T22:31:13Z",
    "nvd_published_at" : "2024-10-01T19:15:09Z"
  }
}