CVE-2024-29069: Github.com/snapcore/snapd Snapd Failed To Properly Check Vulnerability

LOW
Advisory Identifier: GHSA-69p6-gp5x-j269
CVSS 4.8
CWE-59 CWE-610
Published
Advisory Summary

CVE-2024-29069 is a LOW (CVSS 4.8) snapd failed to properly check vulnerability (CWE-59: Improper Link Resolution Before File Access ('Link Following')) affecting Github.com/snapcore/snapd libraries in the Go ecosystem. The issue involves snapd failed to properly check the destination of symbolic links when extracting a snap. Remediation is available by upgrading affected packages to version 2.62.

CVE-2024-29069 at a Glance

CVE Identifier CVE-2024-29069
GHSA Identifier GHSA-69p6-gp5x-j269
Severity LOW
CVSS v3.1 Base Score 4.8
CWE Classification CWE-59: Improper Link Resolution Before File Access ('Link Following')
Affected Product Github.com/snapcore/snapd
Package Ecosystem Go
Published Date
Last Updated

Security Impact

CVSS: 4.8

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

Attack Vector Local (AV:L)
Attack Complexity Low (AC:L)
Privileges Required Low (PR:L)
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-2024-29069

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

How to Check if You Are Affected

To determine whether your application is affected by CVE-2024-29069, inspect your project dependencies for Github.com/snapcore/snapd:

inspect dependencies for github.com/snapcore/snapd

Analyze the terminal output to locate any version of Github.com/snapcore/snapd in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.62), 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/snapcore/snapd, 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

In snapd versions prior to 2.62, snapd failed to properly check the destination of symbolic links when extracting a snap. The snap format is a squashfs file-system image and so can contain symbolic links and other file types. Various file entries within the snap squashfs image (such as icons and desktop files etc) are directly read by snapd when it is extracted. An attacker who could convince a user to install a malicious snap which contained symbolic links at these paths could then cause snapd to write out the contents of the symbolic link destination into a world-readable directory. This in-turn could allow an unprivileged user to gain access to privileged information.

CVE-2024-29069 Affected Github.com/snapcore/snapd Versions

1 component(s)
Fixed Versions:
2.62
Product / Package Ecosystem Affected Versions Fixed Version
github.com/snapcore/snapd
Go
< 2.62
2.62

References

Frequently Asked Questions

What is CVE-2024-29069?
CVE-2024-29069 is a security vulnerability in Github.com/snapcore/snapd involving snapd failed to properly check the destination of symbolic links when extracting a snap under CWE-59: Improper Link Resolution Before File Access ('Link Following').
Which Github.com/snapcore/snapd versions are affected?
Affected versions include releases prior to 2.62 across affected packages: github.com/snapcore/snapd.
What version fixes CVE-2024-29069?
Upgrading to 2.62 (or the latest patched release for your respective branch) resolves the vulnerability.
Is github.com/snapcore/snapd affected?
Yes, github.com/snapcore/snapd is affected in releases prior to 2.62. Upgrade your dependency to 2.62 or later.
What is the CVSS score of CVE-2024-29069?
CVE-2024-29069 has a CVSS v3.1 base score of 4.8 (LOW) with vector string CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:L/I:L/A:L.
What CWE is associated with CVE-2024-29069?
CVE-2024-29069 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-29069?
Run the dependency tree command: 'inspect dependencies for github.com/snapcore/snapd'. 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-69p6-gp5x-j269",
  "modified" : "2024-11-18T16:26:55Z",
  "published" : "2024-07-25T21:31:20Z",
  "aliases" : [ "CVE-2024-29069" ],
  "summary" : "snapd failed to properly check the destination of symbolic links when extracting a snap",
  "details" : "In snapd versions prior to 2.62, snapd failed to properly check the destination of symbolic links when extracting a snap. The snap format is a squashfs file-system image and so can contain symbolic links and other file types. Various file entries within the snap squashfs image (such as icons and desktop files etc) are directly read by snapd when it is extracted. An attacker who could convince a user to install a malicious snap which contained symbolic links at these paths could then cause snapd to write out the contents of the symbolic link destination into a world-readable directory. This in-turn could allow an unprivileged user to gain access to privileged information.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:L/I:L/A:L"
  }, {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:L/AC:L/AT:N/PR:L/UI:P/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/snapcore/snapd"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "2.62"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-29069"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/snapcore/snapd/pull/13682"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/snapcore/snapd/commit/b66fee81606a1c05f965a876ccbaf44174194063"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/snapcore/snapd"
  }, {
    "type" : "WEB",
    "url" : "https://pkg.go.dev/vuln/GO-2024-3009"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-59", "CWE-610" ],
    "severity" : "LOW",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-07-26T16:39:29Z",
    "nvd_published_at" : "2024-07-25T20:15:04Z"
  }
}