VDB
Sign up
MEDIUM

GHSA-h6cx-gjxx-v25c

Sulu: Media move/update authorization bypass (IDOR)

Quick fix

GHSA-h6cx-gjxx-v25c — sulu/sulu: upgrade to the fixed version with the command below.

composer require sulu/sulu:^2.6.25

Details

### Impact

A media move authorization bypass (IDOR) lets a backend user move a media out of a collection they have no access to.

The media move endpoint resolves its permission check from the `collection` value in the request rather than from the media's real collection. `MediaManager::move()` then reassigns the media without re-checking its actual source collection. A user who has edit rights on collection A but no rights on a restricted collection B can move a media that lives in B by naming A in the request. The move succeeds, the media ends up in A, and the user can then view and download content they were never allowed to see.

This only affects installations that use per-collection (object level) permissions to restrict some collections. Exploitation requires an authenticated backend user with edit rights on at least one collection, and knowledge of the target media id.

### Patches

Fixed in **2.6.25** and **3.0.8**. `MediaManager::move()` now verifies edit permission on the media's real source collection and on the destination collection before moving it.

### Workarounds

If you cannot upgrade immediately:

- Restrict the media edit permission to trusted users, so untrusted users cannot trigger a move. - Apply the fix manually by adding an edit permission check on the media's real source collection (and the destination) inside `MediaManager::move()`.

Are you affected?

Enter the version of the package you're using.

Affected packages

Packagist/sulu/sulu
Introduced in: 0Fixed in: 2.6.25
Fixcomposer require sulu/sulu:^2.6.25
Packagist/sulu/sulu
Introduced in: 3.0.0-alpha1Fixed in: 3.0.8
Fixcomposer require sulu/sulu:^3.0.8

References