Study guide · Security
Advising on and implementing security in TYPO3 projects
Security is not a state but a process. As a consultant you do not harden servers yourself. But you need to know what has to be done, who does it and how to explain a security announcement to a client. On this page we build a security concept step by step, all the way to an emergency.
The example: Seetal holiday region
Our client is the tourist board Seetal holiday region. Twelve editors maintain the website. Hosts have their own area with a login, and a map widget and a booking partner bring third-party services onto the site. Our agency looks after the project.
First we clarify what needs protecting. The CIA triad names three security goals:
- Confidentiality: only authorised people see the data, for example the addresses of the hosts.
- Integrity: data stays unaltered, for example the prices.
- Availability: the website can be reached, especially in booking season.
A vulnerability that only exposes data mainly affects confidentiality. This view helps later when you read security announcements.
How attackers work
Most attacks follow a few patterns:
- Cross-site scripting, XSS for short: foreign script code gets into a page through unfiltered input, for example a comment field. It then runs in other visitors' browsers and can read their cookies, for example.
- SQL injection: manipulated input changes the database query. An attacker can then read other people's data or create an administrator account.
- Arbitrary code execution, also called remote code execution: the attacker runs their own code on the server, often through unsafe uploads, code injection or deserialisation. This can mean full control over the installation.
- Cross-site request forgery, CSRF for short: a logged-in user is lured to a prepared page. Their browser then performs an action with their permissions without them noticing. To prevent this, TYPO3 adds secret tokens to forms and links in the backend.
- Information disclosure: error messages or debug output reveal internal details.
This is how developers prevent them. Against XSS they escape every output for its context. For HTML, Fluid does this automatically. Against SQL injection they use prepared statements with parameters. The Doctrine-based database API of TYPO3 works this way, for example with createNamedParameter(). Against code execution they restrict uploads. The fileDenyPattern prevents uploading PHP files, for example. A firewall can add protection, but it never replaces secure code.
You can learn more from OWASP, the Open Web Application Security Project, and from the chapter “Security guidelines” in “TYPO3 Explained”. It contains advice for administrators, integrators, developers and editors.
Hardening the installation
Hardening means making the attack surface small. The Seetal concept includes these building blocks:
- Updates of TYPO3 and all extensions are the most important measure. After a security announcement anyone can compare the old and the new code and find the hole. Attackers scan automatically for systems with known weaknesses. A patch release such as 14.3.6 to 14.3.7 is usually straightforward.
- HTTPS for frontend and backend: TLS encrypts the connection. Nobody can read or change login data and form data, and the certificate confirms the identity of the website. HTTPS does not encrypt the database, though.
- MFA for backend users, at least for administrators.
- A small attack surface: extensions you do not need are removed.
- Server access only through encrypted protocols such as SFTP or SSH.
- No internals for outsiders:
displayErrorsstays restrictive on production. ThedevIPmasklists only developer addresses, because an asterisk would show debug output to everyone.
The Install Tool can be opened without a backend account, so it has two layers of protection. The file ENABLE_INSTALL_TOOL must exist, and you need a separate Install Tool password, independent of all backend passwords. The file should not stay in place permanently. TYPO3 removes it by itself after one hour without use. Only if it contains the text KEEP_FILE does it stay, and the status report warns about it.
The system modules such as Settings and Maintenance are especially powerful. In the “Production” context only administrators listed as system maintainers may enter. First they enter their own password or the Install Tool password again, the so-called sudo mode. In the “Development” context every administrator may enter without this extra step.
TypoScript stays with administrators. From TypoScript you can call PHP code. Anyone allowed to edit templates could therefore run arbitrary code and create an admin account. That is why there is no level between editor and administrator that may change TypoScript.
TypoScript itself can also contain an SQL injection. This happens when the object CONTENT queries records and a value from the URL ends up directly in the where condition. The right way is a marker: TYPO3 then inserts the value escaped and in quotes. The rule is never to use data from an outside source without checking it.
page.10 = CONTENT
page.10 {
table = tt_content
select {
pidInList = 123
where = uid=###CONTENTID###
markers {
CONTENTID.data = GP:fooid
}
}
}Keeping watch: status report, logs and warning emails
Two modules under Administration belong in every maintenance routine. Reports contains the status report. Its security section points to things like an unencrypted connection, the trustedHostsPattern, the fileDenyPattern and an enabled Install Tool. Log lists logins, logouts, failed logins and errors.
To analyse an attack you need more sources. TYPO3 writes files to the directory var/log through its logging API. Then there are the access and error logs of the web server and the logs of SSH, FTP and the database. On a compromised system, however, even these displays may have been tampered with.
Locked login: in the backend TYPO3 allows five failed attempts within 15 minutes by default. After that it reports that the login is blocked until a certain time. The settings are called loginRateLimit and loginRateLimitInterval. The frontend has its own limit, by default ten failed attempts in 15 minutes.
Warning emails: the address in warning_email_addr is told about every login attempt in the Install Tool. It also receives an email when there were more than three failed backend logins within one hour. Wrong MFA codes count as well. Since TYPO3 14 the user also gets an email whenever a wrong MFA code was entered for their account. With warning_mode there is also an email on every login or on every admin login. By default the address is empty.
Passwords and multi-factor login
Secure passwords are long and mix upper and lower case letters, numbers and special characters. The TYPO3 guidelines name at least eight characters, without personal details and without dictionary words. Every account gets its own password. When one service is hacked, attackers try the stolen credentials on other services. A password manager helps with this. TYPO3 enforces such rules through password policies. The default policy requires at least eight characters with upper and lower case letters, a number and a special character.
Multi-factor authentication, MFA for short, asks for a second proof after the password. The Core ships two providers:
- TOTP, the time-based one-time password: an authenticator app creates a new six-digit code every 30 seconds. After three wrong codes in a row TYPO3 locks this provider.
- Recovery codes as a fallback in case the smartphone is missing. They can only be activated when another provider is already active. You keep them separate from the device.
Further providers such as WebAuthn or FIDO2, YubiKey, HOTP or email come from extensions. The Core does not contain a WebAuthn provider.
- The editor opens their User Settings and selects the tab “Account security”.
- For TOTP they scan the QR code with their authenticator app or type in the shared secret.
- They confirm with the first code from the app.
- Then they activate the recovery codes and store them safely.
Enforcing MFA works with the global setting requireMfa. The value 0 means no requirement and is the default. 1 requires MFA from everyone, 2 only from users who are not administrators, 3 only from administrators and 4 only from system maintainers. Anyone who is required to use MFA and has no provider yet goes straight to the setup after login.
For finer control you use User TSconfig for individual users or groups. With auth.mfa.required you require MFA in addition. This value takes precedence over the global setting. With auth.mfa.disableProviders you remove providers from the selection. With auth.mfa.recommendedProvider you recommend a provider.
auth.mfa.disableProviders := addToList(totp)Lost smartphone, no recovery codes: “Forgot password” does not help here. An administrator opens the user record and, in the field “Multi-factor authentication”, deactivates MFA completely or the locked provider. This cannot be undone. Afterwards the editor sets up MFA again.
Central login and a custom backend address
Single sign-on, SSO for short, means that users log in once centrally, for example with their company account, and are then logged in to TYPO3 as well. The Core ships an extensible authentication API. The connection to LDAP or an SSO service comes from an extension, for example ig_ldap_sso_auth. The benefits are accounts in one place, central policies such as MFA, and people who leave are locked out everywhere at once. A shared account for all editors, on the other hand, goes against every security recommendation.
The backend address is /typo3 by default. Since TYPO3 13 you change it with the setting entryPoint, to a path such as /editors or to a domain of its own. You set it in the module Settings under System, in the area “Configure Installation-Wide Options”, or in settings.php or additional.php. Since TYPO3 14 the Install Tool follows this entry point too.
$GLOBALS['TYPO3_CONF_VARS']['BE']['entryPoint'] = 'https://editors.example.org';
$GLOBALS['TYPO3_CONF_VARS']['SYS']['cookieDomain'] = '.example.org';The second line is needed for a subdomain of its own. Otherwise the backend cookie only applies to the editors' domain, and the frontend does not recognise the logged-in editor. Preview and Admin Panel then do not work.
Honest advice includes these points:
- A custom address is easy to remember and makes automated searches for the login harder.
- But it is security by obscurity and replaces neither MFA nor updates.
- Only the routing changes. Assets are still served from the previous paths, for example
_assets. - A custom web server configuration may need to be adjusted.
Content Security Policy
A Content Security Policy, CSP for short, is an HTTP header with rules about which sources scripts, images, frames and other resources may come from. The browser blocks everything else and reports the violation. This reduces the impact of XSS, but it does not replace secure programming.
TYPO3 ships a CSP API for frontend and backend. For the frontend you activate it through the feature flags for enforcing or reporting. Or you activate it per site in the csp.yaml of the site configuration, with the disposition “enforce” or “report”. In report-only mode the website sends the header Content-Security-Policy-Report-Only. Violations are then only reported, not blocked. TYPO3 receives the reports and shows them in the module “Content Security Policy” under System.
Files in fileadmin: editors upload SVG or HTML files that may contain script code. The web server delivers these files directly, without TYPO3. So TYPO3's CSP does not apply there. The documentation therefore recommends a strict header from the web server for public storage folders, for example in a .htaccess file in fileadmin. There is also an example for NGINX.
Content-Security-Policy: default-src 'self'; script-src 'none'; style-src 'none'; object-src 'none'The Security Team and how to report
The TYPO3 Security Team handles vulnerabilities in the Core and in extensions. You report a vulnerability only confidentially by email to security@typo3.org, also for your own extensions. It does not belong anywhere public, so not in Forge, forums, Slack or social networks. This leaves time for a fix before attackers know about the hole. This is called responsible disclosure.
A good report describes the weakness precisely and names the affected versions, the steps to reproduce it and the impact. Other people's credentials never belong in it. The team aims to reply within two working days. If you feel overlooked, send a reminder after a few days.
The team does not write the fix for an extension itself. The rules also apply to your own extensions.
There are two things the team deliberately does not do. It does not review individual extensions or projects on request, not even for a fee. For audits the documentation points to experienced agencies such as TYPO3 Solution Partners, whose qualifications you should still check. And Core vulnerabilities that can only be exploited with administrator rights, for example through the Install Tool, count as normal bugs. Their fix goes through the public Core review, without a bulletin of its own. That is another reason to hand out admin accounts sparingly.
Reading and assessing security announcements
Security bulletins are published on typo3.org in the Security area. They are announced on the read-only mailing list “TYPO3 Announce”, which everyone looking after TYPO3 sites should subscribe to. Every announcement has an identifier:
- TYPO3-CORE-SA with year and running number concerns the Core. TYPO3-CORE-SA-2026-012 is the twelfth Core announcement of 2026.
- TYPO3-EXT-SA with year and number concerns extensions.
- TYPO3-PSA is a public service announcement, a security notice without an accompanying software release. It covers topics such as Apache, NGINX, MySQL or PHP, misconfigurations or the typo3.org infrastructure, and gives advice on how to fix them.
A bulletin names the affected and the fixed versions, the type of weakness and a CVSS rating. It never contains instructions on how to exploit the hole. For critical issues the team sometimes announces the date and time of a bulletin in advance on “TYPO3 Announce”. This lets administrators schedule the update without any details becoming known beforehand.
Keep three abbreviations apart:
- CVSS, the Common Vulnerability Scoring System, rates severity with a score from 0 to 10 and a vector. Part of it is how strongly confidentiality, integrity and availability are affected. The Security Team has published a CVSS rating with every bulletin since 2010. Scores from 9.0 upwards count as critical.
- CVE, Common Vulnerabilities and Exposures, identifies one specific vulnerability in a product.
- CWE, the Common Weakness Enumeration, catalogues types of weaknesses, for example CWE-79 for XSS and CWE-89 for SQL injection.
The emergency: the website has been hacked
One morning the Seetal home page shows foreign advertising links. Typical signs of an attack are content or redirects that nobody in the editorial team created. Others are foreign code in the HTML, unknown files, unusual traffic, warnings from search engines or browsers, and messages from visitors.
A look at the home page is not enough. Many attacks show manipulated content only to certain IP addresses, browsers or search engines, or only at certain times. That is why you check files, the database, the server configuration such as .htaccess, and the logs.
- Take the website or the server offline. As long as the hole is open, the attacker can keep doing damage.
- Secure the server and the log files, for example from Apache, SSH, FTP, MySQL and the system. Never delete the logs.
- Find the point of entry. Without this analysis the hole stays open and the attack happens again.
- Clean up or restore a backup from before the attack. Then close the hole.
- Go back online and keep the system under close observation.
Attackers often leave backdoors, for example inconspicuous new backend users or hidden PHP files. So you check users and files, change all passwords and credentials, and monitor the system closely over the following months.
Personal data: if names and email addresses from a form may have been stolen, this is a personal data breach. Under Article 33 of the GDPR the controller usually has to report it to the supervisory authority within 72 hours. The exception is a breach that is unlikely to result in a risk to the people concerned. If the risk is high, Article 34 requires informing those people as well. This applies to far more than credit card data, and the Security Team does not report anything on the client's behalf. The controller here is the tourist board, often advised by its data protection officer. The course “Recht, Datenschutz und KI” covers this in more depth.
Key points
- The CIA triad: confidentiality, integrity, availability.
- Fluid escaping helps against XSS, prepared statements and TypoScript markers against SQL injection, restricted uploads against code execution.
- Updates, HTTPS, MFA, few extensions and SFTP or SSH are the basis of any hardening.
- The Install Tool needs
ENABLE_INSTALL_TOOLand its own password. On production, the system modules require system maintainers and sudo mode. - The backend locks after five failed attempts in 15 minutes. The warning address reports Install Tool logins and more than three failures per hour.
- The Core ships TOTP and recovery codes.
requireMfaand User TSconfig control who must use MFA. - A custom backend address is security by obscurity. A subdomain of its own needs the
cookieDomain. - Introduce a CSP with report-only first. For fileadmin the web server sets a strict header.
- Vulnerabilities go confidentially to security@typo3.org, and bulletins come through “TYPO3 Announce”.
- After a hack: offline, secure, analyse, clean up, monitor, and remember the 72 hours.
Terms
- CIA triad
- The security goals confidentiality, integrity and availability.
- XSS
- Injected script code that runs in other visitors' browsers.
- CSRF
- A planted action that a logged-in user performs with their own permissions without noticing.
- System maintainer
- Administrator with access to the system modules.
- Sudo mode
- Asking for the password again before especially powerful modules.
- TOTP
- Time-based one-time password from an authenticator app.
- SSO
- Single sign-on, log in once centrally and be logged in everywhere.
- CSP
- Header listing the allowed sources for scripts and other resources.
- PSA
- Public service announcement, a security notice without a software release.
- CVSS
- Severity of a vulnerability on a scale from 0 to 10.
- CVE
- Identifier of one specific vulnerability.
- CWE
- Catalogue of types of weaknesses.