Inno Setup incorporates many security measures, not just in Setup and Uninstall but also in the compiler toolchain.
Many of these security measures add defense-in-depth; they do not address specific vulnerabilities.
This topic lists the security measures, focusing on Setup. In general, anything applying to Setup also applies to Uninstall, and the setup loader program (SetupLdr).
Setup employs protections against DLL hijacking (also known as DLL sideloading):
SetupLdr, Setup, and Uninstall create subdirectories under the user's top-level temporary directory (typically %LOCALAPPDATA%\Temp for users other than SYSTEM).
The actual Setup program is extracted to and runs from the subdirectory created by SetupLdr. Storing the file in a subdirectory ensures that Setup cannot unintentionally make use of DLLs or other files that exist in the top-level directory.
The creation of the subdirectories is secured in several ways:
When the top-level temporary directory path is %SystemRoot%\Temp, subdirectories are created with a special access control list (ACL) that contains "allow" entries for only the current user, the built-in Administrators group, and the SYSTEM user. This is necessary because the default ACL on %SystemRoot%\Temp allows all unprivileged users to create files inside subdirectories.
The same ACL is used when the process is running elevated and the top-level temporary directory is on a local drive (any path), except the current user's access is set to "Read & Execute" rather than "Full Control". Although Microsoft does not intend for elevation to define a security boundary, this is done as a defense-in-depth measure to prevent non-elevated processes running under the same user account from writing to the subdirectory.
No sensitive material is written to the temporary directories.
Setup enables Data Execution Prevention (DEP) and Address Space Layout Randomization (ASLR) by default. 64-bit installers support high-entropy ASLR.
See DEPCompatible and ASLRCompatible for more information.
Setup uses a custom path validation function library which is extremely robust and knows about all the various path mechanisms available in Windows, including some very obscure ones. The library is tested against a very large list of possible valid and invalid inputs.
When extracting files from an external archive like a .7z or .zip archive, the library is used to protect against malicious archives.
The RedirectionGuard mitigation
, available on Windows 11 and Windows 10 22H2, blocks traversal of NTFS junctions and symbolic links created by unprivileged users (or any non-elevated processes).
By default, Setup attempts to enable Windows' RedirectionGuard mitigation on its own process. Uninstall also enables RedirectionGuard for its process if it was successfully enabled during the most recent installation of the application.
See RedirectionGuard for more information.
The setup loader program always uses an asInvoker manifest regardless of the PrivilegesRequired setting, and Setup requests elevation only when needed.
When launching other programs for the user, like post-install from the [Run] section, or when the user clicks on a link, Setup ensures these programs are launched unelevated by default, even if Setup itself is running elevated. It achieves this by requesting the setup loader to perform the launch, instead of directly launching the other program itself.
Also, when launching other programs and creating shortcuts, Setup ensures the working directory is never left unspecified.
Setup (and Uninstall) can be digitally signed automatically by the compiler. The compiler can also sign your own original source files for you, or just verify that you did not forget to do this yourself.
After signing, the compiler double-checks that the signature was added without otherwise changing the original file.
See SignTool for more information.
Additionally, an integrated signature-verification capability is included that can be used to detect corruption or tampering in your files at compile time, before files are included in an installer being built, or during installation, before Setup copies external files onto a user's system. This capability is protected against the Time-Of-Check to Time-Of-Use (TOCTOU) problem throughout, and uses strong cryptography.
See .issig Signatures: Introduction for more information.
Setup also uses SHA-256 hashes to verify various components, and you can use these yourself as well. Older hashing algorithms are available, but not used for security purposes by Setup.
Password-protected encryption is available, using strong XChaCha20 encryption and PBKDF2-HMAC-SHA256 key derivation. All salts and nonces are generated using a cryptographically secure random number generator (CSPRNG).
See Encryption for more information.
Setup can securely download files from remote servers, and verify their integrity, without using any [Code]. It uses these protections:
Setup:
Compiler:
IDE:
Besides securing Inno Setup itself, we have also taken many steps to ensure the integrity of Inno Setup releases:
(SBOM) is available. Of the named sources, only LZMA SDK is an integral part of the Setup program, and only in a reduced form.
and accompanied with .issig signature files you can use to detect corruption or tampering before running them. For more details, see Verifying Inno Setup Downloads
.We welcome good-faith security reports:
privately before making it public.
, User Account Control (UAC) elevation is a convenience feature, not a security boundary.