Skip to content

[stable32] fix(TaskProcessing): restrict allowed_classes in Manager cache deserialization#60985

Open
backportbot[bot] wants to merge 2 commits into
stable32from
backport/60884/stable32
Open

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

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:13
…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:13
@backportbot backportbot Bot requested review from Altahrim, artonge, come-nc, kesselb, marcelklehr and salmart-dev and removed request for a team June 4, 2026 13:13
@backportbot backportbot Bot added bug 3. to review Waiting for reviews labels Jun 4, 2026
@backportbot backportbot Bot added this to the Nextcloud 32.0.12 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