Review main Merged

96547[TASK] Update enshrined/svg-sanitize to ^1.0

Benjamin Franzke CR +2 V +2 Easy +27 −23 updated 10/09/26, 08:48

Commit message

This release handles four security issues:
 - https://github.com/advisories/GHSA-m9xh-6747-9r6f
 - https://github.com/advisories/GHSA-9rjx-3jch-6vjf
 - https://github.com/advisories/GHSA-v383-3rw5-q8rf
 - https://github.com/darylldoyle/svg-sanitizer/security/advisories/GHSA-qhmf-972w-m957

The new version became stricter, the tests are adapted accordingly:

 * SVG documents that contain entity references are rejected entirely
   instead of a removing affected entities only
 * The setting `removeRemoteReferences(true)` now also removes external
   references in `<a>` and `<use>` tags.
   One could argue that external URLs shall be allowed in anchor links,
   but since they have been removed, we accept this upstream decision.
   Local references via `#` still work (tests are added accordingly).

Executed commands:

  composer req enshrined/svg-sanitize:^1.0
  composer req -d typo3/sysext/core --no-update \
    enshrined/svg-sanitize:^1.0

Review

  • Code review CR +2 Done
    • Benni Mack +2
  • Verified V +2 Done
    • Benni Mack +2
    • Lina Wolf +1
    • core-ci +1 CI

Issues 1

Files 7

Review log 68

  1. Benjamin Franzke uploaded patch set 1 10/09/26, 07:53

  2. core-ci voted on patch set 1 V +1 10/09/26, 08:01 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/110558

  3. Benjamin Franzke uploaded patch set 2 V +1 10/09/26, 08:03

  4. Benjamin Franzke updated the commit message in patch set 3 10/09/26, 08:05

  5. core-ci voted on patch set 3 V +1 10/09/26, 08:13 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/110560

  6. Benni Mack voted on patch set 3 CR +2 V +2 10/09/26, 08:29

  7. Benni Mack merged patch set 4 10/09/26, 08:29

  8. Lina Wolf commented on patch set 4 V +1 10/09/26, 08:48

    Tested on main (5c6c29826fc) with svg-sanitize 1.0.0: SVG unit and functional tests pass, and all 881 SVGs shipped by the core sanitize byte-identical to 0.22. One behaviour change is not in the commit message: with removeRemoteReferences(true), 1.0 also removes remote URLs from <image href="https://…">;, which 0.22 kept. SVGs that embed an external bitmap lose that image after the update. Relative links, # references, and data: images are still kept.