CVE-2020-9484 - Deserialization of Untrusted Data

Severity

98%

Complexity

39%

Confidentiality

98%

When using Apache Tomcat versions 10.0.0-M1 to 10.0.0-M4, 9.0.0.M1 to 9.0.34, 8.5.0 to 8.5.54 and 7.0.0 to 7.0.103 if a) an attacker is able to control the contents and name of a file on the server; and b) the server is configured to use the PersistenceManager with a FileStore; and c) the PersistenceManager is configured with sessionAttributeValueClassNameFilter="null" (the default unless a SecurityManager is used) or a sufficiently lax filter to allow the attacker provided object to be deserialized; and d) the attacker knows the relative file path from the storage location used by FileStore to the file the attacker has control over; then, using a specifically crafted request, the attacker will be able to trigger remote code execution via deserialization of the file under their control. Note that all of conditions a) to d) must be true for the attack to succeed.

When using Apache Tomcat versions 10.0.0-M1 to 10.0.0-M4, 9.0.0.M1 to 9.0.34, 8.5.0 to 8.5.54 and 7.0.0 to 7.0.103 if a) an attacker is able to control the contents and name of a file on the server; and b) the server is configured to use the PersistenceManager with a FileStore; and c) the PersistenceManager is configured with sessionAttributeValueClassNameFilter="null" (the default unless a SecurityManager is used) or a sufficiently lax filter to allow the attacker provided object to be deserialized; and d) the attacker knows the relative file path from the storage location used by FileStore to the file the attacker has control over; then, using a specifically crafted request, the attacker will be able to trigger remote code execution via deserialization of the file under their control. Note that all of conditions a) to d) must be true for the attack to succeed.

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

CVSS 2.0 Base Score 6.8. CVSS Attack Vector: network. CVSS Attack Complexity: medium. CVSS Vector: (AV:N/AC:M/Au:N/C:P/I:P/A:P).

CVSS 3.1 Base Score 7. CVSS Attack Vector: local. CVSS Attack Complexity: high. CVSS Vector: (CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H).

CVSS 2.0 Base Score 4.4. CVSS Attack Vector: local. CVSS Attack Complexity: medium. CVSS Vector: (AV:L/AC:M/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 4 years ago

2020-05-20 19:15:00

Last updated 4 years ago

2020-10-27 20:15:00

Affected Software

Apache Software Foundation Tomcat

Apache Software Foundation Tomcat 9.0.0 Milestone 1

9.0.0

Apache Software Foundation Tomcat 9.0.0 Milestone 10

9.0.0

Apache Software Foundation Tomcat 9.0.0 Milestone 11

9.0.0

Apache Software Foundation Tomcat 9.0.0 Milestone 12

9.0.0

Apache Software Foundation Tomcat 9.0.0 Milestone 13

9.0.0

Apache Software Foundation Tomcat 9.0.0 Milestone 14

9.0.0

Apache Software Foundation Tomcat 9.0.0 Milestone 15

9.0.0

Apache Software Foundation Tomcat 9.0.0 Milestone 16

9.0.0

Apache Software Foundation Tomcat 9.0.0 Milestone 17

9.0.0

Apache Software Foundation Tomcat 9.0.0 Milestone 18

9.0.0

Apache Software Foundation Tomcat 9.0.0 Milestone 19

9.0.0

Apache Software Foundation Tomcat 9.0.0 Milestone 2

9.0.0

Apache Software Foundation Tomcat 9.0.0 Milestone 20

9.0.0

Apache Software Foundation Tomcat 9.0.0 Milestone 21

9.0.0

Apache Software Foundation Tomcat 9.0.0 Milestone 22

9.0.0

Apache Software Foundation Tomcat 9.0.0 Milestone 23

9.0.0

Apache Software Foundation Tomcat 9.0.0 Milestone 24

9.0.0

Apache Software Foundation Tomcat 9.0.0 Milestone 25

9.0.0

Apache Software Foundation Tomcat 9.0.0 Milestone 26

9.0.0

Apache Software Foundation Tomcat 9.0.0 Milestone 27

9.0.0

Apache Software Foundation Tomcat 9.0.0 Milestone 3

9.0.0

Apache Software Foundation Tomcat 9.0.0 Milestone 4

9.0.0

Apache Software Foundation Tomcat 9.0.0 Milestone 5

9.0.0

Apache Software Foundation Tomcat 9.0.0 Milestone 6

9.0.0

Apache Software Foundation Tomcat 9.0.0 Milestone 7

9.0.0

Apache Software Foundation Tomcat 9.0.0 Milestone 8

9.0.0

Apache Software Foundation Tomcat 9.0.0 Milestone 9

9.0.0

Apache Software Foundation Tomcat 10.0.0 Milestone 1

10.0.0

Apache Software Foundation Tomcat 10.0.0 Milestone 2

10.0.0

Debian Linux 8.0 (Jessie)

8.0

OpenSUSE Leap 15.1

15.1

Debian Linux 9.0

9.0

Fedora 31

31

Fedora 32

32

Canonical Ubuntu Linux 16.04 LTS (Long-Term Support)

16.04

References

https://lists.apache.org/thread.html/r77eae567ed829da9012cadb29af17f2df8fa23bf66faf88229857bb1%40%3Cannounce.tomcat.apache.org%3E

[tomcat-users] 20200521 Re: [SECURITY] CVE-2020-9484 Apache Tomcat Remote Code Execution via session persistence

https://lists.apache.org/thread.html/r77eae567ed829da9012cadb29af17f2df8fa23bf66faf88229857bb1%40%3Cannounce.tomcat.apache.org%3E

Mailing List, Mitigation, Patch, Third Party Advisory

[tomcat-users] 20200521 Re: [SECURITY] CVE-2020-9484 Apache Tomcat Remote Code Execution via session persistence

Mailing List, Mitigation, Patch, Third Party Advisory

[debian-lts-announce] 20200523 [SECURITY] [DLA 2217-1] tomcat7 security update

openSUSE-SU-2020:0711

[tomcat-users] 20200524 Re: [SECURITY] CVE-2020-9484 Apache Tomcat Remote Code Execution via session persistence

[tomcat-dev] 20200527 Re: [SECURITY] CVE-2020-9484 Apache Tomcat Remote Code Execution via session persistence

[debian-lts-announce] 20200528 [SECURITY] [DLA 2209-1] tomcat8 security update

https://security.netapp.com/advisory/ntap-20200528-0005/

http://packetstormsecurity.com/files/157924/Apache-Tomcat-CVE-2020-9484-Proof-Of-Concept.html

20200602 [CVE-2020-9484] Apache Tomcat RCE via PersistentManager

openSUSE-SU-2020:0711

Third Party Advisory

http://packetstormsecurity.com/files/157924/Apache-Tomcat-CVE-2020-9484-Proof-Of-Concept.html

Third Party Advisory, VDB Entry

20200602 [CVE-2020-9484] Apache Tomcat RCE via PersistentManager

Mailing List, Third Party Advisory

[tomcat-users] 20200524 Re: [SECURITY] CVE-2020-9484 Apache Tomcat Remote Code Execution via session persistence

Third Party Advisory

[tomcat-dev] 20200527 Re: [SECURITY] CVE-2020-9484 Apache Tomcat Remote Code Execution via session persistence

Third Party Advisory

[debian-lts-announce] 20200523 [SECURITY] [DLA 2217-1] tomcat7 security update

Third Party Advisory

[debian-lts-announce] 20200528 [SECURITY] [DLA 2209-1] tomcat8 security update

Third Party Advisory

https://security.netapp.com/advisory/ntap-20200528-0005/

Third Party Advisory

GLSA-202006-21

FEDORA-2020-d9169235a8

FEDORA-2020-ce396e7d5c

[tomcat-dev] 20200625 svn commit: r1879208 - in /tomcat/site/trunk: docs/security-10.html docs/security-8.html docs/security-9.html xdocs/security-10.xml xdocs/security-8.xml xdocs/security-9.xml

[debian-lts-announce] 20200712 [SECURITY] [DLA 2279-1] tomcat8 security update

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

DSA-4727

USN-4448-1

[tomcat-dev] 20200625 svn commit: r1879208 - in /tomcat/site/trunk: docs/security-10.html docs/security-8.html docs/security-9.html xdocs/security-10.xml xdocs/security-8.xml xdocs/security-9.xml

Mailing List, Patch, Vendor Advisory

[debian-lts-announce] 20200712 [SECURITY] [DLA 2279-1] tomcat8 security update

Mailing List, Third Party Advisory

FEDORA-2020-d9169235a8

Mailing List, Third Party Advisory

FEDORA-2020-ce396e7d5c

Mailing List, Third Party Advisory

GLSA-202006-21

Third Party Advisory

USN-4448-1

Third Party Advisory

DSA-4727

Third Party Advisory

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

Patch, Third Party Advisory

[tomee-commits] 20201013 [jira] [Created] (TOMEE-2909) Impact of security vulnerability(CVE-2020-9484) on TOMEE plus (7.0.7)

[tomee-commits] 20201013 [jira] [Updated] (TOMEE-2909) Impact of security vulnerability(CVE-2020-9484) on TOMEE plus (7.0.7)

[tomee-commits] 20201013 [jira] [Assigned] (TOMEE-2909) Impact of security vulnerability(CVE-2020-9484) on TOMEE plus (7.0.7)

[tomee-commits] 20201013 [jira] [Commented] (TOMEE-2909) Impact of security vulnerability(CVE-2020-9484) on TOMEE plus (7.0.7)

https://kc.mcafee.com/corporate/index?page=content&id=SB10332

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

USN-4596-1

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.