CVE-2017-5645 - Deserialization of Untrusted Data

Severity

75%

Complexity

99%

Confidentiality

106%

In Apache Log4j 2.x before 2.8.2, when using the TCP socket server or UDP socket server to receive serialized log events from another application, a specially crafted binary payload can be sent that, when deserialized, can execute arbitrary code.

In Apache Log4j 2.x before 2.8.2, when using the TCP socket server or UDP socket server to receive serialized log events from another application, a specially crafted binary payload can be sent that, when deserialized, can execute arbitrary code.

CVSS 3.0 Base Score 9.8. CVSS Attack Vector: network. CVSS Attack Complexity: low. CVSS Vector: (CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H).

CVSS 2.0 Base Score 7.5. CVSS Attack Vector: network. CVSS Attack Complexity: low. CVSS Vector: (AV:N/AC:L/Au:N/C:P/I:P/A:P).

Demo Examples

Deserialization of Untrusted Data

CWE-502

This code snippet deserializes an object from a file and uses it as a UI button:


               
}
in.close();

This code does not attempt to verify the source or contents of the file before deserializing it. An attacker may be able to replace the intended file with a file that contains arbitrary malicious code which will be executed when the button is pressed.

To mitigate this, explicitly define final readObject() to prevent deserialization. An example of this is:


               
throw new java.io.IOException("Cannot be deserialized"); }

Deserialization of Untrusted Data

CWE-502

In Python, the Pickle library handles the serialization and deserialization processes. In this example derived from [R.502.7], the code receives and parses data, and afterwards tries to authenticate a user based on validating a token.


               
}
raise AuthFail

Unfortunately, the code does not verify that the incoming data is legitimate. An attacker can construct a illegitimate, serialized object "AuthToken" that instantiates one of Python's subprocesses to execute arbitrary commands. For instance,the attacker could construct a pickle that leverages Python's subprocess module, which spawns new processes and includes a number of arguments for various uses. Since Pickle allows objects to define the process for how they should be unpickled, the attacker can direct the unpickle process to call Popen in the subprocess module and execute /bin/sh.

Overview

First reported 7 years ago

2017-04-17 21:59:00

Last updated 5 years ago

2019-06-19 00:15:00

Affected Software

Apache Software Foundation Log4j 2.0 Alpha1

2.0

Apache Software Foundation Log4j 2.0 Alpha2

2.0

Apache Software Foundation Log4j 2.0 Beta1

2.0

Apache Software Foundation Log4j 2.0 Beta2

2.0

Apache Software Foundation Log4j 2.0 Beta3

2.0

Apache Software Foundation Log4j 2.0 Beta4

2.0

Apache Software Foundation Log4j 2.0 Beta5

2.0

Apache Software Foundation Log4j 2.0 Beta6

2.0

Apache Software Foundation Log4j 2.0 Beta7

2.0

Apache Software Foundation Log4j 2.0 Beta8

2.0

Apache Software Foundation Log4j 2.0 Beta9

2.0

Apache Software Foundation Log4j 2.0 Release Candidate 1

2.0

Apache Software Foundation Log4j 2.0 Release Candidate 2

2.0

Apache Software Foundation Log4j 2.0.1

2.0.1

Apache Software Foundation Log4j 2.0.2

2.0.2

Apache Software Foundation Log4j 2.1

2.1

Apache Software Foundation Log4j 2.2

2.2

Apache Software Foundation Log4j 2.3

2.3

Apache Software Foundation Log4j 2.4

2.4

Apache Software Foundation Log4j 2.4.1

2.4.1

Apache Software Foundation Log4j 2.5

2.5

Apache Software Foundation Log4j 2.6

2.6

Apache Software Foundation Log4j 2.6.1

2.6.1

Apache Software Foundation Log4j 2.6.2

2.6.2

Apache Software Foundation Log4j 2.7

2.7

Apache Software Foundation Log4j 2.8

2.8

Apache Software Foundation Log4j 2.8.1

2.8.1

Red Hat Enterprise Linux 6.0

6.0

Red Hat Enterprise Linux 6.7

6.7

Red Hat Enterprise Linux (RHEL) 7.0 (7)

7.0

Red Hat Enterprise Linux 7.3

7.3

Red Hat Enterprise Linux 7.4

7.4

Red Hat Enterprise Linux 7.5

7.5

Red Hat Enterprise Linux 7.6

7.6

RedHat Enterprise Linux Desktop 7.0

7.0

RedHat Enterprise Linux Server 7.0

7.0

Red Hat Enterprise Linux Server Advanced mission critical Update Support (AUS) 7.4

7.4

Red Hat Enterprise Linux Server Advanced mission critical Update Support (AUS) 7.6

7.6

Red Hat Enterprise Linux Server Extended Update Support (EUS) 7.4

7.4

Red Hat Enterprise Linux Server Extended Update Support (EUS) 7.5

7.5

Red Hat Enterprise Linux Server Extended Update Support (EUS) 7.6

7.6

Red Hat Enterprise Linux Server TUS 7.4

7.4

Red Hat Enterprise Linux Server Telecommunications Update Service (TUS) 7.6

7.6

RedHat Enterprise Linux Workstation 7.0

7.0

Oracle API Gateway 11.1.2.4.0

11.1.2.4.0

Oracle Communications Online Mediation Controller 6.1

6.1

Oracle Communications Service Broker 6.0

6.0

Oracle Enterprise Manager Base Platform 12.1.0.5

12.1.0.5

Oracle FLEXCUBE Investor Servicing 12.0.4

12.0.4

Oracle FLEXCUBE Investor Servicing 12.1.0

12.1.0

Oracle FLEXCUBE Investor Servicing 12.3.0

12.3.0

Oracle FLEXCUBE Investor Servicing 12.4.0

12.4.0

Oracle FLEXCUBE Investor Servicing 14.0.0

14.0.0

Oracle Fusion Middleware MapViewer 12.2.1.2

12.2.1.2

Oracle Identity Analytics 11.1.1.5.8

11.1.1.5.8

Oracle JD Edwards EnterpriseOne Tools 9.2

9.2

Oracle Retail Integration Bus 15.0

15.0

Oracle Retail Integration Bus 16.0

16.0

Oracle Retail Open Commerce Platform 6.0.1

6.0.1

Oracle Siebel UI Framework 18.7

18.7

Oracle Siebel UI Framework 18.8

18.8

Oracle Siebel UI Framework 18.9

18.9

Oracle SOA Suite 12.1.3.0.0

12.1.3.0.0

References

[oss-security] 20191218 [CVE-2019-17571] Apache Log4j 1.2 deserialization of untrusted data in SocketServer

http://www.oracle.com/technetwork/security-advisory/cpuapr2018-3678067.html

Patch

http://www.oracle.com/technetwork/security-advisory/cpujan2018-3236628.html

Patch

http://www.oracle.com/technetwork/security-advisory/cpujul2018-4258247.html

Patch

http://www.oracle.com/technetwork/security-advisory/cpuoct2018-4428296.html

Patch

97702

Third Party Advisory, VDB Entry

1040200

Third Party Advisory, VDB Entry

1041294

Third Party Advisory, VDB Entry

RHSA-2017:1417

Third Party Advisory

RHSA-2017:1801

Third Party Advisory

RHSA-2017:1802

Third Party Advisory

RHSA-2017:2423

Third Party Advisory

RHSA-2017:2633

Third Party Advisory

RHSA-2017:2635

Third Party Advisory

RHSA-2017:2636

Third Party Advisory

RHSA-2017:2637

Third Party Advisory

RHSA-2017:2638

Third Party Advisory

RHSA-2017:2808

Third Party Advisory

RHSA-2017:2809

Third Party Advisory

RHSA-2017:2810

Third Party Advisory

RHSA-2017:2811

Third Party Advisory

RHSA-2017:2888

Third Party Advisory

RHSA-2017:2889

Third Party Advisory

RHSA-2017:3244

Third Party Advisory

RHSA-2017:3399

Third Party Advisory

RHSA-2017:3400

Third Party Advisory

RHSA-2019:1545

https://issues.apache.org/jira/browse/LOG4J2-1863

Issue Tracking, Vendor Advisory

[logging-dev] 20191219 Re: [CVE-2019-17571] Apache Log4j 1.2 deserialization of untrusted data in SocketServer

[tika-dev] 20191226 [jira] [Commented] (TIKA-3018) log4j 1.2 version used by Apache Tika 1.23 is vulnerable to CVE-2019-17571

[tika-dev] 20191226 [jira] [Created] (TIKA-3018) log4j 1.2 version used by Apache Tika 1.23 is vulnerable to CVE-2019-17571

[tika-dev] 20191230 [jira] [Created] (TIKA-3019) [9.8] [CVE-2019-17571] [tika-app] [1.23]

[activemq-issues] 20191230 [jira] [Created] (AMQ-7372) [9.8] [CVE-2019-17571] [activemq-all] [5.15.10]

[announce] 20191218 [CVE-2019-17571] Apache Log4j 1.2 deserialization of untrusted data in SocketServer

[activemq-issues] 20191226 [jira] [Created] (AMQ-7370) log4j 1.2 version used by AMQ 5.15.10 / 5.15.11 is vulnerable to CVE-2019-17571

[druid-commits] 20191115 [GitHub] [incubator-druid] ccaominh opened a new pull request #8878: Address security vulnerabilities

[logging-dev] 20191215 Re: Is there any chance that there will be a security fix for log4j-v1.2.17?

[logging-dev] 20191218 [CVE-2019-17571] Apache Log4j 1.2 deserialization of untrusted data in SocketServer

[activemq-issues] 20200228 [jira] [Updated] (AMQ-7370) log4j 1.2 version used by AMQ 5.15.10 / 5.15.11 is vulnerable to CVE-2019-17571

[activemq-issues] 20200208 [jira] [Commented] (AMQ-7370) log4j 1.2 version used by AMQ 5.15.10 / 5.15.11 is vulnerable to CVE-2019-17571

[activemq-issues] 20200122 [jira] [Assigned] (AMQ-7370) log4j 1.2 version used by AMQ 5.15.10 / 5.15.11 is vulnerable to CVE-2019-17571

[tika-dev] 20200107 [jira] [Commented] (TIKA-3019) [9.8] [CVE-2019-17571] [tika-app] [1.23]

[activemq-issues] 20200122 [jira] [Resolved] (AMQ-7372) [9.8] [CVE-2019-17571] [activemq-all] [5.15.10]

[tika-dev] 20200115 [jira] [Commented] (TIKA-3019) [9.8] [CVE-2019-17571] [tika-app] [1.23]

[activemq-issues] 20200127 [jira] [Commented] (AMQ-7370) log4j 1.2 version used by AMQ 5.15.10 / 5.15.11 is vulnerable to CVE-2019-17571

[tika-dev] 20200110 [jira] [Commented] (TIKA-3019) [9.8] [CVE-2019-17571] [tika-app] [1.23]

[tika-dev] 20200111 [jira] [Closed] (TIKA-3018) log4j 1.2 version used by Apache Tika 1.23 is vulnerable to CVE-2019-17571

[activemq-issues] 20200122 [jira] [Assigned] (AMQ-7372) [9.8] [CVE-2019-17571] [activemq-all] [5.15.10]

[tika-dev] 20200111 Re: [jira] [Commented] (TIKA-3018) log4j 1.2 version used by Apache Tika 1.23 is vulnerable to CVE-2019-17571

[logging-commits] 20200425 svn commit: r1059809 - /websites/production/logging/content/log4j/2.13.2/security.html

[activemq-issues] 20200122 [jira] [Updated] (AMQ-7372) [9.8] [CVE-2019-17571] [activemq-all] [5.15.10]

[activemq-issues] 20200228 [jira] [Resolved] (AMQ-7370) log4j 1.2 version used by AMQ 5.15.10 / 5.15.11 is vulnerable to CVE-2019-17571

[tika-dev] 20200108 [jira] [Commented] (TIKA-3019) [9.8] [CVE-2019-17571] [tika-app] [1.23]

[tika-dev] 20200114 [jira] [Commented] (TIKA-3019) [9.8] [CVE-2019-17571] [tika-app] [1.23]

[activemq-issues] 20200122 [jira] [Updated] (AMQ-7370) log4j 1.2 version used by AMQ 5.15.10 / 5.15.11 is vulnerable to CVE-2019-17571

[tika-dev] 20200111 [jira] [Resolved] (TIKA-3018) log4j 1.2 version used by Apache Tika 1.23 is vulnerable to CVE-2019-17571

[activemq-issues] 20200228 [jira] [Commented] (AMQ-7370) log4j 1.2 version used by AMQ 5.15.10 / 5.15.11 is vulnerable to CVE-2019-17571

[tika-dev] 20200106 [jira] [Commented] (TIKA-3019) [9.8] [CVE-2019-17571] [tika-app] [1.23]

https://security.netapp.com/advisory/ntap-20180726-0002/

Third Party Advisory

https://security.netapp.com/advisory/ntap-20181107-0002/

Third Party Advisory

N/A

https://www.oracle.com/security-alerts/cpujan2020.html

https://www.oracle.com/technetwork/security-advisory/cpuapr2019-5072813.html

Patch

https://www.oracle.com/technetwork/security-advisory/cpujan2019-5072801.html

Patch

https://www.oracle.com/technetwork/security-advisory/cpujul2019-5072835.html

https://www.oracle.com/technetwork/security-advisory/cpuoct2019-5072832.html

Stay updated

ExploitPedia is constantly evolving. Sign up to receive a notification when we release additional functionality.

Get in touch

If you'd like to report a bug or have any suggestions for improvements then please do get in touch with us using this form. We will get back to you as soon as we can.