[
https://issues.apache.org/jira/browse/COLLECTIONS-580?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15003970#comment-15003970
]
Thomas Neidhart commented on COLLECTIONS-580:
---------------------------------------------
{quote}
Not sure I fully understand. The critical piece of code is always executed on a
fully deserialized object. So the approach should work (or I apologize for not
having understood the subject matter).
{quote}
I did not question your approach, I wanted to point out that in the attack
vector, i.e. InvokerTransformer#transform will already be called during
de-serialization (of another object).
{quote}
However, awareness is required on how people have to deal with this finding.
The lib is very wide-spread. Thus a minimum behavior change in the software
stack is preferred.
{quote}
We are trying to do this, but the rationale is as follows: if an application
uses the unsafe classes in a legit way, i.e. will de-serialize them from a
trusted source, the application will most likely also *use* these objects in a
way or another. It means that the application will fail in any way, but it will
be easier to spot/fix if it happens already during the de-serialization, but
please correct me if you have a use-case where your approach would be more
suitable.
{quote}
For newer versions (major/minor) I would agree to your fail-fast approach. Here
I would also suggest to remove the complete Serialization feature.
{quote}
This is indeed the plan, for the 4.1 release we will hopefully remove the
Serializable interface from the unsafe classes.
> Arbitrary remote code execution with InvokerTransformer
> -------------------------------------------------------
>
> Key: COLLECTIONS-580
> URL: https://issues.apache.org/jira/browse/COLLECTIONS-580
> Project: Commons Collections
> Issue Type: Bug
> Affects Versions: 3.0, 4.0
> Reporter: Philippe Marschall
> Attachments: COLLECTIONS-580.patch
>
>
> With {{InvokerTransformer}} serializable collections can be build that
> execute arbitrary Java code.
> {{sun.reflect.annotation.AnnotationInvocationHandler#readObject}} invokes
> {{#entrySet}} and {{#get}} on a deserialized collection. If you have an
> endpoint that accepts serialized Java objects (JMX, RMI, remote EJB, ...) you
> can combine the two to create arbitrary remote code execution vulnerability.
> I don't know of a good fix short of removing {{InvokerTransformer}} or making
> it not Serializable. Both probably break existing applications.
> This is not my research, but has been discovered by other people.
> https://github.com/frohoff/ysoserial
> http://foxglovesecurity.com/2015/11/06/what-do-weblogic-websphere-jboss-jenkins-opennms-and-your-application-have-in-common-this-vulnerability/
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)