Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for allowed_classes optional parameter to unserialize #1

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

wunused
Copy link

@wunused wunused commented Nov 27, 2023

The PHP unserialize function can take an optional parameter allowed_classes to restrict the set of allowed classes that can be deserialized (https://www.php.net/manual/en/function.unserialize.php). When an application has a restricted set of allowed classes at an unserialize call site, an exploit can only use gadgets from the set of allowed classes.

We extended FUGIO to support the semantics of the allowed_classes optional parameter.

This was necessary to evaluate our mitigation for deserialization vulnerabilities that automatically determines a correct set of allowed_classes, and we hope that it can benefit other researchers in the future.

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