Skip to content

fix(security): restrict unserialize allowed_classes (ZDI-20-1051)#129

Merged
ralflang merged 1 commit into
FRAMEWORK_6_0from
fix/deserialization-zdi-20-1051
May 27, 2026
Merged

fix(security): restrict unserialize allowed_classes (ZDI-20-1051)#129
ralflang merged 1 commit into
FRAMEWORK_6_0from
fix/deserialization-zdi-20-1051

Conversation

@ralflang
Copy link
Copy Markdown
Member

Summary

  • Add allowed_classes parameter to all 17 unserialize() calls in Core to prevent PHP object injection attacks
  • 16 calls use allowed_classes => false (data stored is arrays/scalars only)
  • 1 call (Factory/ThemesCache.php) uses explicit whitelist [Horde_Themes_Cache::class] since it legitimately stores a serialized object
  • Covers: preferences (confirm_email, upgrade_tasks, last_logintasks, facebook, msgflags, sync_calendars, block layouts, multienum, alarm), cache entries (tagger, themes), database fields (signup_data, IMSP share params), and charset upgrade paths

Add allowed_classes parameter to all unserialize() calls to prevent
PHP object injection via crafted serialized data in preferences,
cache entries, and database fields.

- 14 calls use allowed_classes => false (data-only: arrays, scalars)
- 1 call uses explicit whitelist [Horde_Themes_Cache::class]
- Covers prefs, block layouts, login tasks, signup data, theme cache,
  tagger cache, ActiveSync config, IMSP share params, and Facebook prefs
@ralflang
Copy link
Copy Markdown
Member Author

ZDI-20-1051 related PRs across the Horde ecosystem

Repo PR Title
imp #7 Deserialization of untrusted data (original report)
imp #56 restrict unserialize allowed_classes
turba #58 restrict unserialize allowed_classes
kronolith #47 restrict unserialize allowed_classes
nag #26 restrict unserialize allowed_classes
mnemo #21 restrict unserialize allowed_classes
ingo #29 restrict unserialize allowed_classes
Core #129 restrict unserialize allowed_classes
base #98 restrict unserialize allowed_classes
Prefs #6 restrict unserialize allowed_classes
Prefs #5 Harden Horde_Prefs_Identity against unexpected prefs values (merged)
ActiveSync #21 Modern __serialize()/__unserialize() for Folder classes (merged)
ActiveSync #25 Refactor unserialize calls to use _unserializeState (merged)

@ralflang ralflang merged commit b30c168 into FRAMEWORK_6_0 May 27, 2026
0 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant