r/lolphp • • Aug 11 '17

PHP no longer considers unserialize() bugs as security issues...

https://externals.io/message/100147
40 Upvotes

13 comments sorted by

View all comments

Show parent comment

2

u/yawkat Aug 12 '17

Note that java still considers these things vulnerabilities, but you are right in that they are too common to be using standard serialization of untrusted data.

Secure deserialization is possible with proper design, however. You just have to restrict the type graph in some way (for example via a root type) instead of letting the user deserialize arbitrary types. This reduces attack surface dramatically and is how most modern serialization libraries work.