- Component Type: TYPO3 CMS
- Subcomponent: Backend User Interface & Install Tool (ext:backend, ext:backend)
- Release Date: May 12, 2020
- Vulnerability Type: Same-Origin Request Forgery
- Affected Versions: 9.0.0-9.5.16, 10.0.0-10.4.1
- Severity: High
- Suggested CVSS:CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:H/E:F/RL:O/RC:C
- References:CVE-2020-11069, CWE-352, CWE-346
It has been discovered that the backend user interface and install tool are vulnerable to same-origin request forgery. A backend user can be tricked into interacting with a malicious resource an attacker previously managed to upload to the web server - scripts are then executed with the privileges of the victims’ user session.
In a worst case scenario new admin users can be created which can directly be used by an attacker. The vulnerability is basically a cross-site request forgery (CSRF) triggered by a cross-site scripting vulnerability (XSS) - but happens on the same target host - thus, it’s actually a same-origin request forgery.
The attacked victim requires an active and valid backend or install tool user session at the time of the attack to be successful.
Update to TYPO3 versions 9.5.17 or 10.4.2 that mitigates the problem described.
The mitigation to this scenario is handled by enforcing a proper HTTP Referer header to ensure a previous authenticated request has originated from the TYPO3 backend user interface or install tool. It does not address the potential availability of cross-site scripting, but aims to mitigate the impact of executing non-authorized actions with the attacked backend user session.
Strong security defaults - Manual actions required
Mentioned HTTP Referer header is enforced by default for relevant URIs. Some proxy servers might remove this HTTP header which would make it necessary to deactivate this protection mechanism. This can be done by disabling $GLOBALS['TYPO3_CONF_VARS']['SYS]['features'][‘security.backend.enforceReferrer’] either using Install Tool’s feature toggles or according deployment techniques.
The deployment of additional mitigation techniques is suggested as described below.
Sudo Mode Extension
This TYPO3 extension intercepts modifications to security relevant database tables, e.g. those storing user accounts or storages of the file abstraction layer. Modifications need to be confirmed again by the acting user by providing their password again - this technique is known as “sudo mode”. This way unintended actions happening in the background can be mitigated.
Content Security Policy
Content Security Policies tell (modern) browsers how resources served a particular site are handled - it is also possible to disallow script executions for specific locations. In a TYPO3 context it is suggested to disallow direct script execution at least for locations /fileadmin/ and /uploads/.
# in fileadmin/.htaccess <IfModule mod_headers.c> Header add Content-Security-Policy "default-src 'self'; script-src 'none';" </IfModule>
The example above for scenarios using Apache web server denies script execution for resources that are directly opened in a browser, e.g. example.org/fileadmin/malicious.html.
Thanks to Matteo Bonaker who reported this issue and to TYPO3 security team member Oliver Hader who fixed the issue.
All security related code changes are tagged so that you can easily look them up in our review system.