CVE-2021-41113 (PHP, published 2021-10-05T18:15Z)
Description: value: TYPO3 is an open source PHP based web content management system released under the GNU GPL. It has been discovered that the new TYPO3 v11 feature that allows users to create and share deep links in the backend user interface is vulnerable to cross-site-request-forgery. The impact is the same as described in TYPO3-CORE-SA-2020-006 (CVE-2020-11069). However, it is not limited to the same site context and does not require the attacker to be authenticated. In a worst case scenario, the attacker could create a new admin user account to compromise the system. To successfully carry out an attack, an attacker must trick his victim to access a compromised system. The victim must have an active session in the TYPO3 backend at that time. The following Same-Site cookie settings in $GLOBALS[TYPO3_CONF_VARS][BE][cookieSameSite] are required for an attack to be successful: SameSite=strict: malicious evil.example.org invoking TYPO3 application at good.example.org and SameSite=lax or none: malicious evil.com invoking TYPO3 application at example.org. Update your instance to TYPO3 version 11.5.0 which addresses the problem described.
Severity: MEDIUM (CVSS v3 base score: 8.8)
Weakness: CWE-352 \u2014 Cross-Site Request Forgery (CSRF)
The web application does not, or can not, sufficiently verify whether a well-formed, valid, consistent request was intentionally provided by the user who submitted the request.
Repository: https://github.com/TYPO3/typo3
Files changed:
typo3/sysext/backend/Classes/Routing/RouteRedirect.php
typo3/sysext/backend/Configuration/Backend/Routes.php
typo3/sysext/core/Documentation/Changelog/11.2/Feature-93988-BackendModuleURLsReflectIntoBrowserAddressbar.rst
Commit message: [SECURITY] Mitigate CSRF in backend deeplinking

This change adds a "redirect" section to disable
backend deeplinking for non-module routes by default,
and only allows for included / defined GET paramaters
for such routes.

Resolves: #94496
Releases: master
Change-Id: Iab3bcbfe42d44cd12c5748e3b0cddb4478dbe975
Security-Bulletin: TYPO3-CORE-SA-2021-014
Security-References: CVE-2021-41113
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/71437
Tested-by: Oliver Hader <oliver.hader@typo3.org>
Reviewed-by: Oliver Hader <oliver.hader@typo3.org>


Vulnerable code:

Fixed code:
use TYPO3\CMS\Core\Utility\ArrayUtility;
        $settings = $route->getOption('redirect');
        if (($settings['enable'] ?? false) !== true) {
            throw new RouteNotFoundException(
                sprintf('Route "%s" cannot be redirected', $this->name),
                1627407511
            );
        }
        // Only use allowed arguments, if set, otherwise no parameters are allowed
        if (!empty($settings['parameters'])) {
            $this->parameters = ArrayUtility::intersectRecursive($this->parameters, (array)$settings['parameters']);
        } else {
            $this->parameters = [];
        }
        'redirect' => [
            'enable' => true,
            'parameters' => [
                'id' => true,
            ],
        ],
        'redirect' => [
            'enable' => true,
            'parameters' => [
                'id' => true,
            ],
        ],
        'redirect' => [
            'enable' => true,
            'parameters' => [
                'id' => true,
            ],
        ],
        'redirect' => [
            'enable' => true,
            'parameters' => [
                'edit' => true,
            ],
        ],
This feature is enabled for all modules. For non-module routes this feature
will only work if configured via `Routes.php` by adding a `redirect` section:

:php:
    'redirect' => [
        'enable' => true,
        // Transferred parameters when redirecting
        'parameters' => [
            'my-parameter-name' => true
        ]
    ],