You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Windows uninstaller runs from %TEMP%, which other accounts may write #1530
The Windows uninstaller still runs from %TEMP%, so when TEMP is a folder other accounts can write (such as C:\Temp), another local user could replace it before it starts.
Cause
Apps & Features runs "<install root>\uninstall.exe". Every NSIS uninstaller first copies itself to %TEMP%\~nsu<N>.tmp\Un.exe and runs that copy with _?=<install root>, so it can delete its own file (NSIS Main.c, the ~nsu%X.tmp loop). NSIS locks that folder down only when the uninstaller is elevated (UserIsAdminGrpMember). Ours runs as the user, so the folder inherits TEMP's permissions. No uninstaller script runs before the copy starts, so the .nsi cannot change this.
Scope
This existed before #1518, and it affects every per-user NSIS uninstaller.
It needs all three: TEMP outside the profile, writable by other accounts; a hostile second local account; and the user uninstalling.
Register an uninstall command that starts somewhere private, for example maple-agent.exe --uninstall. That command would copy uninstall.exe into a protected per-run folder under %LOCALAPPDATA%\Maple Work Installer Staging, check its signature, and run it with _?=<install root>. This keeps the existing native checks, and the uninstaller can still delete the installed copy.
How to test
Use the QA VM windows-11:
Set TEMP=C:\Temp and grant Users:Modify on it.
Uninstall from Apps & Features while a watcher lists C:\Temp\~nsu*. Today Un.exe appears there.
Confirm uninstall still removes the root and shortcuts.
Activity