Security Measures

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).

DLL hijacking protection

Setup employs protections against DLL hijacking (also known as DLL sideloading):

Temporary directory security

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:

No sensitive material is written to the temporary directories.

Memory protection

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.

Path security

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.

Redirection mitigation

The RedirectionGuard mitigation [external link], 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.

Program launch security

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.

Corruption or tampering detection

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.

Encryption

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.

Download security

Setup can securely download files from remote servers, and verify their integrity, without using any [Code]. It uses these protections:

Other security measures

Setup:

Compiler:

IDE:

Supply-chain security

Besides securing Inno Setup itself, we have also taken many steps to ensure the integrity of Inno Setup releases:

Vulnerability management

We welcome good-faith security reports: