[SECURITY] Limit user session to cookie domain
Given that there are two sites `site-a.com` and `site-b.com` in the same TYPO3 installation, it was possible to reuse a session cookie that was generated for `site-a.com` in `site-b.com`. Since there are scenarios, where this is the expected behavior – when sharing sessions across sub domains, so that an explicit cookieDomain needs to be configured – user sessions signatures are now salted with the desired cookie domain, so that a cookie can only be used on the domain that the cookie was created for. Testing framework will need to be adapted in a subsequent patch, but for the time being – and for compatiblity with possible 3rd party authenticators – legacy tokens will be accepted, but not created by TYPO3 core. Resolves: #100885 Releases: main, 12.4, 11.5 Change-Id: I0d1c314c6e206ac12604ba6f859af78b958651dd Security-Bulletin: TYPO3-CORE-SA-2023-006 Security-References: CVE-2023-47127 Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/81729 Tested-by:Oliver Hader <oliver.hader@typo3.org> Reviewed-by:
Oliver Hader <oliver.hader@typo3.org>
Showing
- typo3/sysext/core/Classes/Http/CookieScope.php 27 additions, 0 deletionstypo3/sysext/core/Classes/Http/CookieScope.php
- typo3/sysext/core/Classes/Http/CookieScopeTrait.php 72 additions, 0 deletionstypo3/sysext/core/Classes/Http/CookieScopeTrait.php
- typo3/sysext/core/Classes/Http/SetCookieService.php 15 additions, 45 deletionstypo3/sysext/core/Classes/Http/SetCookieService.php
- typo3/sysext/core/Classes/Session/UserSession.php 30 additions, 5 deletionstypo3/sysext/core/Classes/Session/UserSession.php
- typo3/sysext/core/Classes/Session/UserSessionManager.php 9 additions, 3 deletionstypo3/sysext/core/Classes/Session/UserSessionManager.php
- typo3/sysext/core/Tests/Unit/Authentication/BackendUserAuthenticationTest.php 2 additions, 1 deletion...sts/Unit/Authentication/BackendUserAuthenticationTest.php
- typo3/sysext/core/Tests/Unit/Session/UserSessionManagerTest.php 33 additions, 6 deletions...sysext/core/Tests/Unit/Session/UserSessionManagerTest.php
- typo3/sysext/core/Tests/Unit/Session/UserSessionTest.php 3 additions, 1 deletiontypo3/sysext/core/Tests/Unit/Session/UserSessionTest.php
- typo3/sysext/frontend/Tests/Functional/Authentication/FrontendUserAuthenticationTest.php 19 additions, 2 deletions...ctional/Authentication/FrontendUserAuthenticationTest.php
Please register or sign in to comment