CVE Database›Document archive›CVE-2015-3253

CVE-2015-3253

groovy: remote execution of untrusted code in class MethodClosure

Loading…

Severity

Important

Red Hat Product Security

9.6

CVSS 3.0

Review impact separately from score.

Published · July 16, 2015

Updated · August 5, 2026

Description

A flaw was discovered in the way applications using Groovy used the standard Java serialization mechanism. A remote attacker could use a specially crafted serialized object that would execute code directly when deserialized. All applications which rely on serialization and do not isolate the code which deserializes objects are subject to this vulnerability.

CVSS score applicability

The CVSS score(s) listed for this vulnerability do not reflect the associated product's status, and are included for informational purposes to better understand the severity of this vulnerability.

Mitigation

Apply the following patch on the MethodClosure class (src/main/org/codehaus/groovy/runtime/MethodClosure.java):

public class MethodClosure extends Closure {
    +    private Object readResolve() {
    +        throw new UnsupportedOperationException();
    +    
    }

Alternatively, you should make sure to use a custom security policy file (using the standard Java security manager) or make sure that you do not rely on serialization to communicate remotely.

CVSS / CWE

CVSS 3.0 · 9.6
CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H

CVSS 2.0 · 6.8
AV:N/AC:M/Au:N/C:P/I:P/A:P

CWE-502 · Deserialization of Untrusted Data