Vulnerabilities in pkg:nuget/WixToolset.Util.wixext

PACKAGE
Advisory Identifier: GHSA-jx4p-m4wm-vvjg
Advisory Summary

CVE-2024-29188 is a HIGH (CVSS 7.9) malicious directory junction can cause vulnerability (CWE-59: Improper Link Resolution Before File Access ('Link Following')) affecting Wix libraries in the NuGet ecosystem. The issue involves malicious directory junction can cause wix removefoldersex to possibly delete elevated files. Remediation is available by upgrading affected packages to version 3.14.1, 4.0.5.

1 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:nuget/WixToolset.Util.wixext

1 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:nuget/WixToolset.Util.wixext. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-jx4p-m4wm-vvjg CVE-2024-29188 HIGH Malicious directory junction can cause WiX RemoveFoldersEx to possibly delete elevated files

CVE-2024-29188 at a Glance

CVE Identifier CVE-2024-29188
GHSA Identifier GHSA-jx4p-m4wm-vvjg
Severity HIGH
CVSS v3.1 Base Score 7.9
CWE Classification CWE-59: Improper Link Resolution Before File Access ('Link Following')
Affected Product Wix
Package Ecosystem NuGet
Published Date
Last Updated

Security Impact

CVSS: 7.9

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

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

How to Fix CVE-2024-29188

To remediate this vulnerability, upgrade all affected Wix dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

wix fixed: 3.14.1
Upgrade wix to 3.14.1
wix fixed: 4.0.5
Upgrade wix to 4.0.5
WixToolset.Util.wixext fixed: 4.0.5
Upgrade WixToolset.Util.wixext to 4.0.5
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 wix

How to Check if You Are Affected

To determine whether your application is affected by CVE-2024-29188, inspect your project dependencies for Wix:

inspect dependencies for wix

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

### Summary The custom action behind WiX's `RemoveFolderEx` functionality could allow a standard user to delete protected directories. ### Details `RemoveFolderEx` deletes an entire directory tree during installation or uninstallation. It does so by recursing every subdirectory starting at a specified directory and adding each subdirectory to the list of directories Windows Installer should delete. If the setup author instructed `RemoveFolderEx` to delete a per-user folder from a per-machine installer, an attacker could create a directory junction in that per-user folder pointing to a per-machine, protected directory. Windows Installer, when executing the per-machine installer after approval by an administrator, would delete the target of the directory junction.

CVE-2024-29188 Affected Wix Versions

3 component(s)
Fixed Versions:
3.14.14.0.5
Product / Package Ecosystem Affected Versions Fixed Version
wix
NuGet
< 3.14.1
3.14.1
wix
NuGet
≥ 4.0.0
< 4.0.5
4.0.5
WixToolset.Util.wixext
NuGet
< 4.0.5
4.0.5

References

Frequently Asked Questions

What is CVE-2024-29188?
CVE-2024-29188 is a security vulnerability in Wix involving Malicious directory junction can cause WiX RemoveFoldersEx to possibly delete elevated files under CWE-59: Improper Link Resolution Before File Access ('Link Following').
Which Wix versions are affected?
Affected versions include releases prior to 3.14.1, 4.0.5 across affected packages: wix, WixToolset.Util.wixext.
What version fixes CVE-2024-29188?
Upgrading to 3.14.1, 4.0.5 (or the latest patched release for your respective branch) resolves the vulnerability.
Is wix affected?
Yes, wix is affected in releases prior to 3.14.1, 4.0.5. Upgrade your dependency to 3.14.1, 4.0.5 or later.
Is WixToolset.Util.wixext affected?
Yes, WixToolset.Util.wixext is affected in releases prior to 4.0.5. Upgrade your dependency to 4.0.5 or later.
What is the CVSS score of CVE-2024-29188?
CVE-2024-29188 has a CVSS v3.1 base score of 7.9 (HIGH) with vector string CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:C/C:N/I:H/A:H.
What CWE is associated with CVE-2024-29188?
CVE-2024-29188 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 NuGet dependencies for CVE-2024-29188?
Run the dependency tree command: 'inspect dependencies for wix'. 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-jx4p-m4wm-vvjg",
  "modified" : "2024-03-25T19:42:17Z",
  "published" : "2024-03-25T19:42:17Z",
  "aliases" : [ "CVE-2024-29188" ],
  "summary" : "Malicious directory junction can cause WiX RemoveFoldersEx to possibly delete elevated files",
  "details" : "### Summary\nThe custom action behind WiX's `RemoveFolderEx` functionality could allow a standard user to delete protected directories.\n\n### Details\n`RemoveFolderEx` deletes an entire directory tree during installation or uninstallation. It does so by recursing every subdirectory starting at a specified directory and adding each subdirectory to the list of directories Windows Installer should delete. If the setup author instructed `RemoveFolderEx` to delete a per-user folder from a per-machine installer, an attacker could create a directory junction in that per-user folder pointing to a per-machine, protected directory. Windows Installer, when executing the per-machine installer after approval by an administrator, would delete the target of the directory junction.\n",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:C/C:N/I:H/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "NuGet",
      "name" : "wix"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "3.14.1"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "NuGet",
      "name" : "wix"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "4.0.0"
      }, {
        "fixed" : "4.0.5"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "NuGet",
      "name" : "WixToolset.Util.wixext"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "4.0.5"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/wixtoolset/issues/security/advisories/GHSA-jx4p-m4wm-vvjg"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-29188"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/wixtoolset/wix/commit/2e5960b575881567a8807e6b8b9c513138b19742"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/wixtoolset/wix3/commit/93eeb5f6835776694021f66d4226c262c67d487a"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/wixtoolset/issues"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-59" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-03-25T19:42:17Z",
    "nvd_published_at" : "2024-03-24T20:15:08Z"
  }
}