Study guide · Uploads, files and extensions

Safe uploads, protected files and trustworthy extensions

As of November 22, 2026 · TYPO3 14.3 LTS, OWASP Top 10 2025 · about 18 min read

Where users may upload files and foreign code enters the installation, especially dangerous holes appear. On this page you learn how an upload turns into a back door and which layers prevent that. After that it is about protected files, about tokens against forged requests and about choosing and maintaining extensions. The running example is the careers page of a company with an application form from a custom extension.

How an upload becomes a back door

The biggest risk of an insecure upload is an executable file in the web root. If an attacker can upload a PHP file and then call it in the browser, the server runs it. The attacker now has code running on the server. This is called remote code execution, RCE for short.

Usually the attacker places a web shell. That is a small script file through which they remote-control the server via the browser. They can read files, take credentials from the configuration and create further back doors.

Even without uploads, nothing sensitive belongs in the web root. Backup files such as an SQL dump or a ZIP archive are retrievable there via the browser. They reveal credentials, password hashes and customer data. Backups always belong outside the document root.

The fileDenyPattern and its limits

TYPO3 blocks dangerous file types on upload with the fileDenyPattern. That is a regular expression in the system configuration. The default blocks executable scripts with extensions such as php, phar, phtml, cgi and pl, as well as the file .htaccess. Images, PDFs and Office files stay allowed.

Do not weaken this pattern, even if you trust your editors. An attacker who takes over just one simple editor account could otherwise place a web shell.

That is why editors upload files via the backend and not via FTP. The backend checks every upload against the fileDenyPattern. Via FTP, even executable files land on the server unchecked.

This is exactly the weak spot of many projects. Custom, unchecked upload code is often more dangerous than the Core. It bypasses the reviewed mechanisms of the Core and the backend, and its quality varies greatly. The Core ships the fileDenyPattern, the file abstraction layer FAL and validators. Custom code only uses them if the developer applies them on purpose. No mechanism checks custom code automatically, and no Security Team has reviewed it by default.

Allowlist, content check and neutral names

A deny list names what is forbidden. An allowlist names what is allowed. The allowlist is superior, because new dangerous extensions are not allowed automatically. A deny list, on the other hand, easily misses a new variant. The allowlist goes together with a content check. It stops disguised files, for example a script with the extension jpg. The content check complements both lists, and no list makes it unnecessary.

TYPO3 has three such allowlists: textfile_ext, mediafile_ext and miscfile_ext. Two feature toggles build on them:

  • security.system.enforceFileExtensionMimeTypeConsistency is active by default. TYPO3 checks whether extension and MIME type match. It rejects an HTML file disguised as jpg.
  • security.system.enforceAllowedFileExtensions is off by default. When switched on, TYPO3 only allows extensions from the three configured allowlists.

Ideally you do not keep the name of an uploaded file. Replace it with a self-generated, neutral name. That takes control over the file name away from the attacker. Tricks with special characters or double extensions come to nothing.

The most important layer is the target. Store uploads in a folder where the server runs no scripts. Then an uploaded PHP file does not turn into a web shell, even if it slips through. Limiting the file size, renaming the file or writing it in capital letters, on the other hand, prevents nothing.

Uploaded file 1 Allowlist of extensions only PDF, DOCX, JPG … 2 Check the content does extension match MIME type? 3 Neutral file name self-generated, no double extension 4 Non-executable target server runs no PHP there File stored, never runs as code The fileDenyPattern stays unchanged. File size alone does not protect.
Several layers work together. If one fails, the next one holds.

Read on

You can read the introduction and the first 3 of 11 sections here for free. There are two ways to get the whole learning page:

Free with a confirmed e-mail address

Sign up with your e-mail address and confirm it. You can then unlock the learning pages of one set of your choice completely, once, in the browser or in the app.

Unlock for free

Buy the course

The course includes all its questions and the whole learning page.

View the course
These 8 sections are still missing
  1. Double extensions at the web server
  2. fileadmin, CSP and protected files
  3. Uploads in Extbase
  4. Forged requests and tokens
  5. Choosing and checking extensions
  6. Supply chain and updates
  7. Reporting holes and learning from incidents
  8. Key points

Qwissit is also available as an app for iPhone and Android:

As of: November 22, 2026 (TYPO3 14.3 LTS, OWASP Top 10 2025)

Sources:

  • TYPO3 Explained 14.3, chapter Security with the guidelines for administrators, integrators, editors and extension developers
  • TYPO3 Explained 14.3, chapters FormProtection and CSRF-like request tokens
  • TYPO3 Explained 14.3, chapter Extbase, file upload and validators
  • Source code TYPO3 14.3 (typo3/cms-core, typo3/cms-fluid, typo3/cms-install), checked for fileDenyPattern, feature toggles, FormViewHelper and the template of the fileadmin file .htaccess
  • Changelog TYPO3 13.4 to 14.3, among others CSP sandbox for fileadmin and SRI hash with integrity auto
  • TYPO3 Security Advisory TYPO3-CORE-SA-2022-015 (CVE-2022-23503)
  • OWASP Top 10 2025, category A03 Software Supply Chain Failures

This study guide was written with AI and compared with the sources.

Certifications & exams

Which exam comes next?

You can already practise for 60 exams, and 7 are up for a vote. See all certifications with their official information, cast your vote or suggest your exam.

See all certifications