Study guide · System configuration and Install Tool
Configuring the Install Tool and system settings securely
Many security holes in TYPO3 are not in the code but in the configuration. An open Install Tool, an error page with a stack trace or a host pattern that is too generous is often all an attacker needs. On this page you learn how TYPO3 14 protects the Install Tool, who may enter the System modules and which settings you must check on a live system. As a running example, you take over the website of a bicycle shop at example.org from another agency.
The Install Tool and its two layers of protection
The Install Tool is the tool for setup, maintenance and repair. It also works when TYPO3 no longer runs properly. You reach it through the address of the website with the parameter __typo3_install, for example at example.org followed by a question mark and this parameter. Because the Install Tool needs no backend account, TYPO3 protects it twice out of the box:
- The file
ENABLE_INSTALL_TOOLmust exist. Otherwise the Install Tool is locked. - In addition, you need the Install Tool password. It is independent of all backend user passwords.
In Composer mode, TYPO3 14 creates the file in the folder var/transient by default. TYPO3 also looks for it in the folder config, which is meant for a permanent unlock, and only as a legacy location in typo3conf. The file itself is empty. It is a switch and contains no password.
TYPO3 cleans up a forgotten unlock by itself. If the file is not used for one hour, that is, older than 3600 seconds, TYPO3 deletes it automatically. Every use extends the period. Only if the file contains the text KEEP_FILE does it stay permanently, no matter which folder it is in. On a live system this permanent variant is a risk, and the status report warns about it.
If you do not need the Install Tool on the live system at all, you can go further. The security guidelines name two ways but point out the effects on usability:
- You remove the package
typo3/cms-installfrom the live system. - You block requests with
__typo3_installat the web server or protect them with additional web server authentication.
The Install Tool password
When you take over an instance from another administrator, one of the most important rules applies. Immediately change the Install Tool password and the user name and password of the admin account. The password should be strong and not used anywhere else.
Since TYPO3 14.0 you can also set the password on the command line, with the command install:password:set. Do not confuse it with backend:resetpassword, which only sends a backend user a link to reset the password.
vendor/bin/typo3 install:password:set
vendor/bin/typo3 install:password:set --dry-run --no-interactionThe two options have clear jobs:
- With dry-run, the command only outputs the hash and writes nothing to the configuration.
- With no-interaction, it does not ask but generates a random password.
Together they suit a CI or CD pipeline. You get the password and the hash without any file being changed. You then store both, for example, in a password vault or in environment variables. There is no option for plain text, because TYPO3 never stores the password in plain text.
The command writes the hash to the file settings.php. If the file additional.php sets the value again afterwards, the hash from there still applies. In that case the command does not change the password effectively.
In TYPO3 14 the Install Tool password follows the password policy installTool. It requires at least 8 characters and at least one uppercase letter, one lowercase letter, one digit and one special character. The built-in generator suggests 12 characters.
System maintainers and application context
The admin tools of the Install Tool are also available in the backend under “System”, for example Maintenance and Settings. Who may open them depends on the application context. You set it with the environment variable TYPO3_CONTEXT.
- In Development, all admins open the modules directly. TYPO3 does not require sudo mode there either.
- In Testing and Production, only system maintainers may enter, and they must also confirm with their password via sudo mode.
You register system maintainers in the setting SYS/systemMaintainers, as a list of uids from the table be_users. You maintain it in the Settings module or directly in the file settings.php in the folder config/system. If the setting is missing entirely, TYPO3 treats all admins as system maintainers. So always set the list explicitly.
System maintainers can change central settings, for example trustedHostsPattern. Every additional account with these rights enlarges the attack surface. If one of them is taken over, the attacker owns the whole configuration. So keep the number of system maintainers as small as possible.