Malicious directory junction can cause WiX RemoveFoldersEx to possibly delete elevated files
wixtoolset issues
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| wix NuGet |
|
|
| WixToolset.Util.wixext NuGet |
|
|
wixtoolset issues
| Product | Affected | Fixed in |
|---|---|---|
| wix NuGet |
|
|
| WixToolset.Util.wixext NuGet |
|
|
WiX toolset lets developers create installers for Windows Installer, the Windows installation engine. The custom action behind WiX's `RemoveFolderEx` functionality could allow a standard user to delete protected directories. `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. This vulnerability is fixed in 3.14.1 and 4.0.5.
From the CVE record · GitHub_M
WiX Toolset’s RemoveFolderEx custom action can follow a directory junction and delete a protected directory. A local standard user can exploit this if a per-machine installer is configured to remove a per-user folder, the user places a junction there, and an administrator approves installation or uninstallation.
Check installations using NuGet wix versions below 3.14.1 or from 4.0.0 to below 4.0.5, or NuGet WixToolset.Util.wixext versions below 4.0.5.