Secure Spring service exporters

Proprietary

The default Java deserialization mechanism is available via ObjectInputStream class. This mechanism is known to be vulnerable. If an attacker can make an application deserialize malicious data, it may result in arbitrary code execution.

Spring’s RemoteInvocationSerializingExporter uses the default Java deserialization mechanism to parse data. As a result, all classes that extend it are vulnerable to deserialization attacks. The Spring Framework contains at least HttpInvokerServiceExporter and SimpleHttpInvokerServiceExporter that extend RemoteInvocationSerializingExporter. These exporters parse data from the HTTP body using the unsafe Java deserialization mechanism.

See the full blog post by Artem Smotrakov on CVE-2016-1000027 from which the above description is excerpted.

org.openrewrite.java.security.spring.InsecureSpringServiceExporter
mod run . --recipe=org.openrewrite.java.security.spring.InsecureSpringServiceExporter

Install it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.