Review main Merged

93758[SECURITY] Do not store password in serialized user settings

Oliver Hader CR +2 V +2 Hard +580 −34 updated 04/21/26, 09:06

Commit message

The new mechanism of using serialized JSON data for storing
backend user settings since TYPO3 14.2 has introduced a vulnerability
that stored the "password" and "verify password" input data
when changing a user's password inside the serialized user
settings representation.

The root cause was that the setup module controller merged virtual
fields stored in BE_USER->uc with regular fields of the database
table be_users into a single flat submission array. This made it
impossible to distinguish which fields belong to the database record
and which belong to the user settings, causing password fields to
be inadvertently written into the serialized user settings as well.

This is addressed by separating concerns in the backend form view
and how submitted data is handled in the controller. Two separate
partitions are introduced: 'be_users' for everything related to
the database table, and 'user_settings' for everything related to
BE_USER->uc. Field names in the virtual TCA form are now prefixed
accordingly (e.g. be_users__password, user_settings__titleLen) via
UserSettingsSchema::getTcaFieldName(), and the controller splits
submitted values per partition using extractPartitionData() before
processing them.

These passwords are no longer stored in the database columns
`be_users.uc` and `be_users.user_settings` anymore,
but may exist in database records during the period where
TYPO3 v14.2 was used.

An upgrade wizard has been added that will remove these credentials
from the serialized representation.

This upgrade wizard will detect possible records that contain
the string `"password` or `:"password` and then unserialize
the data, remove the two fields and re-serialize the data. It
is important to execute this wizard for safety. If the wizard
does not show up, no serialized credential data is found.

Review

  • Code review CR +2 Done
    • Oliver Hader +2
    • Garvin Hicking +1
    • Benni Mack +1
  • Verified V +2 Done
    • Oliver Hader +2
    • Garvin Hicking +1
    • Benni Mack +1

Issues 3

Files 6

Review log 9

  1. Oliver Hader uploaded patch set 1 04/20/26, 18:11

  2. Oliver Hader voted on patch set 1 CR +1 V +1 04/20/26, 18:19

  3. Oliver Hader commented on patch set 1 04/20/26, 18:20

    To be merged prior to the TYPO3 v14.3.0 release 🎉
  4. Garvin Hicking voted on patch set 1 CR +1 V +1 04/20/26, 19:02

  5. Benni Mack voted on patch set 1 CR +1 V +1 04/21/26, 09:05

  6. Oliver Hader wrote 04/21/26, 09:06

    Unset private
  7. Oliver Hader voted on patch set 1 CR +2 V +2 04/21/26, 09:06

  8. Oliver Hader merged patch set 2 04/21/26, 09:06

  9. Oliver Hader commented on patch set 2 04/21/26, 09:06

    Reply

    Done