Review 14.3 Merged

97729[SECURITY] Refuse form uploads with empty allowedMimeTypes

Benjamin Franzke CR +2 V +2 Hard +261 −7 updated 11/17/26, 10:35

Commit message

The FileUpload and ImageUpload elements of EXT:form use the
property "allowedMimeTypes" as an allow list of mime types
accepted for upload. An empty list was treated as "no
restriction", so any file except those caught by the core
file deny pattern could be uploaded by anonymous visitors.

The deny pattern only covers PHP-family extensions, which
left browser-active content such as .html, .svg or .xml
accepted. Uploaded files are stored in FAL, by default in a
public storage below fileadmin/, where they are served
directly and can be opened by backend users in a backend
context.

An empty "allowedMimeTypes" list now refuses uploads for the
affected element completely. Integrators must configure at
least one allowed mime type per FileUpload / ImageUpload
element. An explicitly configured list is still honoured
unchanged, including deliberate entries such as text/html or
image/svg+xml.

The form editor validates the "allowedMimeTypes" field with
the "NotEmpty" property validator, so editors can no longer
save an upload element without any allowed mime type.

This changes behaviour for form definitions that rely on an
empty list, for instance hand written YAML or elements whose
list has been cleared. Such uploads are rejected with a
validation error until an allow list is configured. The
feature toggle
`security.form.allowUnrestrictedFileUploadMimeTypes`
restores the previous behaviour as a temporary measure.

Review

  • Code review CR +2 Done
    • Benjamin Franzke +2
  • Verified V +2 Done
    • Benjamin Franzke +2

Issues 1

Files 13

Review log 2

  1. Benjamin Franzke wrote 11/17/26, 10:31

    Hashtag added: sec-2026-11
  2. Benjamin Franzke merged patch set 2 11/17/26, 10:35