[BUGFIX] Allow multiple referrer types in backend main route
With TYPO3-CORE-SA-2020-006 (SSRF via XSS) a strict referrer handling has been introduced to avoid the TYPO3 backend being called from other non same-origin locations. In case a HTTP referrer header was empty the system tried to refresh the view - otherwise the request was denied completely. It turned out that this scenario was probably too strict, disabling feature `security.backend.enforceReferrer` was the only work-around for site administrators. This change adds new options for handling referrers in backend routes: * refresh-empty (existed already): refresh in case referrer is empty * refresh-same-site: refresh in case referrer is on same site, like `https://example.org/?eID=auth` calling `https://example.org/typo3/` * refresh-always: refresh always in case there is not valid referrer TYPO3's main backend route is using `refresh-always` now to be more relaxed on handling same-site and cross-site referrers as well. The term "refreshing" relates to trigger a reload in the browser to get the referrer of the current location. This still block direct CSRF/SSRF requests since the refreshing HTML instructions are delivered back to the client. Besides that, cross-site requests are covered by the `same-site` cookie policy, and existing CSRF tokens. Resolves: #91396 Releases: master, 9.5 Change-Id: Ib3756671fa60c6f41ba992d0e645f03da1730d19 Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/64492 Tested-by:Susanne Moog <look@susi.dev> Tested-by:
TYPO3com <noreply@typo3.com> Tested-by:
Richard Haeser <richard@maxserv.com> Reviewed-by:
Susanne Moog <look@susi.dev> Reviewed-by:
Richard Haeser <richard@maxserv.com>
Showing
- typo3/sysext/backend/Configuration/Backend/Routes.php 1 addition, 1 deletiontypo3/sysext/backend/Configuration/Backend/Routes.php
- typo3/sysext/core/Classes/Http/Security/ReferrerEnforcer.php 54 additions, 7 deletionstypo3/sysext/core/Classes/Http/Security/ReferrerEnforcer.php
- typo3/sysext/core/Tests/Unit/Http/Security/ReferrerEnforcerTest.php 183 additions, 0 deletions...xt/core/Tests/Unit/Http/Security/ReferrerEnforcerTest.php
Please register or sign in to comment