MediumGHSA-w6x2-jg8h-p6mpBIT-typo3-2023-30451CVE-2023-30451

Path Traversal in TYPO3 File Abstraction Layer Storages

Published 13 Feb 2024 · Updated 20 Feb 2024

Affected packages

Affected
>=8.0.0 <8.7.57
Fixed in
8.7.57
Update to the fixed version for your release line, for example:composer require typo3/cms-core:^8.7.57
Affected
>=9.0.0 <9.5.46
Fixed in
9.5.46
Update to the fixed version for your release line, for example:composer require typo3/cms-core:^9.5.46
Affected
>=10.0.0 <10.4.43
Fixed in
10.4.43
Update to the fixed version for your release line, for example:composer require typo3/cms-core:^10.4.43
Affected
>=11.0.0 <11.5.35
Fixed in
11.5.35
Update to the fixed version for your release line, for example:composer require typo3/cms-core:^11.5.35
Affected
>=12.0.0 <12.4.11
Fixed in
12.4.11
Update to the fixed version for your release line, for example:composer require typo3/cms-core:^12.4.11
Affected
>=13.0.0 <13.0.1
Fixed in
13.0.1
Update to the fixed version for your release line, for example:composer require typo3/cms-core:^13.0.1

Details

Problem

Configurable storages using the local driver of the File Abstraction Layer (FAL) could be configured to access directories outside of the root directory of the corresponding project. The system setting in BE/lockRootPath was not evaluated by the file abstraction layer component. An administrator-level backend user account is required to exploit this vulnerability.

Solution

Update to TYPO3 versions 8.7.57 ELTS, 9.5.46 ELTS, 10.4.43 ELTS, 11.5.35 LTS, 12.4.11 LTS, 13.0.1 that fix the problem described.

ℹ️ Strong security defaults - Manual actions required

_see Important: #102800 changelog_

Assuming that a web project is located in the directory /var/www/example.org (the "project root path" for Composer-based projects) and the publicly accessible directory is located at /var/www/example.org/public (the "public root path"), accessing resources via the File Abstraction Layer component is limited to the mentioned directories.

To grant additional access to directories, they must be explicitly configured in the system settings of $GLOBALS['TYPO3_CONF_VARS']['BE']['lockRootPath'] - either using the Install Tool or according to deployment techniques. The existing setting has been extended to support multiple directories configured as an array of strings.

Example:

$GLOBALS['TYPO3_CONF_VARS']['BE']['lockRootPath'] = [
  ‘/var/shared/documents/’,
  ‘/var/shared/images/’,
];

❗ Storages that reference directories not explicitly granted will be marked as "offline" internally - no resources can be used in the website's frontend and backend context.

Credits

Thanks to TYPO3 core & security team members Oliver Hader and Benjamin Franzke who fixed the issue.

References

Is GHSA-w6x2-jg8h-p6mp in any of your client repos?

Checking one package by hand is fine. Checking it across forty client projects is not. NPMscan reads the lockfiles in every GitHub repo you pick, finds each project with an affected typo3/cms-core, and gives you the command that fixes it.

References

Advisory data from OSV.dev (opens OSV.dev in a new tab), refreshed daily.