Skip to content

Fix deserialization of untrusted data weakness#119

Merged
markstory merged 4 commits into
2.xfrom
unserialize-allowlist
Jun 20, 2026
Merged

Fix deserialization of untrusted data weakness#119
markstory merged 4 commits into
2.xfrom
unserialize-allowlist

Conversation

@markstory

Copy link
Copy Markdown
Member

The unserialize filter has a weakness to arbitrary class usage which can be combined with user input to create unserialization gadgets which are used in RCE vulnerability chains.

I've also chosen to deprecate these functions. I see no reason to continue having them when they have so many sharp edges. Applications relying on these features, can add their own filters.

Thanks to Volker Dusch and the PHP Ecosystem security team for reporting this.

The unserialize filter has a weakness to arbitrary class usage which
can be combined with user input to create unserialization gadgets
which are used in RCE vulnerability chains.

I've also chosen to deprecate these functions. I see no reason to
continue having them when they have so many sharp edges. Applications
relying on these features, can add their own filters.

Thanks to Volker Dusch and the PHP Ecosystem security team for reporting this.
@markstory markstory added this to the 2.x milestone Jun 19, 2026
@markstory markstory merged commit 99a5940 into 2.x Jun 20, 2026
6 of 8 checks passed
@markstory markstory deleted the unserialize-allowlist branch June 20, 2026 04:25
markstory added a commit that referenced this pull request Jun 21, 2026
Fix `include` tag being vulnerable to path traversal

Ensure that all relative and absolute file paths are contained by
a template path. We're looking at the string values so that any `../`
tricks don't work.

Thanks to Volker Dusch and the PHP Ecosystem security team for reporting this.

* Fix deserialization of untrusted data weakness (#119)

The unserialize filter has a weakness to arbitrary class usage which
can be combined with user input to create unserialization gadgets
which are used in RCE vulnerability chains.

I've also chosen to deprecate these functions. I see no reason to
continue having them when they have so many sharp edges. Applications
relying on these features, can add their own filters.

Thanks to Volker Dusch and the PHP Ecosystem security team for reporting this.

CI was broken.

* Open OS range
* Update for older phpunit
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