8.6high
Unrestricted File Upload in Form Framework
- Severity
- 8.6high CVSS:3.1 by GitHub_M
- Exploit likelihood
- 1.63% (higher than 76% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- GHSA-2r6j-862c-m2v2BIT-TYPO3-2021-21355
Description
TYPO3 is an open source PHP based web content management system. In TYPO3 before versions 8.7.40, 9.5.25, 10.4.14, 11.1.1, due to the lack of ensuring file extensions belong to configured allowed mime-types, attackers can upload arbitrary data with arbitrary file extensions - however, default _fileDenyPattern_ successfully blocked files like _.htaccess_ or _malicious.php_. Besides that, _UploadedFileReferenceConverter_ transforming uploaded files into proper FileReference domain model objects handles possible file uploads for other extensions as well - given those extensions use the Extbase MVC framework, make use of FileReference items in their direct or inherited domain model definitions and did not implement their own type converter. In case this scenario applies, _UploadedFileReferenceConverter_ accepts any file mime-type and persists files in the default location. In any way, uploaded files are placed in the default location _/fileadmin/user_upload/_, in most scenarios keeping the submitted filename - which allows attackers to directly reference files, or even correctly guess filenames used by other individuals, disclosing this information. No authentication is required to exploit this vulnerability. This is fixed in versions 8.7.40, 9.5.25, 10.4.14, 11.1.1.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| TYPO3 TYPO3.CMS | >= 8.0.0, <= 8.7.39, >= 9.0.0, <= 9.5.24, >= 10.0.0, <= 10.4.13, >= 11.0.0, <= 11.1.0 | CVE List |
| typo3/cms-form (Packagist) | from 8.0.0 before 8.7.40, from 9.0.0 before 9.5.25, from 10.0.0 before 10.4.14, from 11.0.0 before 11.1.1 | GitHub Advisory Database |
| typo3/cms-core (Packagist) | from 10.0.0 before 10.4.14, from 11.0.0 before 11.1.1, from 9.0.0 before 9.5.25 | GitHub Advisory Database |
| typo3/cms (Packagist) | from 10.0.0 before 10.4.14, from 11.0.0 before 11.1.1, from 9.0.0 before 9.5.25 | GitHub Advisory Database |
| typo3 typo3 | from 8.0.0 before 8.7.40, from 9.0.0 before 9.5.25, from 10.0.0 before 10.4.14, from 11.0.0 before 11.1.1 | NVD |
| typo3 (Bitnami) | from 8.0.0 before 8.7.40, from 9.0.0 before 9.5.25, from 10.0.0 before 10.4.14, from 11.0.0 before 11.1.1 | Bitnami Vulnerability Database |
All scores
| GitHub_M | 8.6high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:H/A:L |
| GitHub | 8.6high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:H/A:L/E:F/RL:O/RC:C |
| NVD | 8.6high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:H/A:L |
| NVD | 7.5high CVSS:2.0 | AV:N/AC:L/Au:N/C:P/I:P/A:P |
| Bitnami Vulnerability Database | high rating |
Classification
What each source says
CVE List
TYPO3 is an open source PHP based web content management system. In TYPO3 before versions 8.7.40, 9.5.25, 10.4.14, 11.1.1, due to the lack of ensuring file extensions belong to configured allowed mime-types, attackers can upload arbitrary data with arbitrary file extensions - however, default _fileDenyPattern_ successfully blocked files like _.htaccess_ or _malicious.php_. Besides that, _UploadedFileReferenceConverter_ transforming uploaded files into proper FileReference domain model objects handles possible file uploads for other extensions as well - given those extensions use the Extbase MVC framework, make use of FileReference items in their direct or inherited domain model definitions and did not implement their own type converter. In case this scenario applies, _UploadedFileReferenceConverter_ accepts any file mime-type and persists files in the default location. In any way, uploaded files are placed in the default location _/fileadmin/user_upload/_, in most scenarios keeping the submitted filename - which allows attackers to directly reference files, or even correctly guess filenames used by other individuals, disclosing this information. No authentication is required to exploit this vulnerability. This is fixed in versions 8.7.40, 9.5.25, 10.4.14, 11.1.1.
GitHub Advisory Database
Problem
Due to the lack of ensuring file extensions belong to configured allowed mime-types, attackers can upload arbitrary data with arbitrary file extensions - however, default fileDenyPattern successfully blocked files like .htaccess or malicious.php.
TYPO3 Extbase extensions, which implement a file upload and do not implement a custom TypeConverter to transform uploaded files into FileReference domain model objects are affected by the vulnerability as well, since the UploadedFileReferenceConverter of ext:form handles the file upload and will accept files of any mime-type which are persisted to the default location.
In any way, uploaded files are placed in the default location /fileadmin/user_upload/, in most scenarios keeping the submitted filename - which allows attackers to directly reference files, or even correctly guess filenames used by other individuals, disclosing this information.
No authentication is required to exploit this vulnerability.
Solution
Update to TYPO3 versions 8.7.40, 9.5.25, 10.4.14, 11.1.1 that fix the problem described.
Type converter UploadedFileReferenceConverter is not registered globally anymore and just handles uploaded files within the scope of the Form Framework. Guessable storage location has changed from /fileadmin/user_upload/form_<random-hash>/ to /fileadmin/form_uploads/<random-40-bit>. Allowed mime-types must match expected file extensions (e.g. application/pdf must be .pdf, and cannot be .html).
Extbase extensions, who rely on the global availability of the UploadedFileReferenceConverter must now implement a custom TypeConverter to handle file uploads or explicitly implement the ext:form UploadedFileReferenceConverter with appropriate setting for accepted mime-types.
Credits
Thanks to Sebastian Michaelsen, Marc Lindemann, Oliver Eglseder, Markus Volkmer, Jakob Kunzmann, Johannes Regner, Richie Lee who reported this issue, and to TYPO3 core & security team members Oliver Hader & Benni Mack, as well as TYPO3 contributor Ralf Zimmermann who fixed the issue.
References
NVD (es)
TYPO3 es un sistema de gestión de contenidos web de código abierto basado en PHP. En TYPO3 versiones anteriores a la 8.7.40, 9.5.25, 10.4.14, 11.1.1, debido a la falta de garantía de que las extensiones de archivo pertenecen a los tipos mime permitidos configurados, los atacantes pueden subir datos arbitrarios con extensiones de archivo arbitrarias - sin embargo, _fileDenyPattern_ por defecto bloquea con éxito archivos como _.htaccess_ o _malicious.php_. Además de eso, _UploadedFileReferenceConverter_ transforma los archivos subidos en objetos de modelo de dominio FileReference apropiados y maneja posibles subidas de archivos para otras extensiones también - dado que esas extensiones usan el marco MVC de Extbase, hacen uso de elementos FileReference en sus definiciones de modelo de dominio directas o heredadas y no implementaron su propio convertidor de tipos. En caso de que este escenario se aplique, _UploadedFileReferenceConverter_ acepta cualquier tipo mime de archivo y persigue los archivos en la ubicación predeterminada. De cualquier manera, los archivos subidos se colocan en la ubicación por defecto _/fileadmin/user_upload/_, en la mayoría de los escenarios manteniendo el nombre del archivo enviado - lo que permite a los atacantes referenciar directamente los archivos, o incluso adivinar correctamente los nombres de los archivos utilizados por otras personas, revelando esta información. No se requiere autenticación para explotar esta vulnerabilidad. Esto está corregido en las versiones 8.7.40, 9.5.25, 10.4.14, 11.1.1
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2021-21355 changed 2024-08-03 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-2r6j-862c-m2v2 changed 2026-07-08 | CC-BY-4.0 |
| NVD | CVE-2021-21355 changed 2026-06-17 | Public domain |
| Bitnami Vulnerability Database | BIT-TYPO3-2021-21355 changed 2024-03-06 | Apache-2.0 |