Skip to content

[stable33] fix(TaskProcessing): restrict allowed_classes in Manager cache deserialization#60984

Open
backportbot[bot] wants to merge 2 commits into
stable33from
backport/60884/stable33
Open

[stable33] fix(TaskProcessing): restrict allowed_classes in Manager cache deserialization#60984
backportbot[bot] wants to merge 2 commits into
stable33from
backport/60884/stable33

Conversation

@backportbot
Copy link
Copy Markdown

@backportbot backportbot Bot commented Jun 4, 2026

Backport of PR #60884

XananasX7 and others added 2 commits June 4, 2026 13:12
…cache

The availableTaskTypes cache stores serialized arrays containing
ShapeDescriptor objects, ShapeEnumValue objects, and EShapeType enum
values. The unserialize() call did not restrict which classes could
be instantiated.

Restrict deserialization to the three known types:
- OCP\TaskProcessing\ShapeDescriptor
- OCP\TaskProcessing\ShapeEnumValue
- OCP\TaskProcessing\EShapeType

This prevents PHP Object Injection if an attacker gains write access
to the distributed cache backend (e.g., a Redis instance without
authentication or with weak ACLs), which is a known real-world attack
vector in shared hosting and container environments.
…alization

The availableTaskTypes cache stores serialized arrays containing
ShapeDescriptor objects, ShapeEnumValue objects, and EShapeType enum
values. The unserialize() call did not restrict which classes could
be instantiated.

Restrict deserialization to the three known types:
- OCP\TaskProcessing\ShapeDescriptor
- OCP\TaskProcessing\ShapeEnumValue
- OCP\TaskProcessing\EShapeType

This prevents PHP Object Injection if an attacker gains write access
to the distributed cache backend.

Signed-off-by: El Mehdi Abenhazou <mehdiananas007@gmail.com>
@backportbot backportbot Bot requested a review from a team as a code owner June 4, 2026 13:12
@backportbot backportbot Bot requested review from CarlSchwan, artonge, come-nc, kesselb, leftybournes and marcelklehr and removed request for a team, kesselb and marcelklehr June 4, 2026 13:12
@backportbot backportbot Bot added bug 3. to review Waiting for reviews labels Jun 4, 2026
@backportbot backportbot Bot added this to the Nextcloud 33.0.6 milestone Jun 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review Waiting for reviews bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants