Review main Merged

93701[BUGFIX] Sanitize HTML attributes in camino content previews

Oliver Hader CR +2 V +2 Easy +8 −8 updated 04/17/26, 11:01

Commit message

EXT:theme_camino backend preview templates passed editor-
controlled content through f:format.stripTags() with allowed
tags (br/sup/sub), then rendered the result via f:format.raw().
Because stripTags() preserves attributes on allowed tags,
attacker-controlled event handler attributes (e.g. onmouseover)
could survive into the rendered preview markup.

This change adds f:sanitize.html() to the pipeline after
stripTags() in all eight affected ContentPreviews templates,
removing unsafe attributes before raw output.

The backend Content-Security-Policy already blocked execution
of injected event handlers in practice, but this change
removes the unsafe rendering pattern as a defence-in-depth
measure. That's why this change is handled in public.

Review

  • Code review CR +2 Done
    • Benni Mack +2
    • Sebastian Michaelsen +1
    • Oliver Klee +1
  • Verified V +2 Done
    • Benni Mack +2
    • Sebastian Michaelsen +1
    • core-ci +1 CI

Issues 1

Files 8

Review log 56

  1. Oliver Hader uploaded patch set 1 04/16/26, 20:33

  2. core-ci voted on patch set 1 V +1 04/16/26, 20:42 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/100347

  3. Sebastian Michaelsen voted on patch set 1 CR +1 V +1 04/16/26, 21:44

  4. Oliver Klee voted on patch set 1 CR +1 04/17/26, 08:24

  5. Benni Mack voted on patch set 1 CR +2 V +2 04/17/26, 11:01

  6. Benni Mack merged patch set 2 04/17/26, 11:01