Review main Abandoned

93948[TASK] Remove unsafe md5() wrapping around StringUtility::getUniqueId()

TYPO3com CR -2 V -1 Easy +11 −13 updated 10/06/26, 15:57

Commit message

This PR addresses an insecure design pattern by removing the `md5()`
function wrap around `StringUtility::getUniqueId()` across the codebase.

The `StringUtility::getUniqueId()` method already securely generates a
unique 26-character hexadecimal string utilizing PHP's cryptographically
secure `random_bytes(13)` function. Wrapping this output in `md5()`
provides zero additional entropy and unnecessarily invokes a deprecated,
unsafe hashing algorithm.

This patch eliminates the unsafe library call, conforming to the proactive
secure-by-design guidelines of the project.

**How the patch works:**
The patch scans the core, frontend, extbase, form, adminpanel, and
workspaces extensions for the specific pattern
`md5(StringUtility::getUniqueId())`. In all instances, the `md5()` wrapper
has been stripped.
- Cases like `$keyword = md5(StringUtility::getUniqueId());` were
simplified to `$keyword = StringUtility::getUniqueId();`.
- Cases using substrings like `substr(md5(StringUtility::getUniqueId()),
0, 13)` were simplified to `substr(StringUtility::getUniqueId(), 0, 13)`.
- Cases applying prefixes like `md5(StringUtility::getUniqueId())` were
updated to use the prefix built into the utility itself, e.g.,
`StringUtility::getUniqueId('INT_SCRIPT.')`.

**Security Impact:**
The security impact is a proactive cleanup of error-prone design patterns.
`md5()` is flagged as an unsafe algorithm. By removing its usage entirely
here, we ensure that random tokens, IDs, and substitution strings are
generated strictly using high-entropy, cryptographically safe random bytes
without falling back on insecure legacy hashing functions.

Review

  • Code review CR -2
    • Oliver Hader -2
  • Verified V -1
    • core-ci -1 CI

Issues 1

Files 11

Review log 24

  1. TYPO3com uploaded patch set 1 05/04/26, 16:26

  2. core-ci voted on patch set 1 V -1 05/04/26, 16:40 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/101481

  3. Oliver Hader commented on patch set 1 CR -2 05/05/26, 05:32

    `StringUtility::getUniqueId` does not use `random_bytes` but only an internal cheap CLCG.
  4. Georg Ringer abandoned the change 10/06/26, 15:57

    abandoned, siehe issue