Review main Abandoned

93493[BUGFIX] Restrict allowed_classes in form state unserialize

Youichi Uemura CR 0 V 0 Easy +5 −1 updated 03/31/26, 16:35

Commit message

FormRuntime::initializeFormStateFromRequest() was calling unserialize()
without the allowed_classes option, allowing arbitrary classes to be
instantiated during deserialization of the form state.

Although protected by HMAC validation, a compromised or leaked HMAC key
would allow exploitation via existing gadget chains in the codebase
(e.g. UploadExtensionFileController::__destruct() → rmdir()).

Restrict deserialization to FormState::class only, and throw
BadRequestException if the result is not a FormState instance.

Review

  • Code review CR 0
  • Verified V 0
    • core-ci +1 CI

Files 1

Review log 46

  1. Youichi Uemura uploaded patch set 1 03/31/26, 12:39

  2. Youichi Uemura updated the commit message in patch set 2 03/31/26, 12:48

  3. core-ci voted on patch set 1 V +1 03/31/26, 12:51 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/99262

  4. core-ci voted on patch set 2 V +1 03/31/26, 13:02 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/99263

  5. Oliver Hader commented on patch set 2 03/31/26, 16:29

    Unresolved

    Thanks for your contribution. However, a "leaked HMAC key" is not a security vulnerability. The insecure deserialization aspect of this code location in covered by the HMAC signature. Besides that, this change would be breaking e.g. for handling uploaded files. The procedure for reporting a vulnerability to `security@typo3.org` is outlined in our security policy at https://github.com/TYPO3/typo3/blob/main/SECURITY.md#reporting-a-vulnerability > We urge security researchers not to publish vulnerabilities in issue trackers or discuss them publicly (e.g. on Slack or Social Media platforms).
  6. Oliver Hader abandoned the change 03/31/26, 16:35

    Abandoning this change...