Vulnerabilities in pkg:golang/github.com/lima-vm/lima

PACKAGE
Advisory Identifier: GHSA-f7qw-jj9c-rpq9
Advisory Summary

CVE-2023-32684 is a LOW (CVSS 2.7) security vulnerability vulnerability (CWE-552: Files or Directories Accessible to External Parties) affecting Github.com/lima vm/lima libraries in the Go ecosystem. The issue involves in lima, a malicious disk image could read a single file on the host filesystem as a qcow2/vmdk backing file. Remediation is available by upgrading affected packages to version 0.16.0.

1 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:golang/github.com/lima-vm/lima

1 Known Advisory Record(s)

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

Advisory ID CVE / NVD Severity Summary
GHSA-f7qw-jj9c-rpq9 CVE-2023-32684 LOW In Lima, a malicious disk image could read a single file on the host filesystem as a qcow2/vmdk backing file

CVE-2023-32684 at a Glance

CVE Identifier CVE-2023-32684
GHSA Identifier GHSA-f7qw-jj9c-rpq9
Severity LOW
CVSS v3.1 Base Score 2.7
CWE Classification CWE-552: Files or Directories Accessible to External Parties
Affected Product Github.com/lima vm/lima
Package Ecosystem Go
Published Date
Last Updated

Security Impact

CVSS: 2.7

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

Attack Vector Local (AV:L)
Attack Complexity High (AC:H)
Privileges Required None (PR:N)
User Interaction Required (UI:R)
Scope Changed (S:C)
Confidentiality Low (C:L)
Integrity None (I:N)
Availability None (A:N)

How to Fix CVE-2023-32684

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

How to Check if You Are Affected

To determine whether your application is affected by CVE-2023-32684, inspect your project dependencies for Github.com/lima vm/lima:

inspect dependencies for github.com/lima-vm/lima

Analyze the terminal output to locate any version of Github.com/lima vm/lima in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.16.0), 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-552: Files or Directories Accessible to External Parties, where the product makes files or directories accessible to unauthorized actors, even though they should not be. In Github.com/lima vm/lima, 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

> **Note** > > The official templates of Lima, and the well-known third party products (Colima, Rancher Desktop, and Finch) are *unlikely* to be affected by this issue. ### Impact A virtual machine instance with a malicious disk image could read a single file on the host filesystem, even when no filesystem is mounted from the host. To exploit this issue, the attacker has to embed the target file path (an absolute or a relative path from the instance directory) in a malicious disk image, as the [qcow2 (or vmdk) backing file path string](https://gitlab.com/qemu-project/qemu/-/blob/v8.0.0/docs/interop/qcow2.txt#L23-L34). As Lima refuses to run as the root, it is practically impossible for the attacker to read the entire host disk via `/dev/rdiskN`. Also, practically, the attacker cannot read at least the first 512 bytes (MBR) of the target file. ### Patches Patched in Lima v0.16.0, by prohibiting using a backing file path in the VM base image. ### Workarounds Do not use an untrusted disk image.

CVE-2023-32684 Affected Github.com/lima vm/lima Versions

1 component(s)
Fixed Versions:
0.16.0
Product / Package Ecosystem Affected Versions Fixed Version
github.com/lima-vm/lima
Go
< 0.16.0
0.16.0

References

Frequently Asked Questions

What is CVE-2023-32684?
CVE-2023-32684 is a security vulnerability in Github.com/lima vm/lima involving In Lima, a malicious disk image could read a single file on the host filesystem as a qcow2/vmdk backing file under CWE-552: Files or Directories Accessible to External Parties.
Which Github.com/lima vm/lima versions are affected?
Affected versions include releases prior to 0.16.0 across affected packages: github.com/lima-vm/lima.
What version fixes CVE-2023-32684?
Upgrading to 0.16.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is github.com/lima-vm/lima affected?
Yes, github.com/lima-vm/lima is affected in releases prior to 0.16.0. Upgrade your dependency to 0.16.0 or later.
What is the CVSS score of CVE-2023-32684?
CVE-2023-32684 has a CVSS v3.1 base score of 2.7 (LOW) with vector string CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:C/C:L/I:N/A:N.
What CWE is associated with CVE-2023-32684?
CVE-2023-32684 is classified under CWE-552: Files or Directories Accessible to External Parties (The product makes files or directories accessible to unauthorized actors, even though they should not be.).
How can I check Go dependencies for CVE-2023-32684?
Run the dependency tree command: 'inspect dependencies for github.com/lima-vm/lima'. 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-f7qw-jj9c-rpq9",
  "modified" : "2023-05-31T23:38:28Z",
  "published" : "2023-05-31T23:38:28Z",
  "aliases" : [ "CVE-2023-32684" ],
  "summary" : "In Lima, a malicious disk image could read a single file on the host filesystem as a qcow2/vmdk backing file",
  "details" : "> **Note**\n>\n> The official templates of Lima, and the well-known third party products (Colima, Rancher Desktop, and Finch) are *unlikely* to be affected by this issue.\n\n### Impact\nA virtual machine instance with a malicious disk image could read a single file on the host filesystem, even when no filesystem is mounted from the host.\n\nTo exploit this issue, the attacker has to embed the target file path (an absolute or a relative path from the instance directory) in a malicious disk image, as the [qcow2 (or vmdk) backing file path string](https://gitlab.com/qemu-project/qemu/-/blob/v8.0.0/docs/interop/qcow2.txt#L23-L34).\nAs Lima refuses to run as the root, it is practically impossible for the attacker to read the entire host disk via `/dev/rdiskN`.\nAlso, practically, the attacker cannot read at least the first 512 bytes (MBR) of the target file.\n\n### Patches\nPatched in Lima v0.16.0, by prohibiting using a backing file path in the VM base image.\n\n### Workarounds\nDo not use an untrusted disk image.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:C/C:L/I:N/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/lima-vm/lima"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "0.16.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/lima-vm/lima/security/advisories/GHSA-f7qw-jj9c-rpq9"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2023-32684"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/lima-vm/lima/commit/01dbd4d9cabe692afa4517be3995771f0ebb38a5"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/lima-vm/lima"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/lima-vm/lima/releases/tag/v0.16.0"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-552" ],
    "severity" : "LOW",
    "github_reviewed" : true,
    "github_reviewed_at" : "2023-05-31T23:38:28Z",
    "nvd_published_at" : "2023-05-30T18:15:10Z"
  }
}